From: Dan Carpenter <dan.carpenter@oracle.com>
To: Roy Im <roy.im.opensource@diasemi.com>
Cc: Support Opensource <Support.Opensource@diasemi.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] Input: da7280 - delete a stray tab
Date: Wed, 16 Dec 2020 11:32:28 +0000 [thread overview]
Message-ID: <20201216113228.GK2809@kadam> (raw)
In-Reply-To: <AM6PR10MB1926E4EA344C24F76881E89B85C50@AM6PR10MB1926.EURPRD10.PROD.OUTLOOK.COM>
On Wed, Dec 16, 2020 at 10:51:23AM +0000, Roy Im wrote:
> On Wednesday, December 16, 2020 5:33 PM, Dan Carpenter wrote:
>
> > This line is indented one tab too far.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
>
> Thanks for the patch but it is already fixed by Dmitry as below.
> ---
> An "if" testing for error condition has accidentally been dropped from the code.
> error = device_property_read_string(dev, gpi_str3, &str);
> + if (!error)
> haptics->gpi_ctl[i].polarity > da7280_haptic_of_gpi_pol_str(dev, str);
>
Huh... Well, at least the kbuild bot discovered this using the Smatch
warning for inconsistent indenting so that's nice.
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/IB3H2KDL2HZ5WGNAER7TLCJQHZJH7S7E/
This is one of the first real bugs that that indenting has found, maybe
if Smatch had used some more of the context clues the warning could have
been made better.
Presumably W=1 and some of the other analysis tools would have warned
about the unused "error = " assignment if we had waited another day.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Roy Im <roy.im.opensource@diasemi.com>
Cc: Support Opensource <Support.Opensource@diasemi.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] Input: da7280 - delete a stray tab
Date: Wed, 16 Dec 2020 14:32:28 +0300 [thread overview]
Message-ID: <20201216113228.GK2809@kadam> (raw)
In-Reply-To: <AM6PR10MB1926E4EA344C24F76881E89B85C50@AM6PR10MB1926.EURPRD10.PROD.OUTLOOK.COM>
On Wed, Dec 16, 2020 at 10:51:23AM +0000, Roy Im wrote:
> On Wednesday, December 16, 2020 5:33 PM, Dan Carpenter wrote:
>
> > This line is indented one tab too far.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
>
> Thanks for the patch but it is already fixed by Dmitry as below.
> ---
> An "if" testing for error condition has accidentally been dropped from the code.
> error = device_property_read_string(dev, gpi_str3, &str);
> + if (!error)
> haptics->gpi_ctl[i].polarity =
> da7280_haptic_of_gpi_pol_str(dev, str);
>
Huh... Well, at least the kbuild bot discovered this using the Smatch
warning for inconsistent indenting so that's nice.
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/IB3H2KDL2HZ5WGNAER7TLCJQHZJH7S7E/
This is one of the first real bugs that that indenting has found, maybe
if Smatch had used some more of the context clues the warning could have
been made better.
Presumably W=1 and some of the other analysis tools would have warned
about the unused "error = " assignment if we had waited another day.
regards,
dan carpenter
next prev parent reply other threads:[~2020-12-16 11:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 8:32 [PATCH] Input: da7280 - delete a stray tab Dan Carpenter
2020-12-16 8:32 ` Dan Carpenter
2020-12-16 10:51 ` Roy Im
2020-12-16 11:32 ` Dan Carpenter [this message]
2020-12-16 11:32 ` Dan Carpenter
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=20201216113228.GK2809@kadam \
--to=dan.carpenter@oracle.com \
--cc=Support.Opensource@diasemi.com \
--cc=dmitry.torokhov@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=roy.im.opensource@diasemi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.