lkml.org 
[lkml]   [2018]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/2] eeprom: at24: Add support for address-width property
From
Date
On Tue, 2018-06-26 at 15:11 +0800, Chiang, AlanX wrote:

> If it is, I would like to modify it as below:
>
> case 8:
> If (chip->flags & AT24_FLAG_ADDR16) {
> chip->flags &= ~AT24_FLAG_ADDR16;
> dev_warn(dev, "address-width is 8, clear the ADDR16
> bit\n");
> }
> break;

No need to put bit clearing inside the loop, something like below would
be slightly better.

if (chip->flags & AT24_FLAG_ADDR16)
dev_warn(dev, "address-width is 8, clear the ADDR16 bit\n");
chip->flags &= ~AT24_FLAG_ADDR16;

On top of this the message would sound clearer if you put it like

"Override address width to be 8, while default is 16"

--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

\
 
 \ /
  Last update: 2018-06-26 14:12    [W:0.049 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site