+ mm-notifier_from_errno-cleanup.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     mm: notifier_from_errno() cleanup
has been added to the -mm tree.  Its filename is
     mm-notifier_from_errno-cleanup.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: mm: notifier_from_errno() cleanup
From: Prarit Bhargava <prarit@xxxxxxxxxx>

While looking at some other notifier callbacks I noticed this code could
use a simple cleanup.

notifier_from_errno() no longer needs the if (ret)/else conditional.  That
same conditional is now done in notifier_from_errno().

Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>
Cc: Paul Menage <menage@xxxxxxxxxx>
Cc: Li Zefan <lizf@xxxxxxxxxxxxxx>
Cc: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/page_cgroup.c |    7 +------
 mm/slab.c        |    2 +-
 2 files changed, 2 insertions(+), 7 deletions(-)

diff -puN mm/page_cgroup.c~mm-notifier_from_errno-cleanup mm/page_cgroup.c
--- a/mm/page_cgroup.c~mm-notifier_from_errno-cleanup
+++ a/mm/page_cgroup.c
@@ -243,12 +243,7 @@ static int __meminit page_cgroup_callbac
 		break;
 	}
 
-	if (ret)
-		ret = notifier_from_errno(ret);
-	else
-		ret = NOTIFY_OK;
-
-	return ret;
+	return notifier_from_errno(ret);
 }
 
 #endif
diff -puN mm/slab.c~mm-notifier_from_errno-cleanup mm/slab.c
--- a/mm/slab.c~mm-notifier_from_errno-cleanup
+++ a/mm/slab.c
@@ -1387,7 +1387,7 @@ static int __meminit slab_memory_callbac
 		break;
 	}
 out:
-	return ret ? notifier_from_errno(ret) : NOTIFY_OK;
+	return notifier_from_errno(ret);
 }
 #endif /* CONFIG_NUMA && CONFIG_MEMORY_HOTPLUG */
 
_

Patches currently in -mm which might be from prarit@xxxxxxxxxx are

mm-vmap-area-cache.patch
mm-notifier_from_errno-cleanup.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux