Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH 09/16] xfs: convert timeouts to secs_to_jiffies()
       [not found] <20250128-converge-secs-to-jiffies-part-two-v1-9-9a6ecf0b2308@linux.microsoft.com>
@ 2025-01-30  5:51 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-30  5:51 UTC (permalink / raw)
  To: Easwar Hariharan; +Cc: llvm, oe-kbuild-all

Hi Easwar,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 9a87ce288fe30f268b3a598422fe76af9bb2c2d2]

url:    https://github.com/intel-lab-lkp/linux/commits/Easwar-Hariharan/coccinelle-misc-secs_to_jiffies-Patch-expressions-too/20250129-022410
base:   9a87ce288fe30f268b3a598422fe76af9bb2c2d2
patch link:    https://lore.kernel.org/r/20250128-converge-secs-to-jiffies-part-two-v1-9-9a6ecf0b2308%40linux.microsoft.com
patch subject: [PATCH 09/16] xfs: convert timeouts to secs_to_jiffies()
config: x86_64-buildonly-randconfig-006-20250129 (https://download.01.org/0day-ci/archive/20250130/202501301334.NB6NszQR-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250130/202501301334.NB6NszQR-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/202501301334.NB6NszQR-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/xfs/xfs_sysfs.c:572:31: warning: result of comparison of constant 9223372036854775807 with expression of type 'int' is always true [-Wtautological-constant-out-of-range-compare]
     572 |                 ASSERT(secs_to_jiffies(val) < LONG_MAX);
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
   fs/xfs/xfs_linux.h:224:10: note: expanded from macro 'ASSERT'
     224 |         (likely(expr) ? (void)0 : assfail(NULL, #expr, __FILE__, __LINE__))
         |          ~~~~~~~^~~~~
   include/linux/compiler.h:76:40: note: expanded from macro 'likely'
      76 | # define likely(x)      __builtin_expect(!!(x), 1)
         |                                             ^
   1 warning generated.


vim +/int +572 fs/xfs/xfs_sysfs.c

   549	
   550	static ssize_t
   551	retry_timeout_seconds_store(
   552		struct kobject	*kobject,
   553		const char	*buf,
   554		size_t		count)
   555	{
   556		struct xfs_error_cfg *cfg = to_error_cfg(kobject);
   557		int		ret;
   558		int		val;
   559	
   560		ret = kstrtoint(buf, 0, &val);
   561		if (ret)
   562			return ret;
   563	
   564		/* 1 day timeout maximum, -1 means infinite */
   565		if (val < -1 || val > 86400)
   566			return -EINVAL;
   567	
   568		if (val == -1)
   569			cfg->retry_timeout = XFS_ERR_RETRY_FOREVER;
   570		else {
   571			cfg->retry_timeout = secs_to_jiffies(val);
 > 572			ASSERT(secs_to_jiffies(val) < LONG_MAX);
   573		}
   574		return count;
   575	}
   576	XFS_SYSFS_ATTR_RW(retry_timeout_seconds);
   577	

-- 
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-01-30  5:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250128-converge-secs-to-jiffies-part-two-v1-9-9a6ecf0b2308@linux.microsoft.com>
2025-01-30  5:51 ` [PATCH 09/16] xfs: convert timeouts to secs_to_jiffies() 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