All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: linux-mtd@lists.infradead.org,
	David Woodhouse <dwmw2@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Unused config options in drivers/mtd (Re: running my kernel scanning scripts on your favourite part of the tree)
Date: Thu, 25 Nov 2010 17:14:40 +0100	[thread overview]
Message-ID: <4CEE8B70.4070500@suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.00.1011090711410.5783@localhost6.localdomain6>

CC the mtd maintainer and mailinglist and adjusted subject. Robert, you
should report such bugs to the maintainer / author of the code in
question, otherwise your mail might end up unnoticed on LKML.

Michal

On 9.11.2010 13:16, Robert P. J. Day wrote:
> 
>   not sure when i'll get the time to do another pass over the kernel
> source tree with my kernel cleanup scripts but anyone who's
> interested is welcome to download the scripts from here:
> 
>   http://www.crashcourse.ca/wiki/index.php/Kernel_cleanup_scripts
> 
> to check out whatever part of the tree they want.
> 
>   as a simple example, i can run the script to find "badref" config
> variables on, say, the drivers/mtd part of the tree:
> 
> $ ../s/find_badref_configs.sh drivers/mtd
>>>>>> MTD_SUPERH_RESERVE
> drivers/mtd/maps/solutionengine.c:38:#ifdef CONFIG_MTD_SUPERH_RESERVE
> drivers/mtd/maps/solutionengine.c:44:		.size = CONFIG_MTD_SUPERH_RESERVE,
> drivers/mtd/maps/solutionengine.c:54:#endif /* CONFIG_MTD_SUPERH_RESERVE */
> drivers/mtd/maps/solutionengine.c:97:#ifdef CONFIG_MTD_SUPERH_RESERVE
> drivers/mtd/maps/solutionengine.c:100:		       CONFIG_MTD_SUPERH_RESERVE);
> drivers/mtd/maps/solutionengine.c:104:#endif /* CONFIG_MTD_SUPERH_RESERVE */
> $
> 
>   that tells me that, under drivers/mtd, there's some file that
> insists on testing CONFIG_MTD_SUPERH_RESERVE even though no Kconfig
> file defines such a variable.
> 
>   the other common check is to look for the exact opposite --
> variables defined in a Kconfig file that are never tested anywhere.
> once again, let's pick on drivers/mtd:
> 
> $ ../s/find_unused_configs.sh drivers/mtd
> ===== MTD_NAND_ATMEL_ECC_SOFT
> drivers/mtd/nand/Kconfig:375:config MTD_NAND_ATMEL_ECC_SOFT
> $
> 
>   that should be self-explanatory.  anyway, have at it if it interests
> you.
> 
> rday
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Michal Marek <mmarek@suse.cz>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-mtd@lists.infradead.org
Subject: Unused config options in drivers/mtd (Re: running my kernel scanning scripts on your favourite part of the tree)
Date: Thu, 25 Nov 2010 17:14:40 +0100	[thread overview]
Message-ID: <4CEE8B70.4070500@suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.00.1011090711410.5783@localhost6.localdomain6>

CC the mtd maintainer and mailinglist and adjusted subject. Robert, you
should report such bugs to the maintainer / author of the code in
question, otherwise your mail might end up unnoticed on LKML.

Michal

On 9.11.2010 13:16, Robert P. J. Day wrote:
> 
>   not sure when i'll get the time to do another pass over the kernel
> source tree with my kernel cleanup scripts but anyone who's
> interested is welcome to download the scripts from here:
> 
>   http://www.crashcourse.ca/wiki/index.php/Kernel_cleanup_scripts
> 
> to check out whatever part of the tree they want.
> 
>   as a simple example, i can run the script to find "badref" config
> variables on, say, the drivers/mtd part of the tree:
> 
> $ ../s/find_badref_configs.sh drivers/mtd
>>>>>> MTD_SUPERH_RESERVE
> drivers/mtd/maps/solutionengine.c:38:#ifdef CONFIG_MTD_SUPERH_RESERVE
> drivers/mtd/maps/solutionengine.c:44:		.size = CONFIG_MTD_SUPERH_RESERVE,
> drivers/mtd/maps/solutionengine.c:54:#endif /* CONFIG_MTD_SUPERH_RESERVE */
> drivers/mtd/maps/solutionengine.c:97:#ifdef CONFIG_MTD_SUPERH_RESERVE
> drivers/mtd/maps/solutionengine.c:100:		       CONFIG_MTD_SUPERH_RESERVE);
> drivers/mtd/maps/solutionengine.c:104:#endif /* CONFIG_MTD_SUPERH_RESERVE */
> $
> 
>   that tells me that, under drivers/mtd, there's some file that
> insists on testing CONFIG_MTD_SUPERH_RESERVE even though no Kconfig
> file defines such a variable.
> 
>   the other common check is to look for the exact opposite --
> variables defined in a Kconfig file that are never tested anywhere.
> once again, let's pick on drivers/mtd:
> 
> $ ../s/find_unused_configs.sh drivers/mtd
> ===== MTD_NAND_ATMEL_ECC_SOFT
> drivers/mtd/nand/Kconfig:375:config MTD_NAND_ATMEL_ECC_SOFT
> $
> 
>   that should be self-explanatory.  anyway, have at it if it interests
> you.
> 
> rday
> 
> 


  reply	other threads:[~2010-11-25 16:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-09 12:16 running my kernel scanning scripts on your favourite part of the tree Robert P. J. Day
2010-11-25 16:14 ` Michal Marek [this message]
2010-11-25 16:14   ` Unused config options in drivers/mtd (Re: running my kernel scanning scripts on your favourite part of the tree) Michal Marek
2010-11-26 16:29   ` Robert P. J. Day
2010-11-26 16:29     ` Robert P. J. Day
2010-11-26 16:42     ` Michal Marek
2010-11-26 16:42       ` Michal Marek
2010-11-26 16:52       ` Robert P. J. Day
2010-11-26 16:52         ` Robert P. J. Day

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=4CEE8B70.4070500@suse.cz \
    --to=mmarek@suse.cz \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rpjday@crashcourse.ca \
    /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 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.