From: Greg KH <gregkh@suse.de>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: linux-kernel@vger.kernel.org,
David Brownell <dbrownell@users.sourceforge.net>
Subject: Re: [PATCH 0/2] Annotate gpio-configuration with __must_check
Date: Tue, 4 Jan 2011 13:34:14 -0800 [thread overview]
Message-ID: <20110104213414.GA6774@suse.de> (raw)
In-Reply-To: <20110104212916.GA14436@pengutronix.de>
On Tue, Jan 04, 2011 at 10:29:16PM +0100, Wolfram Sang wrote:
> On Tue, Jan 04, 2011 at 12:27:18PM -0800, Greg KH wrote:
> > On Tue, Jan 04, 2011 at 05:51:06PM +0100, Wolfram Sang wrote:
> > > Here is a small series generating a lot of warnings, especially in board
> > > bringup-files. Still, I think it is worthwhile to be strict about checking
> > > return values of gpio-configuration-functions. My suggestion to keep the noise
> > > a bit lower is to put it into linux-next for one cycle and then merge it for
> > > 2.6.39? That should give people some time to fix the issues in time. Looking
> > > forward to comments.
> >
> > It's ok to add this type of thing, but please, go through and fix the
> > warnings at the same time. Otherwise it's a bit rude to force others to
> > fix their code for something that you did.
>
> Yeah, I understand. I was a "victim" of the patch causing all those "key not in
> .data" messages back then. So, I actually did start a coccinelle-script fixing
> the issues. I examined one sub-directory using a CPU/SoC I know relatively
> well. I had to learn that even then, it is pretty hard to determine what
> exactly to do if gpio_request() fails. For example, an unavailable GPIO being
> the write-protect-pin for SD-cards might be simply ignored, maybe a warning
> printed and the card will be rw by default. Another GPIO might be a chip-select
> of a device I have never heard of before. It might be crucial and board_init
> should fail if it cannot be requested. Or not. Things get worse for
> architectures I never used before. This is why I think it is really better to
> let people do the fixups who have/understand the hardware in question.
> Otherwise the fixups could indeed be more harmful than helpful.
Sure, they could be more harmful, but at least try. Make the patches
up, submit them to the maintainers, and if they are wrong, they will be
the best to fix it up properly.
> If this is still too rude for your taste, then what about a mechanism similar
> to DEBUG_SECTION_MISMATCH?
No, that's still annoying :)
thanks,
greg k-h
next prev parent reply other threads:[~2011-01-04 22:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-04 16:51 [PATCH 0/2] Annotate gpio-configuration with __must_check Wolfram Sang
2011-01-04 16:51 ` [PATCH 1/2] gpiolib: annotate gpio-intialization " Wolfram Sang
2011-01-04 16:51 ` [PATCH 2/2] gpiolib: add missing functions to generic fallback Wolfram Sang
2011-01-04 20:27 ` [PATCH 0/2] Annotate gpio-configuration with __must_check Greg KH
2011-01-04 21:29 ` Wolfram Sang
2011-01-04 21:34 ` Greg KH [this message]
2011-01-04 23:05 ` Wolfram Sang
2011-01-04 23:44 ` Greg KH
2011-01-05 11:18 ` Mark Brown
2011-01-05 18:57 ` Wolfram Sang
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=20110104213414.GA6774@suse.de \
--to=gregkh@suse.de \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=w.sang@pengutronix.de \
/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