mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Chu Lin <linchuyuan@google.com>
Cc: Kais Belgaied <belgaied@google.com>,
	Jason Ling <jasonling@google.com>,
	jdelvare@suse.com, linux-hwmon@vger.kernel.org,
	linux-kernel@vger.kernel.org, Zhongqi Li <zhongqil@google.com>
Subject: Re: [PATCH v2 1/1] hwmon:max6697: Allow max6581 to create tempX_offset
Date: Mon, 6 Jul 2020 16:16:34 -0700	[thread overview]
Message-ID: <20200706231634.GA193886@roeck-us.net> (raw)
In-Reply-To: <CAKCA56BUZ29ahLDPN_Atqn_PGUn5hA7FoVAC08qYnXwOzOuRwg@mail.gmail.com>

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

      reply	other threads:[~2020-07-06 23:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 22:10 [PATCH v2 0/1] " Chu Lin
2020-07-06 22:10 ` [PATCH v2 1/1] " Chu Lin
2020-07-06 22:46   ` Chu Lin
2020-07-06 23:16     ` Guenter Roeck [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=20200706231634.GA193886@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=belgaied@google.com \
    --cc=jasonling@google.com \
    --cc=jdelvare@suse.com \
    --cc=linchuyuan@google.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhongqil@google.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

all inboxes | Powered by JetHome®