Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sharath Srinivasan <sharath.srinivasan@oracle.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	LUCI Bot <vijayendra.suman@oracle.com>,
	Gerd Rausch <gerd.rausch@oracle.com>
Subject: [jlayton:uek-localio 1954/2262] net/rds/rds.h:1279:41: warning: result of comparison of constant 9223372036854775807 with expression of type 'unsigned long' is always true
Date: Sat, 24 May 2025 18:16:38 +0800	[thread overview]
Message-ID: <202505241812.Se3iJnIA-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git uek-localio
head:   65b0dc6bb1f5c18e63d8ee9ea1cca997456a81a9
commit: 73a9aa78a055a18eac4ee5e4b143b40a4e5e5fcc [1954/2262] net/rds: mod reconnect delay on sendmsg()
config: arm-randconfig-003-20250524 (https://download.01.org/0day-ci/archive/20250524/202505241812.Se3iJnIA-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250524/202505241812.Se3iJnIA-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/202505241812.Se3iJnIA-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from net/rds/tcp_stats.c:37:
   net/rds/rds.h:1034:22: error: no member named 'net' in 'possible_net_t'
    1034 |                         return sk->sk_net.net->ns.inum;
         |                                ~~~~~~~~~~ ^
>> net/rds/rds.h:1279:41: warning: result of comparison of constant 9223372036854775807 with expression of type 'unsigned long' is always true [-Wtautological-constant-out-of-range-compare]
    1279 |                    (cp->cp_up_or_down_w.timer.expires < KTIME_MAX) &&
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
   1 warning and 1 error generated.
--
   In file included from net/rds/tcp.c:40:
   net/rds/rds.h:1034:22: error: no member named 'net' in 'possible_net_t'
    1034 |                         return sk->sk_net.net->ns.inum;
         |                                ~~~~~~~~~~ ^
>> net/rds/rds.h:1279:41: warning: result of comparison of constant 9223372036854775807 with expression of type 'unsigned long' is always true [-Wtautological-constant-out-of-range-compare]
    1279 |                    (cp->cp_up_or_down_w.timer.expires < KTIME_MAX) &&
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
   In file included from net/rds/tcp.c:40:
   In file included from net/rds/rds.h:12:
   include/uapi/linux/rds.h:280:18: warning: field peer_addr within 'struct rds6_info_tcp_socket' is less aligned than 'struct in6_addr' and is usually due to 'struct rds6_info_tcp_socket' being packed, which can lead to unaligned accesses [-Wunaligned-access]
     280 |         struct in6_addr peer_addr;
         |                         ^
   2 warnings and 1 error generated.
--
   In file included from net/rds/cong.c:38:
   net/rds/rds.h:1034:22: error: no member named 'net' in 'possible_net_t'
    1034 |                         return sk->sk_net.net->ns.inum;
         |                                ~~~~~~~~~~ ^
>> net/rds/rds.h:1279:41: warning: result of comparison of constant 9223372036854775807 with expression of type 'unsigned long' is always true [-Wtautological-constant-out-of-range-compare]
    1279 |                    (cp->cp_up_or_down_w.timer.expires < KTIME_MAX) &&
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
   net/rds/cong.c:264:21: error: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'const void *' [-Wint-conversion]
     264 |                             virt_to_page(page_addrs[i]),
         |                                          ^~~~~~~~~~~~~
   arch/arm/include/asm/memory.h:384:53: note: expanded from macro 'virt_to_page'
     384 | #define virt_to_page(kaddr)     pfn_to_page(virt_to_pfn(kaddr))
         |                                                         ^~~~~
   include/asm-generic/memory_model.h:52:27: note: expanded from macro '__pfn_to_page'
      52 | ({      unsigned long __pfn = (pfn);                    \
         |                                ^~~
   arch/arm/include/asm/memory.h:290:53: note: passing argument to parameter 'p' here
     290 | static inline unsigned long virt_to_pfn(const void *p)
         |                                                     ^
   1 warning and 2 errors generated.
--
   In file included from net/rds/rdma.c:38:
   In file included from net/rds/trace.h:19:
   net/rds/rds.h:1034:22: error: no member named 'net' in 'possible_net_t'
    1034 |                         return sk->sk_net.net->ns.inum;
         |                                ~~~~~~~~~~ ^
>> net/rds/rds.h:1279:41: warning: result of comparison of constant 9223372036854775807 with expression of type 'unsigned long' is always true [-Wtautological-constant-out-of-range-compare]
    1279 |                    (cp->cp_up_or_down_w.timer.expires < KTIME_MAX) &&
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
   net/rds/rdma.c:603:27: warning: variable 'local_vec' set but not used [-Wunused-but-set-variable]
     603 |         struct rds_iovec __user *local_vec;
         |                                  ^
   2 warnings and 1 error generated.
--
   In file included from net/rds/send.c:38:
   net/rds/rds.h:1034:22: error: no member named 'net' in 'possible_net_t'
    1034 |                         return sk->sk_net.net->ns.inum;
         |                                ~~~~~~~~~~ ^
>> net/rds/rds.h:1279:41: warning: result of comparison of constant 9223372036854775807 with expression of type 'unsigned long' is always true [-Wtautological-constant-out-of-range-compare]
    1279 |                    (cp->cp_up_or_down_w.timer.expires < KTIME_MAX) &&
         |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
   net/rds/send.c:1380:18: warning: variable 'rns' set but not used [-Wunused-but-set-variable]
    1380 |         struct rds_net *rns;
         |                         ^
   2 warnings and 1 error generated.


vim +1279 net/rds/rds.h

  1267	
  1268	static inline bool rds_cond_queue_reconnect_work(struct rds_conn_path *cp, unsigned long delay)
  1269	{
  1270		unsigned long mod_delay = max(delay,
  1271					      msecs_to_jiffies(rds_sysctl_reconnect_max_jiffies));
  1272	
  1273		if (!test_and_set_bit(RDS_RECONNECT_PENDING, &cp->cp_flags)) {
  1274			rds_queue_delayed_work(cp, cp->cp_wq, &cp->cp_up_or_down_w,
  1275					       delay, "reconnect work");
  1276			return true;
  1277		} else if (!test_bit(RDS_SHUTDOWN_WORK_QUEUED, &cp->cp_flags) &&
  1278			   (cp->cp_up_or_down_w.timer.expires > 0) &&
> 1279			   (cp->cp_up_or_down_w.timer.expires < KTIME_MAX) &&
  1280			   time_after(cp->cp_up_or_down_w.timer.expires,
  1281				      jiffies + mod_delay)) {
  1282			/* mod_delayed_work due to an immediate sendmsg()
  1283			 * by always allowing shortening the delay,
  1284			 * if the existing reconnect timer expires later
  1285			 * than reconnect_max_delay_ms (1s).
  1286			 */
  1287			rds_mod_delayed_work(cp, cp->cp_wq, &cp->cp_up_or_down_w,
  1288					     mod_delay, "reconnect work");
  1289			return true;
  1290		} else {
  1291			return false;
  1292		}
  1293	}
  1294	

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

                 reply	other threads:[~2025-05-24 10:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202505241812.Se3iJnIA-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gerd.rausch@oracle.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sharath.srinivasan@oracle.com \
    --cc=vijayendra.suman@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox