From patchwork Tue Jun 13 02:16:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "GONG, Ruiqi" X-Patchwork-Id: 692820 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D451C88CB4 for ; Tue, 13 Jun 2023 02:12:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229733AbjFMCM6 (ORCPT ); Mon, 12 Jun 2023 22:12:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbjFMCM5 (ORCPT ); Mon, 12 Jun 2023 22:12:57 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EA651718; Mon, 12 Jun 2023 19:12:56 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4QgBsc2QNyz4f3tP1; Tue, 13 Jun 2023 10:12:52 +0800 (CST) Received: from ubuntu20.huawei.com (unknown [10.67.174.33]) by APP1 (Coremail) with SMTP id cCh0CgBXxS+j0IdkeBHAKw--.56443S2; Tue, 13 Jun 2023 10:12:53 +0800 (CST) From: "GONG, Ruiqi" To: Geert Uytterhoeven Cc: Linus Walleij , linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, gongruiqi1@huawei.com Subject: [PATCH] pinctrl: renesas: remove checker warnings: x | !y Date: Tue, 13 Jun 2023 10:16:43 +0800 Message-Id: <20230613021643.3330661-1-gongruiqi@huaweicloud.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM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5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Eliminate the following Sparse reports when building with C=1: drivers/pinctrl/renesas/pinctrl-rzn1.c:187:52: warning: dubious: x | !y drivers/pinctrl/renesas/pinctrl-rzn1.c:193:52: warning: dubious: x | !y Signed-off-by: GONG, Ruiqi --- drivers/pinctrl/renesas/pinctrl-rzn1.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzn1.c b/drivers/pinctrl/renesas/pinctrl-rzn1.c index 374b9f281324..2391a316d5c5 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzn1.c +++ b/drivers/pinctrl/renesas/pinctrl-rzn1.c @@ -184,13 +184,15 @@ static void rzn1_hw_set_lock(struct rzn1_pinctrl *ipctl, u8 lock, u8 value) * address | 1. */ if (lock & LOCK_LEVEL1) { - u32 val = ipctl->lev1_protect_phys | !(value & LOCK_LEVEL1); + u32 val = ipctl->lev1_protect_phys | + (value & LOCK_LEVEL1 ? 0 : 1); writel(val, &ipctl->lev1->status_protect); } if (lock & LOCK_LEVEL2) { - u32 val = ipctl->lev2_protect_phys | !(value & LOCK_LEVEL2); + u32 val = ipctl->lev2_protect_phys | + (value & LOCK_LEVEL2 ? 0 : 1); writel(val, &ipctl->lev2->status_protect); }