lkml.org 
[lkml]   [2020]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/1] hwmon:max6697: Allow max6581 to create tempX_offset
On Mon, Jul 06, 2020 at 03:46:20PM -0700, Chu Lin wrote:
> On Mon, Jul 6, 2020 at 3:10 PM Chu Lin <linchuyuan@google.com> wrote:
> >
> > ---
> > drivers/hwmon/max6697.c | 100 ++++++++++++++++++++++++++++++++++++++--
> > 1 file changed, 96 insertions(+), 4 deletions(-)
> >
[ ... ]
> >
> > +static ssize_t offset_store(struct device *dev,
> > + struct device_attribute *devattr, const char *buf,
> > + size_t count)
> > +{
> > + long temp;
> > + u8 val, select;
> > + int ret, index;
> > + struct max6697_data *data;
> > +
Where possible, use reverse christmas tree order (longer lines first)

> > + index = to_sensor_dev_attr(devattr)->index;
> > + data = dev_get_drvdata(dev);
> > + select = i2c_smbus_read_byte_data(data->client,
> > + MAX6581_REG_OFFSET_SELECT);
> > + if (select < 0)
> > + return select;
> This is always false due to its type. This error is caught by the
> kernel test robot.
> I will submit a new version to address this issue.
>

While at it, watch out for new line length limits; the limit is now 100
characters. Line splits like the one above are no longer necessary.

Guenter

\
 
 \ /
  Last update: 2020-07-07 01:22    [W:0.395 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site