Re: [PATCH 01/15] mpt3sas: Fixed warnings.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2018-03-30 at 15:07 +0530, Chaitra P B wrote:
> This patch fixes sparse warnings observed during compilation.

It's great that you have had a look at the warnings reported by sparse.
 
> -	if (sgel->FlagsLength &
> +	if (le32_to_cpu(sgel->FlagsLength) &

This change is more than a warning fix: this change modifies the behavior
of this driver on big endian systems. Please make it clear in both the patch
title and also in the patch description that this patch is a bug fix for big
endian systems.

Additionally, not all warnings reported by sparse have been addressed. Can
you also have a look at the following warnings:

$ make M=drivers/scsi/mpt3sas C=2
  CHECK   drivers/scsi/mpt3sas/mpt3sas_base.c
drivers/scsi/mpt3sas/mpt3sas_base.c:3878:32: warning: incorrect type in assignment (different base types)
drivers/scsi/mpt3sas/mpt3sas_base.c:3878:32:    expected restricted __le32 [usertype] ImageSize
drivers/scsi/mpt3sas/mpt3sas_base.c:3878:32:    got unsigned long [unsigned] [assigned] [usertype] data_length
drivers/scsi/mpt3sas/mpt3sas_base.c:3903:63: warning: incorrect type in assignment (different base types)
drivers/scsi/mpt3sas/mpt3sas_base.c:3903:63:    expected restricted __le32 [usertype] Word
drivers/scsi/mpt3sas/mpt3sas_base.c:3903:63:    got unsigned int [unsigned] [usertype] <noident>
drivers/scsi/mpt3sas/mpt3sas_base.c:3906:41: warning: restricted __le32 degrades to integer
drivers/scsi/mpt3sas/mpt3sas_base.c:3906:41: warning: restricted __le32 degrades to integer
drivers/scsi/mpt3sas/mpt3sas_base.c:3906:41: warning: restricted __le32 degrades to integer
drivers/scsi/mpt3sas/mpt3sas_base.c:3906:41: warning: restricted __le32 degrades to integer
  CHECK   drivers/scsi/mpt3sas/mpt3sas_config.c
  CHECK   drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/mpt3sas/mpt3sas_scsih.c:7375:37: warning: incorrect type in assignment (different base types)
drivers/scsi/mpt3sas/mpt3sas_scsih.c:7375:37:    expected restricted __le16 [usertype] EnclosureHandle
drivers/scsi/mpt3sas/mpt3sas_scsih.c:7375:37:    got unsigned short [unsigned] [usertype] <noident>
drivers/scsi/mpt3sas/mpt3sas_scsih.c:7380:59: warning: incorrect type in argument 2 (different base types)
drivers/scsi/mpt3sas/mpt3sas_scsih.c:7380:59:    expected unsigned short [unsigned] [usertype] handle
drivers/scsi/mpt3sas/mpt3sas_scsih.c:7380:59:    got restricted __le16 [usertype] EnclosureHandle
drivers/scsi/mpt3sas/mpt3sas_scsih.c:7396:43: warning: incorrect type in argument 5 (different base types)
drivers/scsi/mpt3sas/mpt3sas_scsih.c:7396:43:    expected unsigned int [unsigned] [usertype] handle
drivers/scsi/mpt3sas/mpt3sas_scsih.c:7396:43:    got restricted __le16 [usertype] EnclosureHandle
drivers/scsi/mpt3sas/mpt3sas_scsih.c:8499:55: warning: incorrect type in argument 2 (different base types)
drivers/scsi/mpt3sas/mpt3sas_scsih.c:8499:55:    expected unsigned short [unsigned] [usertype] handle
drivers/scsi/mpt3sas/mpt3sas_scsih.c:8499:55:    got restricted __le16 [usertype] EnclosureHandle
drivers/scsi/mpt3sas/mpt3sas_scsih.c:9701:25: warning: cast to restricted __le32

Thanks,

Bart.











[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux