+ drivers-video-fbmemc-simplify-strlen==0-check-in-fb_get_options.patch added to -mm tree

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

 



The patch titled
     drivers/video/fbmem.c: simplify strlen()==0 check in fb_get_options()
has been added to the -mm tree.  Its filename is
     drivers-video-fbmemc-simplify-strlen==0-check-in-fb_get_options.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: drivers/video/fbmem.c: simplify strlen()==0 check in fb_get_options()
From: Denys Vlasenko <vda.linux@xxxxxxxxxxxxxx>

Replaced !strlen(str) check with !str[0].  Removed the variable which was
used solely to store strlen result.

Signed-off-by: Denys Vlasenko <vda.linux@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/video/fbmem.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff -puN drivers/video/fbmem.c~drivers-video-fbmemc-simplify-strlen==0-check-in-fb_get_options drivers/video/fbmem.c
--- a/drivers/video/fbmem.c~drivers-video-fbmemc-simplify-strlen==0-check-in-fb_get_options
+++ a/drivers/video/fbmem.c
@@ -1786,7 +1786,7 @@ static int ofonly __read_mostly;
 int fb_get_options(char *name, char **option)
 {
 	char *opt, *options = NULL;
-	int opt_len, retval = 0;
+	int retval = 0;
 	int name_len = strlen(name), i;
 
 	if (name_len && ofonly && strncmp(name, "offb", 4))
@@ -1796,8 +1796,7 @@ int fb_get_options(char *name, char **op
 		for (i = 0; i < FB_MAX; i++) {
 			if (video_options[i] == NULL)
 				continue;
-			opt_len = strlen(video_options[i]);
-			if (!opt_len)
+			if (!video_options[i][0])
 				continue;
 			opt = video_options[i];
 			if (!strncmp(name, opt, name_len) &&
_

Patches currently in -mm which might be from vda.linux@xxxxxxxxxxxxxx are

modpost-support-objects-with-more-than-64k-sections.patch
fbcon-deinline-large-static-function-get_color.patch
fbcon-uninline-four-foo_update_attr-functions.patch
drivers-video-fbmemc-simplify-strlen==0-check-in-fb_get_options.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