From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: Satyam Sharma <satyam@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Vojtech Pavlik <vojtech@ucw.cz>,
Johann Deneux <johann.deneux@gmail.com>,
linux-input@atrey.karlin.mff.cuni.cz,
linux-joystick@atrey.karlin.mff.cuni.cz
Subject: Re: [PATCH] input: Silence 'unused variable' warning in iforce joystick driver
Date: Fri, 31 Aug 2007 11:26:42 -0400 [thread overview]
Message-ID: <d120d5000708310826q7ddf3514w55b3f4f0cca599ca@mail.gmail.com> (raw)
In-Reply-To: <200708310050.03786.jesper.juhl@gmail.com>
Hi Jesper,
On 8/30/07, Jesper Juhl <jesper.juhl@gmail.com> wrote:
> On 31/08/2007, Satyam Sharma <satyam@infradead.org> wrote:
> ...
> >
> > Hmm, would this not still give a warning when JOYSTICK_IFORCE_USB=y?
>
> Arrgh, I messed that one up real good... Thank you for your keen eye Satyam :-)
>
>
> > [ I didn't know mixing code and declarations (not at top of statement
> > block) was accepted style in the kernel ... ]
> >
> It's not the common case, but this is certainly not the only place in the kernel where we do it.
>
>
> > IMHO either you should at least wrap that case inside a {} of its
> > own (so that the int status; is at top of a statement block), or else,
>
> Yeah, I should...
>
> > preferably, just add "__maybe_unused" to the first declaration that you
> > removed just now.
> >
>
> Here's an updated patch that actually works as intended.
>
I had a similar patch from Andrew Morton in my queue and it just got
merged. There should be no warning anymore.
--
Dmitry
prev parent reply other threads:[~2007-08-31 15:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-30 22:13 [PATCH] input: Silence 'unused variable' warning in iforce joystick driver Jesper Juhl
2007-08-30 22:57 ` Satyam Sharma
2007-08-30 22:50 ` Jesper Juhl
2007-08-31 15:26 ` Dmitry Torokhov [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=d120d5000708310826q7ddf3514w55b3f4f0cca599ca@mail.gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=jesper.juhl@gmail.com \
--cc=johann.deneux@gmail.com \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
--cc=linux-joystick@atrey.karlin.mff.cuni.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=satyam@infradead.org \
--cc=vojtech@ucw.cz \
/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;
as well as URLs for NNTP newsgroup(s).