All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] mm-use-min3-max3-macros-to-avoid-shadow-warnings.patch removed from -mm tree
@ 2014-10-13 18:20 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2014-10-13 18:20 UTC (permalink / raw)
  To: mark.d.rustad, jeffrey.t.kirsher, mm-commits


The patch titled
     Subject: mm/page-writeback.c: use min3/max3 macros to avoid shadow warnings
has been removed from the -mm tree.  Its filename was
     mm-use-min3-max3-macros-to-avoid-shadow-warnings.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Mark Rustad <mark.d.rustad@intel.com>
Subject: mm/page-writeback.c: use min3/max3 macros to avoid shadow warnings

Nested calls to min/max functions result in shadow warnings in W=2 builds.
 Avoid the warning by using the min3 and max3 macros to get the min/max of
3 values instead of nested calls.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page-writeback.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff -puN mm/page-writeback.c~mm-use-min3-max3-macros-to-avoid-shadow-warnings mm/page-writeback.c
--- a/mm/page-writeback.c~mm-use-min3-max3-macros-to-avoid-shadow-warnings
+++ a/mm/page-writeback.c
@@ -1075,13 +1075,13 @@ static void bdi_update_dirty_ratelimit(s
 	}
 
 	if (dirty < setpoint) {
-		x = min(bdi->balanced_dirty_ratelimit,
-			 min(balanced_dirty_ratelimit, task_ratelimit));
+		x = min3(bdi->balanced_dirty_ratelimit,
+			 balanced_dirty_ratelimit, task_ratelimit);
 		if (dirty_ratelimit < x)
 			step = x - dirty_ratelimit;
 	} else {
-		x = max(bdi->balanced_dirty_ratelimit,
-			 max(balanced_dirty_ratelimit, task_ratelimit));
+		x = max3(bdi->balanced_dirty_ratelimit,
+			 balanced_dirty_ratelimit, task_ratelimit);
 		if (dirty_ratelimit > x)
 			step = dirty_ratelimit - x;
 	}
_

Patches currently in -mm which might be from mark.d.rustad@intel.com are

origin.patch
init-resolve-shadow-warnings.patch
init-resolve-shadow-warnings-checkpatch-fixes.patch
ipc-resolve-shadow-warnings.patch
linux-next.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-13 18:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-13 18:20 [merged] mm-use-min3-max3-macros-to-avoid-shadow-warnings.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.