From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1028415445979722558==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [RFC 7/7] nvme: add support for enhanced metadata Date: Tue, 25 Jan 2022 06:23:35 +0800 Message-ID: <202201250552.LY0QkQNT-lkp@intel.com> In-Reply-To: <20220124160107.1683901-8-kbusch@kernel.org> List-Id: --===============1028415445979722558== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Keith, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on axboe-block/for-next] [also build test WARNING on linux/master linus/master v5.17-rc1 next-202201= 24] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Keith-Busch/64-bit-data-in= tegrity-field-support/20220125-000232 base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.g= it for-next config: x86_64-randconfig-s021-20220124 (https://download.01.org/0day-ci/ar= chive/20220125/202201250552.LY0QkQNT-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-dirty # https://github.com/0day-ci/linux/commit/15e965a414da565fcf7d7aa95= 8a9850bb714db17 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Keith-Busch/64-bit-data-integrity-= field-support/20220125-000232 git checkout 15e965a414da565fcf7d7aa958a9850bb714db17 # save the config file to linux build tree mkdir build_dir make W=3D1 C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=3D= build_dir ARCH=3Dx86_64 SHELL=3D/bin/bash drivers/nvme/host/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/nvme/host/core.c:1805:17: sparse: sparse: cast from restricted _= _le32 >> drivers/nvme/host/core.c:1805:15: sparse: sparse: incorrect type in assi= gnment (different base types) @@ expected unsigned int [usertype] elbaf= @@ got restricted __le32 [usertype] @@ drivers/nvme/host/core.c:1805:15: sparse: expected unsigned int [use= rtype] elbaf drivers/nvme/host/core.c:1805:15: sparse: got restricted __le32 [use= rtype] vim +1805 drivers/nvme/host/core.c 1773 = 1774 static int nvme_init_ms(struct nvme_ns *ns, struct nvme_id_ns *id) 1775 { 1776 bool first =3D id->dps & NVME_NS_DPS_PI_FIRST; 1777 unsigned lbaf =3D nvme_lbaf_index(id->flbas); 1778 struct nvme_ctrl *ctrl =3D ns->ctrl; 1779 struct nvme_command c =3D { }; 1780 struct nvme_id_ns_nvm *nvm; 1781 u8 pi_size =3D 0; 1782 int ret =3D 0; 1783 u32 elbaf; 1784 = 1785 ns->ms =3D le16_to_cpu(id->lbaf[lbaf].ms); 1786 if (!(ctrl->ctratt & NVME_CTRL_ATTR_ELBAS)) { 1787 pi_size =3D sizeof(struct t10_pi_tuple); 1788 ns->guard_type =3D NVME_NVM_NS_16B_GUARD; 1789 goto set_pi; 1790 } 1791 = 1792 nvm =3D kzalloc(sizeof(*nvm), GFP_KERNEL); 1793 if (!nvm) 1794 return -ENOMEM; 1795 = 1796 c.identify.opcode =3D nvme_admin_identify; 1797 c.identify.nsid =3D cpu_to_le32(ns->head->ns_id); 1798 c.identify.cns =3D NVME_ID_CNS_CS_NS; 1799 c.identify.csi =3D NVME_CSI_NVM; 1800 = 1801 ret =3D nvme_submit_sync_cmd(ns->ctrl->admin_q, &c, nvm, sizeof(*nv= m)); 1802 if (ret) 1803 goto free_data; 1804 = > 1805 elbaf =3D cpu_to_le32(nvm->elbaf[lbaf]); 1806 = 1807 /* no support for storage tag formats right now */ 1808 if (nvme_elbaf_sts(elbaf)) 1809 goto free_data; 1810 = 1811 ns->guard_type =3D nvme_elbaf_guard_type(elbaf); 1812 switch (ns->guard_type) { 1813 case NVME_NVM_NS_64B_GUARD: 1814 pi_size =3D sizeof(struct nvme_crc64_pi_tuple); 1815 break; 1816 case NVME_NVM_NS_16B_GUARD: 1817 pi_size =3D sizeof(struct t10_pi_tuple); 1818 break; 1819 default: 1820 break; 1821 } 1822 = 1823 free_data: 1824 kfree(nvm); 1825 set_pi: 1826 if (pi_size && (first || ns->ms =3D=3D pi_size)) 1827 ns->pi_type =3D id->dps & NVME_NS_DPS_PI_MASK; 1828 else 1829 ns->pi_type =3D 0; 1830 = 1831 return ret; 1832 } 1833 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============1028415445979722558==--