Messages in this thread | | | Date | Tue, 26 May 2020 12:46:31 +0800 | From | kbuild test robot <> | Subject | drivers/mfd/sprd-sc27xx-spi.c:59:23: warning: no previous prototype for 'sprd_pmic_detect_charger_type' |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 9cb1fd0efd195590b828b9b865421ad345a4a145 commit: 2a7e7274f3d43d2a072cab25c0035dc994903bb9 mfd: sc27xx: Add USB charger type detection support date: 8 weeks ago config: h8300-randconfig-r006-20200526 (attached as .config) compiler: h8300-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 2a7e7274f3d43d2a072cab25c0035dc994903bb9 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/mfd/sprd-sc27xx-spi.c:59:23: warning: no previous prototype for 'sprd_pmic_detect_charger_type' [-Wmissing-prototypes] 59 | enum usb_charger_type sprd_pmic_detect_charger_type(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/sprd_pmic_detect_charger_type +59 drivers/mfd/sprd-sc27xx-spi.c
58 > 59 enum usb_charger_type sprd_pmic_detect_charger_type(struct device *dev) 60 { 61 struct spi_device *spi = to_spi_device(dev); 62 struct sprd_pmic *ddata = spi_get_drvdata(spi); 63 const struct sprd_pmic_data *pdata = ddata->pdata; 64 enum usb_charger_type type; 65 u32 val; 66 int ret; 67 68 ret = regmap_read_poll_timeout(ddata->regmap, pdata->charger_det, val, 69 (val & SPRD_PMIC_CHG_DET_DONE), 70 SPRD_PMIC_CHG_DET_DELAY_US, 71 SPRD_PMIC_CHG_DET_TIMEOUT); 72 if (ret) { 73 dev_err(&spi->dev, "failed to detect charger type\n"); 74 return UNKNOWN_TYPE; 75 } 76 77 switch (val & SPRD_PMIC_CHG_TYPE_MASK) { 78 case SPRD_PMIC_CDP_TYPE: 79 type = CDP_TYPE; 80 break; 81 case SPRD_PMIC_DCP_TYPE: 82 type = DCP_TYPE; 83 break; 84 case SPRD_PMIC_SDP_TYPE: 85 type = SDP_TYPE; 86 break; 87 default: 88 type = UNKNOWN_TYPE; 89 break; 90 } 91 92 return type; 93 } 94 EXPORT_SYMBOL_GPL(sprd_pmic_detect_charger_type); 95
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |