From: Dan Carpenter <dan.carpenter@oracle.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: SF Markus Elfring <elfring@users.sourceforge.net>,
linux-iio@vger.kernel.org, Andreas Dannenberg <dannenberg@ti.com>,
Felipe Balbi <balbi@ti.com>, Hartmut Knaack <knaack.h@gmx.de>,
Javier Martinez Canillas <javier@osg.samsung.com>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] iio/light/opt3001: Use common error handling code in opt3001_get_lux()
Date: Thu, 26 Oct 2017 17:07:43 +0300 [thread overview]
Message-ID: <20171026140743.wfstmoy3lbolm7xv@mwanda> (raw)
In-Reply-To: <20171026134852.bprrrv3htfyryyy4@piout.net>
On Thu, Oct 26, 2017 at 03:48:52PM +0200, Alexandre Belloni wrote:
> On 26/10/2017 at 14:17:30 +0200, SF Markus Elfring wrote:
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > Date: Thu, 26 Oct 2017 14:06:49 +0200
> >
> > * Add jump targets so that two error messages are stored only once
> > at the end of this function implementation.
> >
> > * Adjust condition checks.
> >
> > * Replace string literals by references to two global constant variables
> > in eight functions.
> >
> > This issue was detected by using the Coccinelle software.
> >
> > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> > ---
> > drivers/iio/light/opt3001.c | 88 +++++++++++++++++++--------------------------
> > 1 file changed, 36 insertions(+), 52 deletions(-)
> >
> > diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c
> > index 54d88b60e303..23d7d4e6ae61 100644
> > --- a/drivers/iio/light/opt3001.c
> > +++ b/drivers/iio/light/opt3001.c
> > @@ -77,6 +77,9 @@
> > #define OPT3001_RESULT_READY_SHORT 150
> > #define OPT3001_RESULT_READY_LONG 1000
> >
> > +static char const read_failure[] = "failed to read register %02x\n";
> > +static char const write_failure[] = "failed to write register %02x\n";
> > +
>
> If you are going to do that
The answer to that question is we're not going to do that... Please
stop taking bad ideas and making them even more complicated and worse.
regards,
dan carpenter
next prev parent reply other threads:[~2017-10-26 14:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-26 12:17 [PATCH] iio/light/opt3001: Use common error handling code in opt3001_get_lux() SF Markus Elfring
2017-10-26 13:48 ` Alexandre Belloni
2017-10-26 14:07 ` Dan Carpenter [this message]
2017-10-26 14:50 ` Alexandre Belloni
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=20171026140743.wfstmoy3lbolm7xv@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=balbi@ti.com \
--cc=dannenberg@ti.com \
--cc=elfring@users.sourceforge.net \
--cc=javier@osg.samsung.com \
--cc=jic23@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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