From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2898972516301290885==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH 4/4] crypto: marvell: enable OcteonTX cpt options for build Date: Thu, 05 Mar 2020 13:00:41 +0800 Message-ID: <202003051203.lacJPc0F%lkp@intel.com> In-Reply-To: <1583324716-23633-5-git-send-email-schalla@marvell.com> List-Id: --===============2898972516301290885== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Srujana, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on cryptodev/master] [also build test WARNING on crypto/master linus/master v5.6-rc4 next-202003= 04] [cannot apply to sparc-next/master] [if your patch is applied to the wrong git tree, please drop us a note to h= elp improve the system. BTW, we also suggest to use '--base' option to specify = the base tree in git format-patch, please see https://stackoverflow.com/a/37406= 982] url: https://github.com/0day-ci/linux/commits/Srujana-Challa/Add-Support= -for-Marvell-OcteonTX-Cryptographic/20200305-041058 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2= .6.git master reproduce: # apt-get install sparse # sparse version: v0.6.1-174-g094d5a94-dirty make ARCH=3Dx86_64 allmodconfig make C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) >> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse= : cast to restricted __be32 >> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse= : cast to restricted __be32 >> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse= : cast to restricted __be32 >> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse= : cast to restricted __be32 >> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse= : cast to restricted __be32 >> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse= : cast to restricted __be32 >> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:881:45: sparse: sparse= : incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:881:45: sparse: exp= ected unsigned long long [usertype] >> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:881:45: sparse: got= restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:885:45: sparse: sparse= : incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:885:45: sparse: exp= ected unsigned short [usertype] >> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:885:45: sparse: got= restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse= : cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse= : cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse= : cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse= : cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse= : cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse= : cast to restricted __be32 >> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:1465:75: sparse: spars= e: Using plain integer as NULL pointer -- >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:365:29: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:365:29: sparse: ex= pected unsigned short [assigned] [usertype] opcode >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:365:29: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:366:29: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:366:29: sparse: ex= pected unsigned short [assigned] [usertype] param1 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:366:29: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:367:29: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:367:29: sparse: ex= pected unsigned short [assigned] [usertype] param2 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:367:29: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:368:29: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:368:29: sparse: ex= pected unsigned short [assigned] [usertype] dlen drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:368:29: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:371:24: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:371:24: sparse: ex= pected unsigned long long [assigned] [usertype] u64 >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:371:24: sparse: go= t restricted __be64 [usertype] >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: spars= e: cast to restricted __be64 >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: spars= e: cast to restricted __be64 >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: spars= e: cast to restricted __be64 >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: spars= e: cast to restricted __be64 >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: spars= e: cast to restricted __be64 >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: spars= e: cast to restricted __be64 >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: spars= e: cast to restricted __be64 >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: spars= e: cast to restricted __be64 >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: spars= e: cast to restricted __be64 >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: spars= e: cast to restricted __be64 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:209:33: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:209:33: sparse: ex= pected unsigned long long [usertype] >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:209:33: sparse: go= t restricted __be64 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse: ex= pected unsigned short [usertype] len0 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse: ex= pected unsigned short [usertype] len1 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse: ex= pected unsigned short [usertype] len2 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse: ex= pected unsigned short [usertype] len3 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse: ex= pected unsigned long long [usertype] ptr0 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse: go= t restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse: ex= pected unsigned long long [usertype] ptr1 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse: go= t restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse: ex= pected unsigned long long [usertype] ptr2 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse: go= t restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse: ex= pected unsigned long long [usertype] ptr3 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse: go= t restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: spars= e: incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: ex= pected unsigned short [usertype] len2 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: spars= e: incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: ex= pected unsigned long long [usertype] ptr2 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: go= t restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: spars= e: incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: ex= pected unsigned short [usertype] len1 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: spars= e: incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: ex= pected unsigned long long [usertype] ptr1 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: go= t restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: spars= e: incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: ex= pected unsigned short [usertype] len0 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: spars= e: incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: ex= pected unsigned long long [usertype] ptr0 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: go= t restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse: ex= pected unsigned short [usertype] len0 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse: ex= pected unsigned short [usertype] len1 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse: ex= pected unsigned short [usertype] len2 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse: ex= pected unsigned short [usertype] len3 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse: ex= pected unsigned long long [usertype] ptr0 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse: go= t restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse: ex= pected unsigned long long [usertype] ptr1 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse: go= t restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse: ex= pected unsigned long long [usertype] ptr2 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse: go= t restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse: spars= e: incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse: ex= pected unsigned long long [usertype] ptr3 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse: go= t restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: spars= e: incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: ex= pected unsigned short [usertype] len2 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: spars= e: incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: ex= pected unsigned long long [usertype] ptr2 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: go= t restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: spars= e: incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: ex= pected unsigned short [usertype] len1 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: spars= e: incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: ex= pected unsigned long long [usertype] ptr1 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: go= t restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: spars= e: incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: ex= pected unsigned short [usertype] len0 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: go= t restricted __be16 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: spars= e: incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: ex= pected unsigned long long [usertype] ptr0 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: go= t restricted __be64 [usertype] -- >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:114:6: sparse: sparse: = symbol 'otx_cpt_aead_callback' was not declared. Should it be static? >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:174:6: sparse: sparse: = symbol 'otx_cpt_skcipher_callback' was not declared. Should it be static? >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1405:17: sparse: sparse= : symbol 'otx_cpt_aeads' was not declared. Should it be static? >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse: sparse:= incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse: expe= cted unsigned long long [usertype] >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse: got = restricted __be64 [usertype] >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse: sparse:= incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse: expe= cted unsigned long long [usertype] >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse: got = restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse: sparse:= incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse: expe= cted unsigned int [usertype] >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse: got = restricted __be32 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse: sparse:= incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse: expe= cted unsigned int [usertype] >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse: got = restricted __be32 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:705:24: sparse: sparse:= incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:705:24: sparse: expe= cted unsigned long long [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:705:24: sparse: got = restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1012:31: sparse: sparse= : incorrect type in assignment (different base types) >> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1012:31: sparse: exp= ected unsigned long long [usertype] flags drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1012:31: sparse: got= restricted __be64 [usertype] drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1032:34: sparse: sparse= : incorrect type in assignment (different base types) drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1032:34: sparse: exp= ected unsigned long long [usertype] flags drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1032:34: sparse: got= restricted __be64 [usertype] Please review and possibly fold the followup patch. vim +306 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c 614cde32c669af SrujanaChalla 2020-03-04 281 = 614cde32c669af SrujanaChalla 2020-03-04 282 static int process_tar_file(s= truct device *dev, 614cde32c669af SrujanaChalla 2020-03-04 283 struct tar_arch_info_t= *tar_arch, char *filename, 614cde32c669af SrujanaChalla 2020-03-04 284 const u8 *data, u32 si= ze) 614cde32c669af SrujanaChalla 2020-03-04 285 { 614cde32c669af SrujanaChalla 2020-03-04 286 struct tar_ucode_info_t *tar= _info; 614cde32c669af SrujanaChalla 2020-03-04 287 struct otx_cpt_ucode_hdr *uc= ode_hdr; 614cde32c669af SrujanaChalla 2020-03-04 288 int ucode_type, ucode_size; 614cde32c669af SrujanaChalla 2020-03-04 289 = 614cde32c669af SrujanaChalla 2020-03-04 290 /* 614cde32c669af SrujanaChalla 2020-03-04 291 * If size is less than micr= ocode header size then don't report 614cde32c669af SrujanaChalla 2020-03-04 292 * an error because it might= not be microcode file, just process 614cde32c669af SrujanaChalla 2020-03-04 293 * next file from archive 614cde32c669af SrujanaChalla 2020-03-04 294 */ 614cde32c669af SrujanaChalla 2020-03-04 295 if (size < sizeof(struct otx= _cpt_ucode_hdr)) 614cde32c669af SrujanaChalla 2020-03-04 296 return 0; 614cde32c669af SrujanaChalla 2020-03-04 297 = 614cde32c669af SrujanaChalla 2020-03-04 298 ucode_hdr =3D (struct otx_cp= t_ucode_hdr *) data; 614cde32c669af SrujanaChalla 2020-03-04 299 /* 614cde32c669af SrujanaChalla 2020-03-04 300 * If microcode version can'= t be found don't report an error 614cde32c669af SrujanaChalla 2020-03-04 301 * because it might not be m= icrocode file, just process next file 614cde32c669af SrujanaChalla 2020-03-04 302 */ 614cde32c669af SrujanaChalla 2020-03-04 303 if (get_ucode_type(ucode_hdr= , &ucode_type)) 614cde32c669af SrujanaChalla 2020-03-04 304 return 0; 614cde32c669af SrujanaChalla 2020-03-04 305 = 614cde32c669af SrujanaChalla 2020-03-04 @306 ucode_size =3D ntohl(ucode_h= dr->code_length) * 2; 614cde32c669af SrujanaChalla 2020-03-04 307 if (!ucode_size || (size < r= ound_up(ucode_size, 16) + 614cde32c669af SrujanaChalla 2020-03-04 308 sizeof(struct otx_cpt_uc= ode_hdr) + OTX_CPT_UCODE_SIGN_LEN)) { 614cde32c669af SrujanaChalla 2020-03-04 309 dev_err(dev, "Ucode %s inva= lid size", filename); 614cde32c669af SrujanaChalla 2020-03-04 310 return -EINVAL; 614cde32c669af SrujanaChalla 2020-03-04 311 } 614cde32c669af SrujanaChalla 2020-03-04 312 = 614cde32c669af SrujanaChalla 2020-03-04 313 tar_info =3D kzalloc(sizeof(= struct tar_ucode_info_t), GFP_KERNEL); 614cde32c669af SrujanaChalla 2020-03-04 314 if (!tar_info) 614cde32c669af SrujanaChalla 2020-03-04 315 return -ENOMEM; 614cde32c669af SrujanaChalla 2020-03-04 316 = 614cde32c669af SrujanaChalla 2020-03-04 317 tar_info->ucode_ptr =3D data; 614cde32c669af SrujanaChalla 2020-03-04 318 set_ucode_filename(&tar_info= ->ucode, filename); 614cde32c669af SrujanaChalla 2020-03-04 319 memcpy(tar_info->ucode.ver_s= tr, ucode_hdr->ver_str, 614cde32c669af SrujanaChalla 2020-03-04 320 OTX_CPT_UCODE_VER_STR= _SZ); 614cde32c669af SrujanaChalla 2020-03-04 321 tar_info->ucode.ver_num =3D = ucode_hdr->ver_num; 614cde32c669af SrujanaChalla 2020-03-04 322 tar_info->ucode.type =3D uco= de_type; 614cde32c669af SrujanaChalla 2020-03-04 323 tar_info->ucode.size =3D uco= de_size; 614cde32c669af SrujanaChalla 2020-03-04 324 list_add_tail(&tar_info->lis= t, &tar_arch->ucodes); 614cde32c669af SrujanaChalla 2020-03-04 325 = 614cde32c669af SrujanaChalla 2020-03-04 326 return 0; 614cde32c669af SrujanaChalla 2020-03-04 327 } 614cde32c669af SrujanaChalla 2020-03-04 328 = :::::: The code at line 306 was first introduced by commit :::::: 614cde32c669aff28aefeef2e1f7a982d4e640bc drivers: crypto: add suppor= t for OCTEON TX CPT engine :::::: TO: SrujanaChalla :::::: CC: 0day robot --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============2898972516301290885==--