Patchwork [V2,2/2] mtd: tests: annotate as DANGEROUS in Kconfig

login
register
mail settings
Submitter Wolfram Sang
Date Oct. 30, 2011, 4:28 p.m.
Message ID <1319992129-13588-1-git-send-email-w.sang@pengutronix.de>
Download mbox | patch
Permalink /patch/122648/
State New
Headers show

Comments

Wolfram Sang - Oct. 30, 2011, 4:28 p.m.
The tests may erase mtd devices, so annotate them as suggested per
coding style and add a paragraph to the help text as well.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---

Thanks to Artem for letting me know of this coding style suggestion.

 drivers/mtd/Kconfig |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
Artem Bityutskiy - Oct. 30, 2011, 8:34 p.m.
On Sun, 2011-10-30 at 17:28 +0100, Wolfram Sang wrote:
> +	  WARNING: Some of the tests will ERASE THE CONTENT of mtd devices!
> +	  Do not use these tests unless you are sure you really need to.

Thanks, I've pushed this patch but amended the above text a bit:
+         WARNING: some of the tests will ERASE entire MTD device which they
+         test. Do not use these tests unless you really know what you do.
Wolfram Sang - Oct. 30, 2011, 8:37 p.m.
On Sun, Oct 30, 2011 at 10:34:53PM +0200, Artem Bityutskiy wrote:
> On Sun, 2011-10-30 at 17:28 +0100, Wolfram Sang wrote:
> > +	  WARNING: Some of the tests will ERASE THE CONTENT of mtd devices!
> > +	  Do not use these tests unless you are sure you really need to.
> 
> Thanks, I've pushed this patch but amended the above text a bit:
> +         WARNING: some of the tests will ERASE entire MTD device which they
> +         test. Do not use these tests unless you really know what you do.

OK, thanks! Seems we now finally have it :)
Brian Norris - Oct. 31, 2011, 5 p.m.
On Sun, Oct 30, 2011 at 1:37 PM, Wolfram Sang <w.sang@pengutronix.de> wrote:
> On Sun, Oct 30, 2011 at 10:34:53PM +0200, Artem Bityutskiy wrote:
>> On Sun, 2011-10-30 at 17:28 +0100, Wolfram Sang wrote:
>> > +     WARNING: Some of the tests will ERASE THE CONTENT of mtd devices!
>> > +     Do not use these tests unless you are sure you really need to.
>>
>> Thanks, I've pushed this patch but amended the above text a bit:
>> +         WARNING: some of the tests will ERASE entire MTD device which they
>> +         test. Do not use these tests unless you really know what you do.

Amendment to the amendment, perhaps? I think "unless you really know
what you do" should be "unless you really know what you are doing".

> OK, thanks! Seems we now finally have it :)

Maybe now we have it?

BTW, I agree that EXPERIMENTAL was not quite the right way to go.

Brian
Artem Bityutskiy - Nov. 8, 2011, 8:35 p.m.
On Mon, 2011-10-31 at 10:00 -0700, Brian Norris wrote:
> On Sun, Oct 30, 2011 at 1:37 PM, Wolfram Sang <w.sang@pengutronix.de> wrote:
> > On Sun, Oct 30, 2011 at 10:34:53PM +0200, Artem Bityutskiy wrote:
> >> On Sun, 2011-10-30 at 17:28 +0100, Wolfram Sang wrote:
> >> > +     WARNING: Some of the tests will ERASE THE CONTENT of mtd devices!
> >> > +     Do not use these tests unless you are sure you really need to.
> >>
> >> Thanks, I've pushed this patch but amended the above text a bit:
> >> +         WARNING: some of the tests will ERASE entire MTD device which they
> >> +         test. Do not use these tests unless you really know what you do.
> 
> Amendment to the amendment, perhaps? I think "unless you really know
> what you do" should be "unless you really know what you are doing".

Sorry, now it is a bit too late - this is merged, but should not be a
big issue I think.

Artem.

Patch

diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 4be8373..cb1821b 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -26,13 +26,16 @@  config MTD_DEBUG_VERBOSE
 	  Determines the verbosity level of the MTD debugging messages.
 
 config MTD_TESTS
-	tristate "MTD tests support"
+	tristate "MTD tests support (DANGEROUS)"
 	depends on m
 	help
 	  This option includes various MTD tests into compilation. The tests
 	  should normally be compiled as kernel modules. The modules perform
 	  various checks and verifications when loaded.
 
+	  WARNING: Some of the tests will ERASE THE CONTENT of mtd devices!
+	  Do not use these tests unless you are sure you really need to.
+
 config MTD_REDBOOT_PARTS
 	tristate "RedBoot partition table parsing"
 	---help---