From: kernel test robot <lkp@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [djiang:cxl/fwctl 23/28] drivers/cxl/features.c:60:10: warning: expression which evaluates to zero treated as a null pointer constant of type 'struct cxl_feat_entry *'
Date: Sat, 14 Dec 2024 13:17:05 +0800 [thread overview]
Message-ID: <202412141339.84yarl3c-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djiang/linux.git cxl/fwctl
head: c3c1ca00092765212f4eb49d2aaffb2003beb33b
commit: 7f7c30b7dbd79802299899bb011fe4e37a30c12c [23/28] cxl: Add support for fwctl RPC command to enable CXL feature commands
config: i386-buildonly-randconfig-004-20241214 (https://download.01.org/0day-ci/archive/20241214/202412141339.84yarl3c-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/20241214/202412141339.84yarl3c-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/202412141339.84yarl3c-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/cxl/features.c:5:
In file included from include/linux/pci.h:1650:
In file included from include/linux/dmapool.h:14:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:2213:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/cxl/features.c:60:10: warning: expression which evaluates to zero treated as a null pointer constant of type 'struct cxl_feat_entry *' [-Wnon-literal-null-conversion]
60 | return false;
| ^~~~~
drivers/cxl/features.c:64:10: warning: expression which evaluates to zero treated as a null pointer constant of type 'struct cxl_feat_entry *' [-Wnon-literal-null-conversion]
64 | return false;
| ^~~~~
3 warnings generated.
vim +60 drivers/cxl/features.c
51
52 static struct cxl_feat_entry *
53 get_support_feature_info(struct cxl_features_state *cfs,
54 const struct fwctl_rpc_cxl *rpc_in)
55 {
56 struct cxl_feat_entry *feat;
57 uuid_t uuid;
58
59 if (rpc_in->op_size < sizeof(uuid))
> 60 return false;
61
62 if (copy_from_user(&uuid, u64_to_user_ptr(rpc_in->in_payload),
63 sizeof(uuid)))
64 return false;
65
66 for (int i = 0; i < cfs->num_features; i++) {
67 feat = &cfs->entries[i];
68 if (uuid_equal(&uuid, &feat->uuid))
69 return feat;
70 }
71
72 return ERR_PTR(-ENOENT);
73 }
74
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-12-14 5:17 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=202412141339.84yarl3c-lkp@intel.com \
--to=lkp@intel.com \
--cc=dave.jiang@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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