public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-mtd@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de
Subject: Re: [PATCH 6/6] [RFC] mtd: mxc-nand: Warn on unimplemented commands
Date: Wed, 11 Feb 2015 10:40:16 +0100	[thread overview]
Message-ID: <20150211104016.0d7eec4d@ipc1.ka-ro> (raw)
In-Reply-To: <20150211090017.GW10842@pengutronix.de>

Hi,

Uwe Kleine-König wrote:
> Hello Lothar,
> 
> On Wed, Feb 11, 2015 at 09:42:56AM +0100, Lothar Waßmann wrote:
> > > diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
> > > index 0083b4ee4f33..372e0e38f59b 100644
> > > --- a/drivers/mtd/nand/mxc_nand.c
> > > +++ b/drivers/mtd/nand/mxc_nand.c
> > > @@ -1160,6 +1160,10 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command,
> > >  		memcpy32_fromio(host->data_buf, host->main_area0, 512);
> > >  		host->buf_start = 0;
> > >  		break;
> > > +	default:
> > > +		WARN_ONCE(1, "Unimplemented command (cmd=%u)\n",
> > > +			  command);
> > > +		break;
> > >  	}
> > useless break;
> Do you mean the line break? That's right, I fixed it here for a later
> v2. But I guess you mean the (literal) break here. Right, it could be
> dropped without change in semantic, but I thought adding it matches the
> usually recommended style?!
> 
Documentation/CodingStyle has this example:
|        default:
|                break;
|        }
but there is no useful statement in the 'default' case, so the
'break' is necessary here.
IMO this doesn't mandate to add a 'break' at the end of the default
clause if there are actual statements in this path.


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info@karo-electronics.de
___________________________________________________________

  reply	other threads:[~2015-02-11  9:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 18:59 [PATCH 0/6] mtd: teach mxc-nand about ONFI probing Uwe Kleine-König
2015-02-10 18:59 ` [PATCH 1/6] mtd: mxc-nand: Add a timeout when waiting for interrupt Uwe Kleine-König
2015-02-10 18:59 ` [PATCH 2/6] mtd: mxc-nand: Only enable hardware checksumming for fully detected flashes Uwe Kleine-König
2015-02-10 18:59 ` [PATCH 3/6] mtd: mxc-nand: Do the word to byte mangling in the read_byte callback Uwe Kleine-König
2015-02-10 18:59 ` [PATCH 4/6] mtd: mxc-nand: Allow to use column addresses different from 0 Uwe Kleine-König
2015-02-10 18:59 ` [PATCH 5/6] mtd: mxc-nand: Implement support for PARAM command Uwe Kleine-König
2015-02-10 19:00 ` [PATCH 6/6] [RFC] mtd: mxc-nand: Warn on unimplemented commands Uwe Kleine-König
2015-02-11  8:42   ` Lothar Waßmann
2015-02-11  9:00     ` Uwe Kleine-König
2015-02-11  9:40       ` Lothar Waßmann [this message]
2015-02-11  9:48         ` Uwe Kleine-König
2015-02-11  9:48         ` Sascha Hauer
2015-03-02 16:31 ` [PATCH 0/6] mtd: teach mxc-nand about ONFI probing Uwe Kleine-König
2015-03-11 23:42 ` Brian Norris

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=20150211104016.0d7eec4d@ipc1.ka-ro \
    --to=lw@karo-electronics.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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