Re: [PATCH v2 05/11] rtc: renesas-rtca3: Add driver for RTCA-3 available on Renesas RZ/G3S SoC

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

 



Hi Claudiu,

kernel test robot noticed the following build errors:

[auto build test ERROR on next-20240716]
[also build test ERROR on v6.10]
[cannot apply to geert-renesas-devel/next lee-mfd/for-mfd-next lee-mfd/for-mfd-fixes abelloni/rtc-next linus/master v6.10 v6.10-rc7 v6.10-rc6]
[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/Claudiu/dt-bindings-mfd-renesas-r9a08g045-vbattb-Document-VBATTB/20240716-190833
base:   next-20240716
patch link:    https://lore.kernel.org/r/20240716103025.1198495-6-claudiu.beznea.uj%40bp.renesas.com
patch subject: [PATCH v2 05/11] rtc: renesas-rtca3: Add driver for RTCA-3 available on Renesas RZ/G3S SoC
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20240719/202407191156.wJPjHtKG-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project ad154281230d83ee551e12d5be48bb956ef47ed3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240719/202407191156.wJPjHtKG-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407191156.wJPjHtKG-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/rtc/rtc-renesas-rtca3.c:433:3: error: cannot jump from this goto statement to its label
     433 |                 goto setup_failed;
         |                 ^
   drivers/rtc/rtc-renesas-rtca3.c:436:2: note: jump bypasses initialization of variable with __attribute__((cleanup))
     436 |         guard(spinlock_irqsave)(&priv->lock);
         |         ^
   include/linux/cleanup.h:167:15: note: expanded from macro 'guard'
     167 |         CLASS(_name, __UNIQUE_ID(guard))
         |                      ^
   include/linux/compiler.h:189:29: note: expanded from macro '__UNIQUE_ID'
     189 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
         |                             ^
   include/linux/compiler_types.h:84:22: note: expanded from macro '__PASTE'
      84 | #define __PASTE(a,b) ___PASTE(a,b)
         |                      ^
   include/linux/compiler_types.h:83:23: note: expanded from macro '___PASTE'
      83 | #define ___PASTE(a,b) a##b
         |                       ^
   <scratch space>:67:1: note: expanded from here
      67 | __UNIQUE_ID_guard738
         | ^
   drivers/rtc/rtc-renesas-rtca3.c:426:3: error: cannot jump from this goto statement to its label
     426 |                 goto setup_failed;
         |                 ^
   drivers/rtc/rtc-renesas-rtca3.c:436:2: note: jump bypasses initialization of variable with __attribute__((cleanup))
     436 |         guard(spinlock_irqsave)(&priv->lock);
         |         ^
   include/linux/cleanup.h:167:15: note: expanded from macro 'guard'
     167 |         CLASS(_name, __UNIQUE_ID(guard))
         |                      ^
   include/linux/compiler.h:189:29: note: expanded from macro '__UNIQUE_ID'
     189 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
         |                             ^
   include/linux/compiler_types.h:84:22: note: expanded from macro '__PASTE'
      84 | #define __PASTE(a,b) ___PASTE(a,b)
         |                      ^
   include/linux/compiler_types.h:83:23: note: expanded from macro '___PASTE'
      83 | #define ___PASTE(a,b) a##b
         |                       ^
   <scratch space>:67:1: note: expanded from here
      67 | __UNIQUE_ID_guard738
         | ^
   2 errors generated.


vim +433 drivers/rtc/rtc-renesas-rtca3.c

   376	
   377	static int rtca3_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm)
   378	{
   379		struct rtca3_priv *priv = dev_get_drvdata(dev);
   380		struct rtc_time *tm = &wkalrm->time;
   381		u8 rcr1, tmp;
   382		int ret;
   383	
   384		scoped_guard(spinlock_irqsave, &priv->lock) {
   385			tmp = readb(priv->base + RTCA3_RCR2);
   386			if (!(tmp & RTCA3_RCR2_START))
   387				return -EPERM;
   388	
   389			/* Disable AIE to prevent false interrupts. */
   390			rcr1 = readb(priv->base + RTCA3_RCR1);
   391			rcr1 &= ~RTCA3_RCR1_AIE;
   392			writeb(rcr1, priv->base + RTCA3_RCR1);
   393			ret = readb_poll_timeout_atomic(priv->base + RTCA3_RCR1, tmp,
   394							!(tmp & RTCA3_RCR1_AIE),
   395							10, RTCA3_DEFAULT_TIMEOUT_US);
   396			if (ret)
   397				return ret;
   398	
   399			/* Set the time and enable the alarm. */
   400			writeb(RTCA3_AR_ENB | bin2bcd(tm->tm_sec), priv->base + RTCA3_RSECAR);
   401			writeb(RTCA3_AR_ENB | bin2bcd(tm->tm_min), priv->base + RTCA3_RMINAR);
   402			writeb(RTCA3_AR_ENB | bin2bcd(tm->tm_hour), priv->base + RTCA3_RHRAR);
   403			writeb(RTCA3_AR_ENB | bin2bcd(tm->tm_wday), priv->base + RTCA3_RWKAR);
   404			writeb(RTCA3_AR_ENB | bin2bcd(tm->tm_mday), priv->base + RTCA3_RDAYAR);
   405			writeb(RTCA3_AR_ENB | bin2bcd(tm->tm_mon + 1), priv->base + RTCA3_RMONAR);
   406	
   407			writew(bin2bcd(tm->tm_year % 100), priv->base + RTCA3_RYRAR);
   408			writeb(RTCA3_AR_ENB, priv->base + RTCA3_RYRAREN);
   409	
   410			/* Make sure we can read back the counters. */
   411			rtca3_prepare_cntalrm_regs_for_read(priv, false);
   412	
   413			/* Need to wait for 2 * 1/64 periodic interrupts to be generated. */
   414			atomic_set(&priv->alrm_sstep, RTCA3_ALRM_SSTEP_INIT);
   415			reinit_completion(&priv->set_alarm_completion);
   416	
   417			/* Enable periodic interrupt. */
   418			rcr1 |= RTCA3_RCR1_PIE;
   419			writeb(rcr1, priv->base + RTCA3_RCR1);
   420			ret = readb_poll_timeout_atomic(priv->base + RTCA3_RCR1, tmp,
   421							(tmp & RTCA3_RCR1_PIE),
   422							10, RTCA3_IRQSET_TIMEOUT_US);
   423		}
   424	
   425		if (ret)
   426			goto setup_failed;
   427	
   428		/* Wait for the 2 * 1/64 periodic interrupts. */
   429		ret = wait_for_completion_interruptible_timeout(&priv->set_alarm_completion,
   430								msecs_to_jiffies(500));
   431		if (ret <= 0) {
   432			ret = -ETIMEDOUT;
 > 433			goto setup_failed;
   434		}
   435	
   436		guard(spinlock_irqsave)(&priv->lock);
   437	
   438		ret = rtca3_alarm_irq_enable_helper(priv, wkalrm->enabled);
   439		atomic_set(&priv->alrm_sstep, RTCA3_ALRM_SSTEP_DONE);
   440	
   441		return ret;
   442	
   443	setup_failed:
   444		scoped_guard(spinlock_irqsave, &priv->lock) {
   445			/*
   446			 * Disable PIE to avoid interrupt storm in case HW needed more than
   447			 * specified timeout for setup.
   448			 */
   449			writeb(rcr1 & ~RTCA3_RCR1_PIE, priv->base + RTCA3_RCR1);
   450			readb_poll_timeout_atomic(priv->base + RTCA3_RCR1, tmp, !(tmp & ~RTCA3_RCR1_PIE),
   451						  10, RTCA3_DEFAULT_TIMEOUT_US);
   452			atomic_set(&priv->alrm_sstep, RTCA3_ALRM_SSTEP_DONE);
   453		}
   454	
   455		return ret;
   456	}
   457	

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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux