Message ID | 3d647e5c2f69c0cef461ef19004ec40b14e799ca.1585838678.git.mirq-linux@rere.qmqm.pl (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | power: supply: bq25890: fix and extend | expand |
Hi "Michał,
I love your patch! Perhaps something to improve:
[auto build test WARNING on power-supply/for-next]
[also build test WARNING on linus/master v5.6 next-20200403]
[cannot apply to linux/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Micha-Miros-aw/power-supply-bq25890-fix-and-extend/20200404-010738
base: https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/power/supply/bq25890_charger.c:692:16: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
692 | .properties = bq25890_power_supply_props,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/const +692 drivers/power/supply/bq25890_charger.c
4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 688
4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 689 static const struct power_supply_desc bq25890_power_supply_desc = {
4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 690 .name = "bq25890-charger",
4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 691 .type = POWER_SUPPLY_TYPE_USB,
4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 @692 .properties = bq25890_power_supply_props,
4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 693 .num_properties = ARRAY_SIZE(bq25890_power_supply_props),
4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 694 .get_property = bq25890_power_supply_get_property,
4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 695 };
4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 696
:::::: The code at line 692 was first introduced by commit
:::::: 4aeae9cb0dad117f055add68c48decaf489aecf3 power_supply: Add support for TI BQ25890 charger chip
:::::: TO: Laurentiu Palcu <laurentiu.palcu@intel.com>
:::::: CC: Sebastian Reichel <sre@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Hi "Michał, I love your patch! Perhaps something to improve: [auto build test WARNING on power-supply/for-next] [also build test WARNING on linus/master v5.6 next-20200403] [cannot apply to linux/master] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Micha-Miros-aw/power-supply-bq25890-fix-and-extend/20200404-010738 base: https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next reproduce: # apt-get install sparse # sparse version: v0.6.1-188-g79f7ac98-dirty make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <lkp@intel.com> sparse warnings: (new ones prefixed by >>) >> drivers/power/supply/bq25890_charger.c:692:23: sparse: sparse: incorrect type in initializer (different modifiers) @@ expected unsigned int enum power_supply_property *properties @@ got unsignunsigned int enum power_supply_property *properties @@ >> drivers/power/supply/bq25890_charger.c:692:23: sparse: expected unsigned int enum power_supply_property *properties >> drivers/power/supply/bq25890_charger.c:692:23: sparse: got unsigned int enum power_supply_property const * vim +692 drivers/power/supply/bq25890_charger.c 4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 688 4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 689 static const struct power_supply_desc bq25890_power_supply_desc = { 4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 690 .name = "bq25890-charger", 4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 691 .type = POWER_SUPPLY_TYPE_USB, 4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 @692 .properties = bq25890_power_supply_props, 4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 693 .num_properties = ARRAY_SIZE(bq25890_power_supply_props), 4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 694 .get_property = bq25890_power_supply_get_property, 4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 695 }; 4aeae9cb0dad11 drivers/power/bq25890_charger.c Laurentiu Palcu 2015-05-19 696 :::::: The code at line 692 was first introduced by commit :::::: 4aeae9cb0dad117f055add68c48decaf489aecf3 power_supply: Add support for TI BQ25890 charger chip :::::: TO: Laurentiu Palcu <laurentiu.palcu@intel.com> :::::: CC: Sebastian Reichel <sre@kernel.org> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c index f9f29edadddc..c4a69fd69f34 100644 --- a/drivers/power/supply/bq25890_charger.c +++ b/drivers/power/supply/bq25890_charger.c @@ -668,7 +668,7 @@ static int bq25890_hw_init(struct bq25890_device *bq) return 0; } -static enum power_supply_property bq25890_power_supply_props[] = { +static const enum power_supply_property bq25890_power_supply_props[] = { POWER_SUPPLY_PROP_MANUFACTURER, POWER_SUPPLY_PROP_MODEL_NAME, POWER_SUPPLY_PROP_STATUS,
Property list should not change, so mark it const. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> --- drivers/power/supply/bq25890_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)