Re: [PATCH] mpt3sas: Fix for regression caused due to cf6bf9710c patch

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

 



On Fri, Jun 29, 2018 at 5:58 PM, Chaitra P B
<chaitra.basappa@xxxxxxxxxxxx> wrote:
>  "scsi: mpt3sas: Bug fix for big endian systems"
>
> Above patch with commit id "cf6bf9710cabba1fe94a4349f4eb8db623c77ebc" was
> posted to fix sparse warnings. While posting this patch it was assumed that
> readl() & writel() APIs internally calls le32_to_cpu() & cpu_to_le32() APIs
> respectively.

> Looks like it is not true for all architecture

Oh, what a mess. Looking at code comments I could imagine why it's done so...
Sad.

>  and hence
> this patch is reverting back only those hunks which removed le32_to_cpu()
> API call while using readl() API & cpu_to_le32() API call while using
> writel() API.

Can't you move to raw variants at the same time to be more clear with
intentions?
It would work on all architectures in the same way and won't trigger
sparse warnings.

As an example:

> -       writeq(b, addr);
> +       writeq(cpu_to_le64(b), addr);

/* Not all architectures has a writeq() equivalent to the below (sparc64) */
__raw_writeq(...)

-- 
With Best Regards,
Andy Shevchenko



[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