+ aoe-remove-custom-implementation-of-kbasename.patch added to -mm tree

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

 



Subject: + aoe-remove-custom-implementation-of-kbasename.patch added to -mm tree
To: andriy.shevchenko@xxxxxxxxxxxxxxx,ecashin@xxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Wed, 07 Aug 2013 13:54:19 -0700


The patch titled
     Subject: aoe: remove custom implementation of kbasename()
has been added to the -mm tree.  Its filename is
     aoe-remove-custom-implementation-of-kbasename.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/aoe-remove-custom-implementation-of-kbasename.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/aoe-remove-custom-implementation-of-kbasename.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 ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Subject: aoe: remove custom implementation of kbasename()

In the kernel we have a nice helper that may be used here. This patch
substitutes the custom implementation by the native function call.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Cc: Ed Cashin <ecashin@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/block/aoe/aoedev.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff -puN drivers/block/aoe/aoedev.c~aoe-remove-custom-implementation-of-kbasename drivers/block/aoe/aoedev.c
--- a/drivers/block/aoe/aoedev.c~aoe-remove-custom-implementation-of-kbasename
+++ a/drivers/block/aoe/aoedev.c
@@ -12,6 +12,7 @@
 #include <linux/bitmap.h>
 #include <linux/kdev_t.h>
 #include <linux/moduleparam.h>
+#include <linux/string.h>
 #include "aoe.h"
 
 static void dummy_timer(ulong);
@@ -241,16 +242,12 @@ aoedev_downdev(struct aoedev *d)
 static int
 user_req(char *s, size_t slen, struct aoedev *d)
 {
-	char *p;
+	const char *p;
 	size_t lim;
 
 	if (!d->gd)
 		return 0;
-	p = strrchr(d->gd->disk_name, '/');
-	if (!p)
-		p = d->gd->disk_name;
-	else
-		p += 1;
+	p = kbasename(d->gd->disk_name);
 	lim = sizeof(d->gd->disk_name);
 	lim -= p - d->gd->disk_name;
 	if (slen < lim)
_

Patches currently in -mm which might be from andriy.shevchenko@xxxxxxxxxxxxxxx are

aoe-remove-custom-implementation-of-kbasename.patch
aoe-use-min-to-simplify-the-code.patch
linux-next.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