Re: [PATCH 2/2] staging: greybus: refactor arche_platform_wd_irq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Khadija,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on staging/staging-next staging/staging-linus linus/master v6.3-rc4 next-20230330]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Khadija-Kamran/staging-greybus-add-a-single-exit-path-to-arche_platform_wd_irq/20230330-222140
patch link:    https://lore.kernel.org/r/96d04a4ff3d4a46293355f5afae3a8ece65f2c5b.1680185025.git.kamrankhadijadj%40gmail.com
patch subject: [PATCH 2/2] staging: greybus: refactor arche_platform_wd_irq()
config: microblaze-randconfig-r016-20230329 (https://download.01.org/0day-ci/archive/20230331/202303310037.mGo4pYNd-lkp@xxxxxxxxx/config)
compiler: microblaze-linux-gcc (GCC) 12.1.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://github.com/intel-lab-lkp/linux/commit/fd0907bb290e9a4f8b33d8c56ca14a49e3177de9
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Khadija-Kamran/staging-greybus-add-a-single-exit-path-to-arche_platform_wd_irq/20230330-222140
        git checkout fd0907bb290e9a4f8b33d8c56ca14a49e3177de9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=microblaze olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=microblaze SHELL=/bin/bash drivers/staging/greybus/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202303310037.mGo4pYNd-lkp@xxxxxxxxx/

All error/warnings (new ones prefixed by >>):

   drivers/staging/greybus/arche-platform.c: In function 'arche_platform_wd_irq':
>> drivers/staging/greybus/arche-platform.c:179:17: error: unknown type name 'got'
     179 |                 got out;
         |                 ^~~
>> drivers/staging/greybus/arche-platform.c:179:17: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
   drivers/staging/greybus/arche-platform.c:179:21: warning: unused variable 'out' [-Wunused-variable]
     179 |                 got out;
         |                     ^~~
   drivers/staging/greybus/arche-platform.c: At top level:
   drivers/staging/greybus/arche-platform.c:626:34: warning: 'arche_combined_id' defined but not used [-Wunused-const-variable=]
     626 | static const struct of_device_id arche_combined_id[] = {
         |                                  ^~~~~~~~~~~~~~~~~


vim +/got +179 drivers/staging/greybus/arche-platform.c

   152	
   153	static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
   154	{
   155		struct arche_platform_drvdata *arche_pdata = devid;
   156		irqreturn_t rc = IRQ_HANDLED;
   157		unsigned long flags;
   158	
   159		spin_lock_irqsave(&arche_pdata->wake_lock, flags);
   160	
   161		if (!gpiod_get_value(arche_pdata->wake_detect))
   162			goto falling;
   163	
   164		/* wake/detect rising */
   165	
   166		/*
   167		 * If wake/detect line goes high after low, within less than
   168		 * 30msec, then standby boot sequence is initiated, which is not
   169		 * supported/implemented as of now. So ignore it.
   170		 */
   171		if (arche_pdata->wake_detect_state != WD_STATE_BOOT_INIT)
   172			goto out;
   173	
   174		if (time_before(jiffies,
   175				arche_pdata->wake_detect_start +
   176				msecs_to_jiffies(WD_COLDBOOT_PULSE_WIDTH_MS))) {
   177			arche_platform_set_wake_detect_state(arche_pdata,
   178							     WD_STATE_IDLE);
 > 179			got out;
   180		}
   181	
   182		/* Check we are not in middle of irq thread already */
   183		if (arche_pdata->wake_detect_state !=
   184				WD_STATE_COLDBOOT_START) {
   185			arche_platform_set_wake_detect_state(arche_pdata,
   186							     WD_STATE_COLDBOOT_TRIG);
   187			rc = IRQ_WAKE_THREAD;
   188			goto out;
   189		}
   190	
   191	falling:
   192		/* wake/detect falling */
   193		if (arche_pdata->wake_detect_state == WD_STATE_IDLE) {
   194			arche_pdata->wake_detect_start = jiffies;
   195			/*
   196			 * In the beginning, when wake/detect goes low
   197			 * (first time), we assume it is meant for coldboot
   198			 * and set the flag. If wake/detect line stays low
   199			 * beyond 30msec, then it is coldboot else fallback
   200			 * to standby boot.
   201			 */
   202			arche_platform_set_wake_detect_state(arche_pdata,
   203							     WD_STATE_BOOT_INIT);
   204		}
   205	
   206	out:
   207		spin_unlock_irqrestore(&arche_pdata->wake_lock, flags);
   208	
   209		return rc;
   210	}
   211	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux