From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C657C433F5 for ; Tue, 11 Oct 2022 02:15:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:CC:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=fPFtqL+PCVsid8SMYfqk0EdjTK4MPqiuwxh59E6mMq4=; b=v1wJnuso2eTH0y0xC4wRyFrpFh lqI6/6Mrhdqfw0eL3hN0IbYTbNp9+4uJpbgQ/vcELzyE+adlJqB2jvwWmZ3mE8HvYgyzQLNLy+fyd 8o2zOCTMksSW/8K7QMZGHYX48oYVe9zb6JdhgIq8xBgcP9AlkuPhN5U/MTY868+qtMLX0Zr+MJm3X jocl83j7HNjykiGJJTXlv/C2ipVD5ozsJQm+8AJtZLMoP24eY/aCcV4CsTqNBbBFpZrHxtnShP/JT sNc067rKSseTC4wm6mtZHjYkfFJn8CVjqPxwuoReRo516qppj0p3IsbWcAfc72un6w/07nWp1nSz8 R8WH21yg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oi4n5-002zBq-KD; Tue, 11 Oct 2022 02:14:43 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oi4n1-002z9W-Lq for linux-arm-kernel@lists.infradead.org; Tue, 11 Oct 2022 02:14:41 +0000 Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MmfNl09xHzHtqQ; Tue, 11 Oct 2022 10:09:27 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 11 Oct 2022 10:14:03 +0800 Received: from [10.174.178.55] (10.174.178.55) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 11 Oct 2022 10:14:02 +0800 Subject: Re: [PATCH v2 1/2] ARM: Fix some check warnings of tool sparse To: "Russell King (Oracle)" CC: , References: <20221010095346.1957-1-thunder.leizhen@huawei.com> <20221010095346.1957-2-thunder.leizhen@huawei.com> From: "Leizhen (ThunderTown)" Message-ID: <3c8c29a8-a757-8f9d-23c6-d5790ce01611@huawei.com> Date: Tue, 11 Oct 2022 10:13:50 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [10.174.178.55] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221010_191439_912274_6AD621B9 X-CRM114-Status: GOOD ( 12.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. > -- Regards, Zhen Lei _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel