[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <60f181d5-4e1e-f45b-bc94-73ec5eebb4d0@huawei.com>
Date: Thu, 13 Oct 2022 09:28:30 +0800
From: "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
CC: <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] ARM: Fix some check warnings of tool sparse
On 2022/10/11 10:13, Leizhen (ThunderTown) wrote:
>
>
> On 2022/10/11 0:05, Russell King (Oracle) wrote:
>> On Mon, Oct 10, 2022 at 05:53:45PM +0800, Zhen Lei wrote:
>>> Fix the following warnings:
>>> warning: incorrect type in initializer (different address spaces)
>>> expected unsigned short [noderef] __user *register __p
>>> got unsigned short [usertype] *
>>> warning: cast removes address space '__user' of expression
>>
>> I have a general principle that not all warnings should be fixed,
>> especially when it comes to sparse.
>
> OK, I got it.
>
>>
>> The aim is not to get to zero warnings - it's to get to a point where
>> the code is correct, and plastering the code with __force casts means
>> it isn't correct - you're just masking the warning.
>>
>> So no, I really don't like this. And I really don't like seeing
>> __force being used in open code in casts.
>
> OK, I will clear only the first warning and leave the second warning.
Sorry, Maybe I misunderstood. '__force casts' mentioned here may include
not only '(__force u16 *)', but also '(u16 __user *)'.
>
>>
>
--
Regards,
Zhen Lei
Powered by blists - more mailing lists