[linusw-nomadik:ux500-janice-v5.18-rc1 18/21] drivers/input/misc/isa1200.c:171:6: warning: no previous prototype for 'isa1200_start'

kernel test robot lkp at intel.com
Tue Apr 5 19:01:48 PDT 2022


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ux500-janice-v5.18-rc1
head:   7d27ddbe075c07508ab045a63d23aeca798514ee
commit: 0baaba96c1a1116b9fc698a263657cb9b6ab8198 [18/21] Input: isa1200 - new driver for Immersion ISA1200
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220406/202204060931.Mht0l6l6-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 11.2.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
        # https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git/commit/?id=0baaba96c1a1116b9fc698a263657cb9b6ab8198
        git remote add linusw-nomadik https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git
        git fetch --no-tags linusw-nomadik ux500-janice-v5.18-rc1
        git checkout 0baaba96c1a1116b9fc698a263657cb9b6ab8198
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/input/misc/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

>> drivers/input/misc/isa1200.c:171:6: warning: no previous prototype for 'isa1200_start' [-Wmissing-prototypes]
     171 | void isa1200_start(struct isa1200 *isa)
         |      ^~~~~~~~~~~~~
>> drivers/input/misc/isa1200.c:228:6: warning: no previous prototype for 'isa1200_stop' [-Wmissing-prototypes]
     228 | void isa1200_stop(struct isa1200 *isa)
         |      ^~~~~~~~~~~~


vim +/isa1200_start +171 drivers/input/misc/isa1200.c

   170	
 > 171	void isa1200_start(struct isa1200 *isa)
   172	{
   173		const struct isa1200_config *cfg = isa->conf;
   174		u8 hctrl0;
   175		u8 hctrl1;
   176		u8 hctrl3;
   177	
   178		clk_prepare_enable(isa->clk);
   179		gpiod_set_value(isa->hen, 1);
   180		gpiod_set_value(isa->len, 1);
   181	
   182		udelay(200);
   183	
   184		regmap_write(isa->map, ISA1200_SCTRL, cfg->ldo_voltage);
   185	
   186		if (!cfg->pwm_in) {
   187			hctrl0 = ISA1200_HCTRL0_PWM_GEN_MODE;
   188			hctrl1 = ISA1200_HCTRL1_EXT_CLOCK;
   189		} else {
   190			hctrl0 = ISA1200_HCTRL0_PWM_INPUT_MODE;
   191			hctrl1 = 0;
   192		}
   193		hctrl0 |= cfg->clkdiv;
   194		hctrl1 |= ISA1200_HCTRL1_DAC_INVERT;
   195		if (cfg->erm)
   196			hctrl1 |= ISA1200_HCTRL1_ERM;
   197	
   198		regmap_write(isa->map, ISA1200_HCTRL0, hctrl0);
   199		regmap_write(isa->map, ISA1200_HCTRL1, hctrl1);
   200	
   201		/* Make sure to de-assert software reset */
   202		regmap_write(isa->map, ISA1200_HCTRL2, 0x00);
   203	
   204		/* PLL divisor */
   205		hctrl3 = ISA1200_HCTRL3_DEFAULT;
   206		hctrl3 |= (cfg->plldiv << ISA1200_HCTRL3_PLLDIV_SHIFT);
   207		regmap_write(isa->map, ISA1200_HCTRL3, hctrl3);
   208	
   209		/* Frequency */
   210		regmap_write(isa->map, ISA1200_HCTRL4, cfg->freq);
   211		/* Duty cycle */
   212		regmap_write(isa->map, ISA1200_HCTRL5, cfg->duty);
   213		/* Period */
   214		regmap_write(isa->map, ISA1200_HCTRL6, cfg->period);
   215	
   216		/* Turn on PWM generation in BIT(7) */
   217		hctrl0 |= ISA1200_HCTRL0_PWM_GEN_ENABLE;
   218		regmap_write(isa->map, ISA1200_HCTRL0, hctrl0);
   219	
   220		/*
   221		 * This is done in the vendor tree with the commment
   222		 * "Duty 0x64 == nForce 90", and no force feedback happens
   223		 * unless we do this.
   224		 */
   225		regmap_write(isa->map, ISA1200_HCTRL5, 0x64);
   226	}
   227	
 > 228	void isa1200_stop(struct isa1200 *isa)
   229	{
   230		regmap_write(isa->map, ISA1200_HCTRL0, 0);
   231		gpiod_set_value(isa->len, 0);
   232		gpiod_set_value(isa->hen, 0);
   233		clk_disable_unprepare(isa->clk);
   234	}
   235	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



More information about the linux-arm-kernel mailing list