Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Oct 2020 22:46:15 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r366552 - head/sys/vm
Message-ID:  <202010082246.098MkFBE025639@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Oct  8 22:46:15 2020
New Revision: 366552
URL: https://svnweb.freebsd.org/changeset/base/366552

Log:
  vm_page_dump_index_to_pa(): Add braces to the expression involving + and &.
  
  The precedence of the '&' operator is less than of '+'.  Added braces
  do change the order of evaluation into the natural one, in my opinion.
  On the other hand, the value of the expression should not change since
  all elements should have page-aligned values.
  
  This fixes a gcc warning reported.
  
  Reported by:	adrian
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/vm/vm_page.h

Modified: head/sys/vm/vm_page.h
==============================================================================
--- head/sys/vm/vm_page.h	Thu Oct  8 22:41:02 2020	(r366551)
+++ head/sys/vm/vm_page.h	Thu Oct  8 22:46:15 2020	(r366552)
@@ -639,7 +639,7 @@ vm_page_dump_index_to_pa(int bit)
 		    dump_avail[i] / PAGE_SIZE;
 		if (bit < tot)
 			return ((vm_paddr_t)bit * PAGE_SIZE +
-			    dump_avail[i] & ~PAGE_MASK);
+			    (dump_avail[i] & ~PAGE_MASK));
 		bit -= tot;
 	}
 	return ((vm_paddr_t)NULL);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010082246.098MkFBE025639>