Bart,
 Agreed and patches will be posted with below changes.

Thanks,
 Chaitra


-----Original Message-----
From: Bart Van Assche [mailto:[email protected]]
Sent: Friday, March 30, 2018 10:05 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected];
[email protected]
Subject: Re: [PATCH 11/15] mpt3sas: Report Firmware Package Version from HBA
Driver.

On Fri, 2018-03-30 at 15:07 +0530, Chaitra P B wrote:
> +                                     pr_info(MPT3SAS_FMT "FW Package Version"
> +                                     "(%02d.%02d.%02d.%02d)\n",
> +                                     ioc->name,
> +                                     ((FWImgHdr->PackageVersion.Word)
> +                                                     & 0xFF000000) >> 24,
> +                                     ((FWImgHdr->PackageVersion.Word)
> +                                                     & 0x00FF0000) >> 16,
> +                                     ((FWImgHdr->PackageVersion.Word)
> +                                                     & 0x0000FF00) >> 8,
> +                                     (FWImgHdr->PackageVersion.Word)
> +                                                     & 0x000000FF);

Since FWImgHdr->PackageVersion.Word has type __le32 I don't think that the
above code will work correctly on big endian systems. Please use the Dev,
Unit, Minor and Major members of MPI2_VERSION_STRUCT instead of open-coding
access to these members.

Thanks,

Bart.

Reply via email to