mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: Joe Perches <joe@perches.com>,
	Andrey Smirnov <andrew.smirnov@gmail.com>,
	linux-mtd@lists.infradead.org
Cc: cphealy@gmail.com, David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Richard Weinberger <richard@nod.at>,
	Cyrille Pitchen <cyrille.pitchen@atmel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] mtd: dataflash: Improve coding style in jedec_probe()
Date: Wed, 19 Apr 2017 00:38:28 +0200	[thread overview]
Message-ID: <dd25e04b-ecb8-f53a-23b0-bfeb85a4a226@gmail.com> (raw)
In-Reply-To: <1492554972.8661.51.camel@perches.com>

On 04/19/2017 12:36 AM, Joe Perches wrote:
> On Tue, 2017-04-18 at 20:25 +0200, Marek Vasut wrote:
>> On 04/18/2017 04:21 PM, Andrey Smirnov wrote:
>>> As per request from Marek Vasut, change the following:
>>
>> Does that really have to be in the commit message ? ^_^'
>>
>>>    - Replace indentation between type and name of local variable from
>>>      tabs to spaces
>>>
>>>    - Replace magic number 0x1F with CFI_MFR_ATMEL macro
>>>
>>>    - Replace variable 'tmp' with 'ret' and 'i' where appropriate
>>>
>>>    - Reformat multi-line comments and add newlines where appropriate
>>>
>>> No functional change intended.
>>
>> Appreciated, thanks!
> 
> trivia:
> 
>>> diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
> []
>>> @@ -768,9 +771,9 @@ static struct flash_info *jedec_probe(struct spi_device *spi)
>>>  	jedec = jedec << 8;
>>>  	jedec |= id[2];
>>>  
>>> -	for (tmp = 0, info = dataflash_data;
>>> -			tmp < ARRAY_SIZE(dataflash_data);
>>> -			tmp++, info++) {
>>> +	for (i = 0, info = dataflash_data;
>>> +			i < ARRAY_SIZE(dataflash_data);
>>> +			i++, info++) {
>>>  		if (info->jedec_id == jedec) {
>>>  			pr_debug("%s: OTP, sector protect%s\n",
>>>  				dev_name(&spi->dev),
> 
> This loop could be written without the i variable.
> 
> 	for (info = dataflash_data;
> 	     info < dataflash_data + ARRAY_SIZE(dataflash_data);
> 	     info++) {
> 

But in a separate patch please, so it's bisectable. I don't want to slap
such change into this patch.

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2017-04-18 22:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 14:21 [PATCH v2 1/3] mtd: dataflash: Replace C99 type with their kernel counterparts Andrey Smirnov
2017-04-18 14:21 ` [PATCH v2 2/3] mtd: dataflash: Improve coding style in jedec_probe() Andrey Smirnov
2017-04-18 18:25   ` Marek Vasut
2017-04-18 22:36     ` Joe Perches
2017-04-18 22:38       ` Marek Vasut [this message]
2017-04-18 14:21 ` [PATCH v2 3/3] mtd: dataflash: Make use of "extened device information" Andrey Smirnov
2017-04-18 18:31   ` Marek Vasut
2017-04-19  2:58     ` Andrey Smirnov
2017-04-19  8:47       ` Marek Vasut
2017-04-19 15:07         ` Andrey Smirnov
2017-04-19 15:32           ` Marek Vasut
2017-04-18 18:24 ` [PATCH v2 1/3] mtd: dataflash: Replace C99 type with their kernel counterparts Marek Vasut

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=dd25e04b-ecb8-f53a-23b0-bfeb85a4a226@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=andrew.smirnov@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cphealy@gmail.com \
    --cc=cyrille.pitchen@atmel.com \
    --cc=dwmw2@infradead.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /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

all inboxes | Powered by JetHome®