llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [morimoto:renesas-lts/v6.18-rc5-2025-11-12-x5h-ironhide 28/39] drivers/mailbox/rcar-mfis-mailbox.c:153:32: warning: converting the result of '<<' to a boolean always evaluates to true
@ 2025-11-13  9:55 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-13  9:55 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: llvm, oe-kbuild-all, Masashi Ozaki, Vinh Nguyen

tree:   https://github.com/morimoto/linux renesas-lts/v6.18-rc5-2025-11-12-x5h-ironhide
head:   6aecb5521a24ea1461406564f89f4449840421dc
commit: b5e2040ad820fcafdfe92e964efde15f4e8a625a [28/39] mailbox: renesas: Support MFIS mailbox driver
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20251113/202511131723.vRI1WI6U-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251113/202511131723.vRI1WI6U-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511131723.vRI1WI6U-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/mailbox/rcar-mfis-mailbox.c:153:32: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
     153 |         if (!mfis_info_flag_has(info, MFIS_INFO_FLAGS_IRQ_NO_SUFFIX))
         |                                       ^
   drivers/mailbox/rcar-mfis-mailbox.c:29:42: note: expanded from macro 'MFIS_INFO_FLAGS_IRQ_NO_SUFFIX'
      29 | #define MFIS_INFO_FLAGS_IRQ_NO_SUFFIX   (1 << 0)
         |                                            ^
   1 warning generated.


vim +153 drivers/mailbox/rcar-mfis-mailbox.c

   143	
   144	#define IRQNAME_NUM 8
   145	static int mfis_init_mchan(struct device_node *node, struct device_node *ch,
   146				   const struct mfis_info *info, struct mfis_chan *mchan_top,
   147				   int idx, int n, int chan, const char **dir)
   148	{
   149		struct mfis_chan *mchan = mchan_top + (idx * NUM_DIRECTION) + n;
   150		char irqname[IRQNAME_NUM];
   151		char suffix = 0;
   152	
 > 153		if (!mfis_info_flag_has(info, MFIS_INFO_FLAGS_IRQ_NO_SUFFIX))
   154			suffix = mfis_irq_direction_suffix[n];
   155	
   156		/* ex) "ch0" or "ch0a" */
   157		scnprintf(irqname, IRQNAME_NUM, "ch%d%c", chan, suffix);
   158	
   159		/* use interrupt if it was RX */
   160		if (strncmp(dir[n], "rx", 2) == 0) {
   161			int irq = of_irq_get_byname(node, irqname);
   162	
   163			if (irq < 0)
   164				return irq;
   165	
   166			mchan->irq = irq;
   167		}
   168	
   169		mchan->chan = chan;
   170		mchan->ctrl = n;
   171	
   172		return 0;
   173	}
   174	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-13  9:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-13  9:55 [morimoto:renesas-lts/v6.18-rc5-2025-11-12-x5h-ironhide 28/39] drivers/mailbox/rcar-mfis-mailbox.c:153:32: warning: converting the result of '<<' to a boolean always evaluates to true kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).