Hi Fengguang, On Sun, 2014-01-19 at 06:26 +0800, kbuild test robot wrote: > tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next > head: 6b25d5f6835db78c093ed6d120e6e405dc1aee06 > commit: 0fad717576dbdd615f1c1500da483f16861c5096 [32/44] target/file: Add DIF protection init/format support > reproduce: make C=1 CF=-D__CHECK_ENDIAN__ > > > sparse warnings: (new ones prefixed by >>) > > drivers/target/target_core_file.c:280:33: sparse: incorrect type in assignment (different address spaces) > drivers/target/target_core_file.c:280:33: expected void [noderef] <asn:1>*iov_base > drivers/target/target_core_file.c:280:33: got void * > drivers/target/target_core_file.c:287:42: sparse: incorrect type in argument 2 (different address spaces) > drivers/target/target_core_file.c:287:42: expected struct iovec const [noderef] <asn:1>*<noident> > drivers/target/target_core_file.c:287:42: got struct iovec * > drivers/target/target_core_file.c:289:41: sparse: incorrect type in argument 2 (different address spaces) > drivers/target/target_core_file.c:289:41: expected struct iovec const [noderef] <asn:1>*<noident> > drivers/target/target_core_file.c:289:41: got struct iovec * > drivers/target/target_core_file.c:458:33: sparse: incorrect type in assignment (different address spaces) > drivers/target/target_core_file.c:458:33: expected void [noderef] <asn:1>*iov_base > drivers/target/target_core_file.c:458:33: got unsigned char *[assigned] buf > drivers/target/target_core_file.c:465:32: sparse: incorrect type in argument 2 (different address spaces) > drivers/target/target_core_file.c:465:32: expected struct iovec const [noderef] <asn:1>*<noident> > drivers/target/target_core_file.c:465:32: got struct iovec * > drivers/target/target_core_file.c:533:13: sparse: incorrect type in assignment (different base types) > drivers/target/target_core_file.c:533:13: expected int [signed] ret > drivers/target/target_core_file.c:533:13: got restricted sense_reason_t > drivers/target/target_core_file.c:535:24: sparse: incorrect type in return expression (different base types) > drivers/target/target_core_file.c:535:24: expected restricted sense_reason_t > drivers/target/target_core_file.c:535:24: got int [signed] ret > >> drivers/target/target_core_file.c:749:33: sparse: incorrect type in assignment (different base types) > drivers/target/target_core_file.c:749:33: expected unsigned short [unsigned] [short] [usertype] <noident> > drivers/target/target_core_file.c:749:33: got restricted __be16 [usertype] <noident> > >> drivers/target/target_core_file.c:750:33: sparse: incorrect type in assignment (different base types) > drivers/target/target_core_file.c:750:33: expected unsigned int [unsigned] [usertype] <noident> > drivers/target/target_core_file.c:750:33: got restricted __be32 [usertype] <noident> > > vim +749 drivers/target/target_core_file.c > > 743 { > 744 unsigned char *p = buf; > 745 int i; > 746 > 747 for (i = 0; i < unit_size; i += dev->prot_length) { > 748 *((u16 *)&p[0]) = 0xffff; > > 749 *((u16 *)&p[2]) = cpu_to_be16(app_tag); > 750 *((u32 *)&p[4]) = cpu_to_be32(*ref_tag); > 751 > 752 if (inc_reftag) > 753 (*ref_tag)++; > > --- Fixing up these two sparse warning with the following patch: diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c index 23442b2..cbd3462 100644 --- a/drivers/target/target_core_file.c +++ b/drivers/target/target_core_file.c @@ -865,8 +865,8 @@ static void fd_init_format_buf(struct se_device *dev, unsigned char *buf, for (i = 0; i < unit_size; i += dev->prot_length) { *((u16 *)&p[0]) = 0xffff; - *((u16 *)&p[2]) = cpu_to_be16(app_tag); - *((u32 *)&p[4]) = cpu_to_be32(*ref_tag); + *((__be16 *)&p[2]) = cpu_to_be16(app_tag); + *((__be32 *)&p[4]) = cpu_to_be32(*ref_tag); if (inc_reftag) (*ref_tag)++; Thank you, --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html