linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bitan Biswas <bbiswas@nvidia.com>
To: Peter Rosin <peda@axentia.se>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	Thierry Reding <treding@nvidia.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Shardar Mohammed <smohammed@nvidia.com>,
	Sowjanya Komatineni <skomatineni@nvidia.com>,
	Mantravadi Karthik <mkarthik@nvidia.com>
Subject: Re: [PATCH V4] drivers: i2c: tegra: fix checkpatch defects
Date: Thu, 6 Jun 2019 20:40:11 -0700	[thread overview]
Message-ID: <7f24640f-5031-1413-e96d-6a28e6a50869@nvidia.com> (raw)
In-Reply-To: <8df7648d-c5bd-7179-6368-66dab9b7fa39@axentia.se>



On 6/6/19 1:45 PM, Peter Rosin wrote:
> On 2019-06-06 09:35, Bitan Biswas wrote:
>> Fix checkpatch.pl warning(s)/error(s)/check(s) in i2c-tegra.c
>>
>> Remove redundant BUG_ON calls or replace with WARN_ON_ONCE
>> as needed. Replace BUG() with error handling code.
>> Define I2C_ERR_UNEXPECTED_STATUS for error handling.
>>
>> Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
>> ---
>>   drivers/i2c/busses/i2c-tegra.c | 67 +++++++++++++++++++++++-------------------
>>   1 file changed, 37 insertions(+), 30 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
>> index 76b7926..55a5d87 100644
>> --- a/drivers/i2c/busses/i2c-tegra.c
>> +++ b/drivers/i2c/busses/i2c-tegra.c
>> @@ -78,6 +78,7 @@
>>   #define I2C_ERR_NO_ACK				0x01
>>   #define I2C_ERR_ARBITRATION_LOST		0x02
>>   #define I2C_ERR_UNKNOWN_INTERRUPT		0x04
>> +#define I2C_ERR_UNEXPECTED_STATUS               0x08
> 
> Use tabs like the the surrounding code. And perhaps convert all
> these flags to use the BIT() macro?
I shall correct the line and use tabs. I shall convert macros to BIT() 
if possible.

> 
>>   
>>   #define PACKET_HEADER0_HEADER_SIZE_SHIFT	28
>>   #define PACKET_HEADER0_PACKET_ID_SHIFT		16
>> @@ -112,7 +113,7 @@
>>   #define I2C_CLKEN_OVERRIDE			0x090
>>   #define I2C_MST_CORE_CLKEN_OVR			BIT(0)
>>   
>> -#define I2C_CONFIG_LOAD_TIMEOUT			1000000
>> +#define I2C_CONFIG_LOAD_TMOUT			1000000
> 
> Similar to xfer_tm already mentioned by Dmitry; just keep it as
> ..._TIMEOUT and ignore checkpatch on this issue. Or juggle the
> code in some other way to pacify checkpatch. E.g. abbreviate
> CONFIG instead? Or something. CONF is way easier to read than
> TMOUT IMHO...
OK. Just for consistency planning to ignore checkpatch warning and shall 
keep current macro I2C_CONFIG_LOAD_TIMEOUT.

-Thanks,
  Bitan

      reply	other threads:[~2019-06-07  3:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06  7:35 [PATCH V4] drivers: i2c: tegra: fix checkpatch defects Bitan Biswas
2019-06-06 11:39 ` Dmitry Osipenko
2019-06-06 14:02   ` Bitan Biswas
2019-06-06 15:34     ` Dmitry Osipenko
2019-06-06 11:57 ` Wolfram Sang
2019-06-06 18:22   ` Bitan Biswas
2019-06-06 20:45 ` Peter Rosin
2019-06-07  3:40   ` Bitan Biswas [this message]

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=7f24640f-5031-1413-e96d-6a28e6a50869@nvidia.com \
    --to=bbiswas@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mkarthik@nvidia.com \
    --cc=peda@axentia.se \
    --cc=skomatineni@nvidia.com \
    --cc=smohammed@nvidia.com \
    --cc=treding@nvidia.com \
    /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;
as well as URLs for NNTP newsgroup(s).