From: "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] ARM: Fix some check warnings of tool sparse
Date: Thu, 13 Oct 2022 09:28:30 +0800 [thread overview]
Message-ID: <60f181d5-4e1e-f45b-bc94-73ec5eebb4d0@huawei.com> (raw)
In-Reply-To: <3c8c29a8-a757-8f9d-23c6-d5790ce01611@huawei.com>
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-13 1:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 9:53 [PATCH v2 0/2] ARM: Make the dumped instructions are consistent with the disassembled ones Zhen Lei
2022-10-10 9:53 ` [PATCH v2 1/2] ARM: Fix some check warnings of tool sparse Zhen Lei
2022-10-10 10:20 ` Ard Biesheuvel
2022-10-10 10:58 ` Leizhen (ThunderTown)
2022-10-10 11:06 ` Ard Biesheuvel
2022-10-10 16:08 ` Russell King (Oracle)
2022-10-10 16:14 ` Ard Biesheuvel
2022-10-10 16:17 ` Russell King (Oracle)
2022-10-11 2:29 ` Leizhen (ThunderTown)
2022-10-13 10:51 ` Russell King (Oracle)
2022-10-13 11:34 ` Leizhen (ThunderTown)
2022-11-28 8:39 ` Leizhen (ThunderTown)
2022-10-10 16:05 ` Russell King (Oracle)
2022-10-11 2:13 ` Leizhen (ThunderTown)
2022-10-13 1:28 ` Leizhen (ThunderTown) [this message]
2022-10-10 9:53 ` [PATCH v2 2/2] ARM: Make the dumped instructions are consistent with the disassembled ones Zhen Lei
2022-10-10 10:10 ` Ard Biesheuvel
2022-10-10 10:46 ` Leizhen (ThunderTown)
2022-10-10 11:07 ` Ard Biesheuvel
2022-10-10 11:29 ` Leizhen (ThunderTown)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=60f181d5-4e1e-f45b-bc94-73ec5eebb4d0@huawei.com \
--to=thunder.leizhen@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).