From: Ivo van Doorn <ivdoorn@gmail.com>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rfkill: detect bogus double-registering
Date: Wed, 23 Jul 2008 20:12:13 +0200 [thread overview]
Message-ID: <200807232012.13985.IvDoorn@gmail.com> (raw)
In-Reply-To: <20080723174129.GB11009@khazad-dum.debian.net>
On Wednesday 23 July 2008, Henrique de Moraes Holschuh wrote:
> On Wed, 23 Jul 2008, Johannes Berg wrote:
> > On Wed, 2008-07-23 at 12:27 -0300, Henrique de Moraes Holschuh wrote:
> > > On Wed, 23 Jul 2008, Johannes Berg wrote:
> > > > > + list_for_each_entry(p, &rfkill_list, node) {
> > > > > + if (p == rfkill)
> > > > > + return -EEXIST;
> > > > > + set_bit(p->type, &seen);
> > > >
> > > > You should WARN_ON so it can get fixed.
> > >
> > > I'd rather make rfkill_register __must_check, actually. With or without
> > > WARN_ON.
> > >
> > > In fact, lots of stuff in rfkill should be __must_check. Ivo, what do you
> > > think? Add __must_check? Add WARN_ON? Add both?
> >
> > Do both then. __must_check annotations get ignored regularly, or
> > "handled" like this:
> >
> > if (...)
> > // nothing we can do.
>
> Ah, that gives you heavy spiked LART rights to the head of whomever does it
> if he is wrong about it. You should fail to load the module or something
> like that if you are going to run half-broken without rfkill support.
>
> I will add the WARN_ON. __must_check will wait for Ivo's reply, as you
> said, it is often ignored.
I usually dislike WARN_ON, but like Johannes said, this one is a bug in the driver
which must be fixed. When you submit the final version of the patch having
the WARN_ON would be best.
I am however a fan on sparse annotation and using __must_check, but since you
already stated that more functions might need it, it doesn't have to be in this patch
and could wait for a later patch. (But it is fine if you want to add it in this patch as well,
off course. ;) )
Ivo
next prev parent reply other threads:[~2008-07-23 17:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-23 1:04 [GIT PATCH] RFC: next batch of rfkill changes Henrique de Moraes Holschuh
2008-07-23 1:04 ` [PATCH] rfkill: detect bogus double-registering Henrique de Moraes Holschuh
2008-07-23 3:41 ` Johannes Berg
2008-07-23 15:27 ` Henrique de Moraes Holschuh
2008-07-23 16:30 ` Johannes Berg
2008-07-23 17:41 ` Henrique de Moraes Holschuh
2008-07-23 18:12 ` Ivo van Doorn [this message]
2008-07-23 1:04 ` [PATCH] rfkill: add default global states Henrique de Moraes Holschuh
2008-07-23 18:28 ` Ivo van Doorn
2008-07-23 18:42 ` Henrique de Moraes Holschuh
2008-07-23 19:20 ` Ivo van Doorn
2008-07-23 1:04 ` [PATCH] rfkill: add master_switch_mode functionality Henrique de Moraes Holschuh
2008-07-23 18:39 ` Ivo van Doorn
2008-07-23 19:37 ` Henrique de Moraes Holschuh
2008-07-23 1:04 ` [PATCH] rfkill: add EPO lock to rfkill-input Henrique de Moraes Holschuh
2008-07-23 18:44 ` Ivo van Doorn
2008-07-23 19:01 ` Henrique de Moraes Holschuh
2008-07-23 19:28 ` Ivo van Doorn
2008-07-23 1:04 ` [PATCH] rfkill: rename rfkill_mutex to rfkill_global_mutex Henrique de Moraes Holschuh
2008-07-23 18:44 ` Ivo van Doorn
2008-07-23 1:04 ` [PATCH] rfkill: rate-limit rfkill-input workqueue usage Henrique de Moraes Holschuh
2008-07-23 18:46 ` Ivo van Doorn
2008-07-23 19:43 ` Dmitry Torokhov
2008-07-23 20:27 ` Henrique de Moraes Holschuh
2008-07-23 20:39 ` Dmitry Torokhov
2008-07-23 1:12 ` [GIT PATCH] RFC: next batch of rfkill changes Henrique de Moraes Holschuh
2008-07-23 18:08 ` Ivo van Doorn
2008-07-23 19:09 ` Henrique de Moraes Holschuh
2008-08-01 18:11 ` John W. Linville
2008-08-01 19:35 ` Henrique de Moraes Holschuh
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=200807232012.13985.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=hmh@hmh.eng.br \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/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.