public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Ville Herva <vherva@vianova.fi>
To: linux-mtd@lists.infradead.org
Cc: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
Subject: [PATCH] [MTD] block2mtd.c: Remove unnecessary parsing of empty boot-time argument
Date: Thu, 13 Jul 2006 18:41:10 +0300	[thread overview]
Message-ID: <20060713154110.GE15078@vianova.fi> (raw)
In-Reply-To: <20060713133959.GA24056@wohnheim.fh-wedel.de>


Statically compiled block2mtd driver with no boot-time parameter works, but
it does unnecessarily printk

   error: cannot open device ""

since argument parsing is invoked even when no argument is supplied.
This is harmless as no "" device is found, but perhaps worth correcting.

This is an incremental patch against the "Make kernel boot command line
arguments work (try 3)" patch.


From: Ville Herva <vherva@vianova.fi>
Signed-off-by: Ville Herva <vherva@vianova.fi>
Acked-by: Joern Engel <joern@wohnheim.fh-wedel.de>

--- linux-2.6.17.3.NEW3/drivers/mtd/devices/block2mtd.c	2006-07-07 15:05:40.000000000 +0300
+++ linux-2.6.17.3.NEW4/drivers/mtd/devices/block2mtd.c	2006-07-13 18:28:31.000000000 +0300
@@ -507,7 +507,8 @@ static int __init block2mtd_init(void)
 	INFO("version " VERSION);
 
 #ifndef MODULE	
-	ret = block2mtd_setup2(block2mtd_paramline);
+	if (strlen(block2mtd_paramline))
+		ret = block2mtd_setup2(block2mtd_paramline);
 	block2mtd_init_called = 1;
 #endif
 

  parent reply	other threads:[~2006-07-13 15:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-07 12:22 [PATCH] [MTD] block2mtd.c: Make kernel boot command line arguments work (try 3) Ville Herva
2006-07-10 22:31 ` Ville Herva
2006-07-11  6:23 ` Ville Herva
2006-07-12  9:50   ` Jörn Engel
2006-07-12 17:24     ` Ville Herva
2006-07-13 13:39       ` Jörn Engel
2006-07-13 13:49         ` Ville Herva
2006-07-13 14:55           ` Jörn Engel
2006-07-13 21:02             ` David Woodhouse
2006-07-13 21:33               ` Ville Herva
2006-07-13 15:41         ` Ville Herva [this message]
2006-07-12  9:50 ` Jörn Engel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060713154110.GE15078@vianova.fi \
    --to=vherva@vianova.fi \
    --cc=joern@wohnheim.fh-wedel.de \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox