Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1206780
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Heikki Krogerus <heikki.krogerus@linux.intel.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/5] net: rfkill: add rfkill_find_type function |
| Date | Thu, 13 Aug 2015 14:40:03 +0200 |
| Message-ID | <pWZXB-3o7-11@gated-at.bofh.it> (permalink) |
| References | <pU75g-2L3-5@gated-at.bofh.it> <pU75g-2L3-21@gated-at.bofh.it> <pWWZK-7z0-39@gated-at.bofh.it> |
| X-Original-To | Johannes Berg <johannes@sipsolutions.net> |
| X-Extloop1 | 1 |
| X-Ironport-Av | E=Sophos;i="5.15,670,1432623600"; d="scan'208";a="783398313" |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 54 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | "Rafael J. Wysocki" <rjw@rjwysocki.net>, Mika Westerberg <mika.westerberg@linux.intel.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org |
| X-Original-Date | Thu, 13 Aug 2015 15:37:48 +0300 |
| X-Original-Message-ID | <20150813123748.GB29796@kuha.fi.intel.com> |
| X-Original-References | <1438781947-7952-1-git-send-email-heikki.krogerus@linux.intel.com> <1438781947-7952-3-git-send-email-heikki.krogerus@linux.intel.com> <1439458066.2114.13.camel@sipsolutions.net> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1206780 |
Show key headers only | View raw
Hi,
On Thu, Aug 13, 2015 at 11:27:46AM +0200, Johannes Berg wrote:
> On Wed, 2015-08-05 at 16:39 +0300, Heikki Krogerus wrote:
> >
> > +static const char *rfkill_types[NUM_RFKILL_TYPES] = {
> > + [RFKILL_TYPE_WLAN] = "wlan",
> > + [RFKILL_TYPE_BLUETOOTH] = "bluetooth",
> > + [RFKILL_TYPE_UWB] = "ultrawideband",
> > + [RFKILL_TYPE_WIMAX] = "wimax",
> > + [RFKILL_TYPE_WWAN] = "wwan",
> > + [RFKILL_TYPE_GPS] = "gps",
> > + [RFKILL_TYPE_FM] = "fm",
> > + [RFKILL_TYPE_NFC] = "nfc",
> > +};
> > +
> > +enum rfkill_type rfkill_find_type(const char *name)
> > +{
> > + int i;
> > +
> > + BUILD_BUG_ON(NUM_RFKILL_TYPES != RFKILL_TYPE_NFC + 1);
> >
> That BUILD_BUG_ON() is now less useful - previously it pointed to the
> code that needed to change, now you're left wondering if you don't look
> up since it isn't quite that obvious from the code what this does.
>
> Something like
>
> BUILD_BUG_ON(rfkill_types[NUM_RFKILL_TYPES - 1] == NULL);
>
> would be better. As we only add here, that would be safe enough - I've
> done something similar in the past that a bit more complicated.
OK, I'll change it.
> With that and the static inline fixed (which maybe you could even
> remove) I'm fine with all these rfkill patches, but I'm not sure how to
> merge them since they affect all kinds of other trees. If desired, I
> can apply them, but an ACK from the tegra maintainer would be good :)
Andy and Mika are preparing some changes to the device property
handling. I'll wait for their proposal and prepare next version these
after that.
Thanks,
--
heikki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] net: rfkill: gpio: replace platform data with build-in property Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2015-08-05 15:40 +0200
[PATCH 1/5] device property: helper macros for property entry creation Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2015-08-05 15:40 +0200
Re: [PATCH 1/5] device property: helper macros for property entry creation Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-08-05 16:10 +0200
Re: [PATCH 1/5] device property: helper macros for property entry creation "Shevchenko, Andriy" <andriy.shevchenko@intel.com> - 2015-08-05 16:20 +0200
Re: [PATCH 1/5] device property: helper macros for property entry creation Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2015-08-06 09:50 +0200
Re: [PATCH 1/5] device property: helper macros for property entry creation "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-08-07 23:50 +0200
[PATCH 2/5] net: rfkill: add rfkill_find_type function Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2015-08-05 15:40 +0200
Re: [PATCH 2/5] net: rfkill: add rfkill_find_type function Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-08-05 16:10 +0200
Re: [PATCH 2/5] net: rfkill: add rfkill_find_type function Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2015-08-06 10:40 +0200
Re: [PATCH 2/5] net: rfkill: add rfkill_find_type function Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-08-06 11:30 +0200
Re: [PATCH 2/5] net: rfkill: add rfkill_find_type function Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-08-06 13:40 +0200
Re: [PATCH 2/5] net: rfkill: add rfkill_find_type function Johannes Berg <johannes@sipsolutions.net> - 2015-08-13 11:30 +0200
Re: [PATCH 2/5] net: rfkill: add rfkill_find_type function Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2015-08-13 14:40 +0200
[PATCH 5/5] net: rfkill: gpio: remove rfkill_gpio_platform_data Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2015-08-05 15:40 +0200
Re: [PATCH 5/5] net: rfkill: gpio: remove rfkill_gpio_platform_data Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-08-05 16:20 +0200
Re: [PATCH 5/5] net: rfkill: gpio: remove rfkill_gpio_platform_data Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2015-08-06 09:30 +0200
[PATCH 4/5] ARM: tegra: use build-in device properties with rfkill_gpio Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2015-08-05 15:50 +0200
[PATCH 3/5] net: rfkill: gpio: get the name and type from device property Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2015-08-05 15:50 +0200
csiph-web