From: kernel test robot <lkp@intel.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: kbuild-all@lists.01.org,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Ben Widawsky <ben.widawsky@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
linux-kernel@vger.kernel.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: [cxl-cxl:pending 10/11] drivers/cxl/pci.c:1302:34: sparse: sparse: cast to restricted __le64
Date: Tue, 10 Aug 2021 11:10:22 +0800 [thread overview]
Message-ID: <202108101115.sshGZAew-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3564 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git pending
head: 427832674f6e2413c21ca2271ec945a720608ff2
commit: f2e82407d7df984ef4369bd9a8cf749991db87a0 [10/11] cxl/mem: Account for partitionable space in ram/pmem ranges
config: i386-randconfig-s002-20210809 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git/commit/?id=f2e82407d7df984ef4369bd9a8cf749991db87a0
git remote add cxl-cxl https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git
git fetch --no-tags cxl-cxl pending
git checkout f2e82407d7df984ef4369bd9a8cf749991db87a0
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/cxl/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/cxl/pci.c:1302:34: sparse: sparse: cast to restricted __le64
drivers/cxl/pci.c:1303:36: sparse: sparse: cast to restricted __le64
drivers/cxl/pci.c:1304:32: sparse: sparse: cast to restricted __le64
drivers/cxl/pci.c:1305:34: sparse: sparse: cast to restricted __le64
vim +1302 drivers/cxl/pci.c
1265
1266 /**
1267 * cxl_mem_get_partition_info - Get partition info
1268 * @cxlm: The device to act on
1269 * @active_volatile_bytes: returned active volatile capacity; in bytes
1270 * @active_persistent_bytes: returned active persistent capacity; in bytes
1271 * @next_volatile_bytes: return next volatile capacity; in bytes
1272 * @next_persistent_bytes: return next persistent capacity; in bytes
1273 *
1274 * Retrieve the current partition info for the device specified. The active
1275 * values are the current capacity in bytes. If not 0, the 'next' values are
1276 * the pending values, in bytes, which take affect on next cold reset.
1277 *
1278 * Return: 0 if no error: or the result of the mailbox command.
1279 *
1280 * See CXL @8.2.9.5.2.1 Get Partition Info
1281 */
1282 static int cxl_mem_get_partition_info(struct cxl_mem *cxlm,
1283 u64 *active_volatile_bytes,
1284 u64 *active_persistent_bytes,
1285 u64 *next_volatile_bytes,
1286 u64 *next_persistent_bytes)
1287 {
1288 struct cxl_mbox_get_partition_info {
1289 u64 active_volatile_cap;
1290 u64 active_persistent_cap;
1291 u64 next_volatile_cap;
1292 u64 next_persistent_cap;
1293 } __packed pi;
1294 int rc;
1295
1296 rc = cxl_mem_mbox_send_cmd(cxlm, CXL_MBOX_OP_GET_PARTITION_INFO,
1297 NULL, 0, &pi, sizeof(pi));
1298
1299 if (rc)
1300 return rc;
1301
> 1302 *active_volatile_bytes = le64_to_cpu(pi.active_volatile_cap);
1303 *active_persistent_bytes = le64_to_cpu(pi.active_persistent_cap);
1304 *next_volatile_bytes = le64_to_cpu(pi.next_volatile_cap);
1305 *next_persistent_bytes = le64_to_cpu(pi.next_volatile_cap);
1306
1307 *active_volatile_bytes *= CXL_CAPACITY_MULTIPLIER;
1308 *active_persistent_bytes *= CXL_CAPACITY_MULTIPLIER;
1309 *next_volatile_bytes *= CXL_CAPACITY_MULTIPLIER;
1310 *next_persistent_bytes *= CXL_CAPACITY_MULTIPLIER;
1311
1312 return 0;
1313 }
1314
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32288 bytes --]
reply other threads:[~2021-08-10 3:11 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=202108101115.sshGZAew-lkp@intel.com \
--to=lkp@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=ben.widawsky@intel.com \
--cc=dan.j.williams@intel.com \
--cc=ira.weiny@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vishal.l.verma@intel.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
Powered by JetHome