From: Ben Dooks <ben-i2c@fluff.org>
To: Jean Delvare <khali@linux-fr.org>
Cc: Magnus Damm <magnus.damm@gmail.com>,
linux-i2c@vger.kernel.org, lethal@linux-sh.org,
linux-sh@vger.kernel.org
Subject: Re: [PATCH] i2c: i2c-sh_mobile irq rollback fix
Date: Tue, 31 Aug 2010 23:27:56 +0100 [thread overview]
Message-ID: <20100831222756.GA24761@trinity.fluff.org> (raw)
In-Reply-To: <20100810151828.36a77cc3@hyperion.delvare>
On Tue, Aug 10, 2010 at 03:18:28PM +0200, Jean Delvare wrote:
> On Mon, 02 Aug 2010 16:16:37 +0900, Magnus Damm wrote:
> > From: Magnus Damm <damm@opensource.se>
> >
> > Update the i2c-sh_mobile driver to properly free
> > interrupts. The function sh_mobile_i2c_hook_irqs()
> > is fixed so module both unload and load are working
> > as expected.
> >
> > Signed-off-by: Magnus Damm <damm@opensource.se>
> > ---
> >
> > drivers/i2c/busses/i2c-sh_mobile.c | 23 +++++++++++++----------
> > 1 file changed, 13 insertions(+), 10 deletions(-)
> >
> > --- 0001/drivers/i2c/busses/i2c-sh_mobile.c
> > +++ work/drivers/i2c/busses/i2c-sh_mobile.c 2010-08-02 15:14:48.000000000 +0900
> > @@ -538,15 +538,17 @@ static int sh_mobile_i2c_hook_irqs(struc
> > {
> > struct resource *res;
> > int ret = -ENXIO;
> > - int q, m;
> > - int k = 0;
> > - int n = 0;
> > + int n, k = 0;
>
> You can't really hope to get the code right with such variable names.
I agree, this isn't very readable. If possible, please have a rethink
of the code. You may also want to start using devm_ to track your
resources.
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
WARNING: multiple messages have this Message-ID (diff)
From: Ben Dooks <ben-i2c@fluff.org>
To: Jean Delvare <khali@linux-fr.org>
Cc: Magnus Damm <magnus.damm@gmail.com>,
linux-i2c@vger.kernel.org, lethal@linux-sh.org,
linux-sh@vger.kernel.org
Subject: Re: [PATCH] i2c: i2c-sh_mobile irq rollback fix
Date: Tue, 31 Aug 2010 22:27:56 +0000 [thread overview]
Message-ID: <20100831222756.GA24761@trinity.fluff.org> (raw)
In-Reply-To: <20100810151828.36a77cc3@hyperion.delvare>
On Tue, Aug 10, 2010 at 03:18:28PM +0200, Jean Delvare wrote:
> On Mon, 02 Aug 2010 16:16:37 +0900, Magnus Damm wrote:
> > From: Magnus Damm <damm@opensource.se>
> >
> > Update the i2c-sh_mobile driver to properly free
> > interrupts. The function sh_mobile_i2c_hook_irqs()
> > is fixed so module both unload and load are working
> > as expected.
> >
> > Signed-off-by: Magnus Damm <damm@opensource.se>
> > ---
> >
> > drivers/i2c/busses/i2c-sh_mobile.c | 23 +++++++++++++----------
> > 1 file changed, 13 insertions(+), 10 deletions(-)
> >
> > --- 0001/drivers/i2c/busses/i2c-sh_mobile.c
> > +++ work/drivers/i2c/busses/i2c-sh_mobile.c 2010-08-02 15:14:48.000000000 +0900
> > @@ -538,15 +538,17 @@ static int sh_mobile_i2c_hook_irqs(struc
> > {
> > struct resource *res;
> > int ret = -ENXIO;
> > - int q, m;
> > - int k = 0;
> > - int n = 0;
> > + int n, k = 0;
>
> You can't really hope to get the code right with such variable names.
I agree, this isn't very readable. If possible, please have a rethink
of the code. You may also want to start using devm_ to track your
resources.
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
next prev parent reply other threads:[~2010-08-31 22:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-02 7:16 [PATCH] i2c: i2c-sh_mobile irq rollback fix Magnus Damm
2010-08-02 7:16 ` Magnus Damm
2010-08-04 7:44 ` Paul Mundt
2010-08-04 7:44 ` Paul Mundt
2010-08-10 13:18 ` Jean Delvare
2010-08-10 13:18 ` Jean Delvare
[not found] ` <20100810151828.36a77cc3-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-08-16 1:59 ` Magnus Damm
2010-08-16 1:59 ` Magnus Damm
[not found] ` <AANLkTikQuCX7YC1tQ5MvwBdgxg1LE6k9f98-3M8khBJ6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-16 6:24 ` Jean Delvare
2010-08-16 6:24 ` Jean Delvare
[not found] ` <20100816082427.626ea303-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-08-16 7:34 ` Magnus Damm
2010-08-16 7:34 ` Magnus Damm
2010-08-31 22:27 ` Ben Dooks [this message]
2010-08-31 22:27 ` Ben Dooks
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=20100831222756.GA24761@trinity.fluff.org \
--to=ben-i2c@fluff.org \
--cc=khali@linux-fr.org \
--cc=lethal@linux-sh.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.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.