Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1248823
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] power: bq27xxx_battery: fix defined but not used warnings |
| Date | 2015-10-16 16:50 +0200 |
| Message-ID | <qkeut-Sc-5@gated-at.bofh.it> (permalink) |
| References | <qkdI6-89o-15@gated-at.bofh.it> <qkdI6-89o-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Friday 16 October 2015 15:44:12 Sebastian Reichel wrote: > If BQ27XXX is enabled, but neither I2C based initialization, nor > platform based initialization are activated, bq27xxx_powersupply_init > and bq27xxx_powersupply_unregister are defined but not used. > > This configuration doesn't make sense, but there is no easy way > to make it unavailable in the build system, so just mark the > functions as __maybe_unused instead. > What about? #if defined(CONFIG_1) || defined(CONFIG_2) #define NEED_POWER_SUPPLY #endif And then wrap power supply code into #ifdef NEED_POWER_SUPPLY? -- Pali Rohár pali.rohar@gmail.com -- 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/3] power: bq27xxx: Fix multiple defined but not used warnings Sebastian Reichel <sre@kernel.org> - 2015-10-16 16:00 +0200
[PATCH 1/3] power: bq27xxx_battery: fix platform probe Sebastian Reichel <sre@kernel.org> - 2015-10-16 16:00 +0200
Re: [PATCH 1/3] power: bq27xxx_battery: fix platform probe Pali Rohár <pali.rohar@gmail.com> - 2015-10-16 16:50 +0200
Re: [PATCH 1/3] power: bq27xxx_battery: fix platform probe "Andrew F. Davis" <afd@ti.com> - 2015-10-16 17:00 +0200
[PATCH 3/3] power: bq27xxx_battery: fix defined but not used warnings Sebastian Reichel <sre@kernel.org> - 2015-10-16 16:00 +0200
Re: [PATCH 3/3] power: bq27xxx_battery: fix defined but not used warnings Pali Rohár <pali.rohar@gmail.com> - 2015-10-16 16:50 +0200
Re: [PATCH 3/3] power: bq27xxx_battery: fix defined but not used warnings "Andrew F. Davis" <afd@ti.com> - 2015-10-16 17:10 +0200
csiph-web