Content-Type: multipart/mixed; boundary="===============1103411066446800086==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH] cdc_ncm: Implement the 32-bit version of NCM Transfer Block Date: Mon, 09 Mar 2020 09:31:45 +0800 Message-ID: <202003090944.ovsekr7Y%lkp@intel.com> In-Reply-To: <20200305203318.8980-1-bay@hackerdom.ru> List-Id: --===============1103411066446800086== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Alexander, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on usb/usb-testing] [also build test WARNING on linus/master v5.6-rc4 next-20200306] [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/Alexander-Bersenev/cdc_ncm= -Implement-the-32-bit-version-of-NCM-Transfer-Block/20200306-061934 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-= testing 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/net/usb/cdc_ncm.c:1175:24: sparse: sparse: incorrect type in ass= ignment (different base types) @@ expected restricted __le16 [usertype] = wLength @@ got restricted __le16 [usertype] wLength @@ drivers/net/usb/cdc_ncm.c:1175:24: sparse: expected restricted __le16= [usertype] wLength drivers/net/usb/cdc_ncm.c:1175:24: sparse: got restricted __le32 [use= rtype] vim +1175 drivers/net/usb/cdc_ncm.c 1123 = 1124 static struct usb_cdc_ncm_ndp32 *cdc_ncm_ndp32(struct cdc_ncm_ctx *c= tx, struct sk_buff *skb, __le32 sign, size_t reserve) 1125 { 1126 struct usb_cdc_ncm_ndp32 *ndp32 =3D NULL; 1127 struct usb_cdc_ncm_nth32 *nth32 =3D (void *)skb->data; 1128 size_t ndpoffset =3D le32_to_cpu(nth32->dwNdpIndex); 1129 = 1130 /* If NDP should be moved to the end of the NCM package, we can't f= ollow the 1131 * NTH32 header as we would normally do. NDP isn't written to the S= KB yet, and 1132 * the wNdpIndex field in the header is actually not consistent wit= h reality. It will be later. 1133 */ 1134 if (ctx->drvflags & CDC_NCM_FLAG_NDP_TO_END) { 1135 if (ctx->delayed_ndp32->dwSignature =3D=3D sign) 1136 return ctx->delayed_ndp32; 1137 = 1138 /* We can only push a single NDP to the end. Return 1139 * NULL to send what we've already got and queue this 1140 * skb for later. 1141 */ 1142 else if (ctx->delayed_ndp32->dwSignature) 1143 return NULL; 1144 } 1145 = 1146 /* follow the chain of NDPs, looking for a match */ 1147 while (ndpoffset) { 1148 ndp32 =3D (struct usb_cdc_ncm_ndp32 *)(skb->data + ndpoffset); 1149 if (ndp32->dwSignature =3D=3D sign) 1150 return ndp32; 1151 ndpoffset =3D le32_to_cpu(ndp32->dwNextNdpIndex); 1152 } 1153 = 1154 /* align new NDP */ 1155 if (!(ctx->drvflags & CDC_NCM_FLAG_NDP_TO_END)) 1156 cdc_ncm_align_tail(skb, ctx->tx_ndp_modulus, 0, ctx->tx_curr_size); 1157 = 1158 /* verify that there is room for the NDP and the datagram (reserve)= */ 1159 if ((ctx->tx_curr_size - skb->len - reserve) < ctx->max_ndp_size) 1160 return NULL; 1161 = 1162 /* link to it */ 1163 if (ndp32) 1164 ndp32->dwNextNdpIndex =3D cpu_to_le32(skb->len); 1165 else 1166 nth32->dwNdpIndex =3D cpu_to_le32(skb->len); 1167 = 1168 /* push a new empty NDP */ 1169 if (!(ctx->drvflags & CDC_NCM_FLAG_NDP_TO_END)) 1170 ndp32 =3D skb_put_zero(skb, ctx->max_ndp_size); 1171 else 1172 ndp32 =3D ctx->delayed_ndp32; 1173 = 1174 ndp32->dwSignature =3D sign; > 1175 ndp32->wLength =3D cpu_to_le32(sizeof(struct usb_cdc_ncm_ndp32) + s= izeof(struct usb_cdc_ncm_dpe32)); 1176 return ndp32; 1177 } 1178 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============1103411066446800086==--