[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200706231634.GA193886@roeck-us.net>
Date: Mon, 6 Jul 2020 16:16:34 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Chu Lin <linchuyuan@...gle.com>
Cc: Kais Belgaied <belgaied@...gle.com>,
Jason Ling <jasonling@...gle.com>, jdelvare@...e.com,
linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
Zhongqi Li <zhongqil@...gle.com>
Subject: Re: [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@...gle.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
Powered by blists - more mailing lists