Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp173556imm; Thu, 20 Sep 2018 21:08:18 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ3wk98CTOG5B84iIiVRtT/Pq1bA9G4bVfBfRaW/i5KUE/LwV1NeFAe3N5IZpKkvdUgkxoj X-Received: by 2002:a17:902:1121:: with SMTP id d30-v6mr41172785pla.250.1537502898085; Thu, 20 Sep 2018 21:08:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537502898; cv=none; d=google.com; s=arc-20160816; b=ss63/yPWbABvqWVx6IznU0HsV/A2JUki1pYq9L8avuHvzTY82SNcPOC7QgzT1d3xKO tiApz1plebffd2/h8Ds0ledQXCcm2eMSwytumIL4J5k3+q4gvR/zZeu0K1fN4ik85CkD vjE3bBgeTSqw0FKAZuq1ItfuCARqHkDuVWt06OlBBAnxtJUzTh8m8cLBSUIuAw1kGKRU J5bohGVtmnNvLqfk5kp6GHjEyU9SCywIGPueG/h9VTlsP0hoGfqGlN2TKEF65JHIDJRc Jh1ajtuLgyGDG/uWcONibeqLNbHNoGcE9RBeDj2wahcmVkNyUl85r+e3lXMa58kgPTdf p41Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=uttVc7EGex6bwvz1mKJcxk8PejdzqmlRwWYkCohN+js=; b=0bgIZouihZmxrB2HoVMDNHSG38FB89dVjRO8ZmxiiSvliH/pcJUpIB/rrCL1fvi9cZ lOlmL34NMgu6O/wz0E9amGbT+MF4I5shPhTnpizqAp/mJm9xRUa/nbpY9uSw3RHk7ku6 g67xMTPeIssXvV7W3e6sd8XuK7R4Hc69zdxHfeJnGHPIkROUjmKWiOE2TX6VDZJLnLVt frBPNk4a2bC3LhLen7Sa4DPNHqsJQiO041bAonhhR5gICRPrBMcXvGzJkNhuoGEjlf0B ldFta6+nejJUu5Kd2GXdD8Ti4tSU4nCA3aokDdYJODztJ17lR3Qqx+vomT4ejL7jzcS9 tOMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d9-v6si27907911pfk.166.2018.09.20.21.08.01; Thu, 20 Sep 2018 21:08:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389196AbeIUJyo (ORCPT + 99 others); Fri, 21 Sep 2018 05:54:44 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:8912 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2389061AbeIUJyn (ORCPT ); Fri, 21 Sep 2018 05:54:43 -0400 X-UUID: 807b2057b45f46bdb50ce0650a1643d0-20180921 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 839456864; Fri, 21 Sep 2018 12:07:42 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 21 Sep 2018 12:07:40 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Fri, 21 Sep 2018 12:07:40 +0800 From: To: , CC: , , , Sean Wang Subject: [PATCH 1/4] pinctrl: mediatek: fix static checker warning caused by EINT_NA Date: Fri, 21 Sep 2018 12:07:35 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 65AFECEC4204B721142E7DCE6902DEBE4EBEB91D766CB7AB5D6C60707F7371862000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Wang EINT_NA is an u16 number, so it should be U16_MAX instead of -1 to fix up drivers/pinctrl/mediatek/pinctrl-paris.c:732 mtk_gpio_to_irq() warn: impossible condition (desc->eint.eint_n == -1) => (0-u16max == (-1)) Also happens in drivers/pinctrl/mediatek/pinctrl-paris.c:749 mtk_gpio_set_config() warn: impossible condition (desc->eint.eint_n == -1) => (0-u16max == (-1)) drivers/pinctrl/mediatek/pinctrl-moore.c:479 mtk_gpio_to_irq() warn: impossible condition (desc->eint.eint_n == -1) => (0-u16max == (-1)) drivers/pinctrl/mediatek/pinctrl-moore.c:496 mtk_gpio_set_config() warn: impossible condition '(desc->eint.eint_n == -1) => (0-u16max == (-1)) Fixes: 6561859b067f ("pinctrl: mediatek: add eint support to MT8183 pinctrl driver") Reported-by: Dan Carpenter Signed-off-by: Sean Wang --- drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h index 10d33ec..b618042 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h @@ -18,7 +18,7 @@ #define MTK_PULLDOWN 0 #define MTK_PULLUP 1 -#define EINT_NA -1 +#define EINT_NA U16_MAX #define PIN_FIELD_CALC(_s_pin, _e_pin, _i_base, _s_addr, _x_addrs, \ _s_bit, _x_bits, _sz_reg, _fixed) { \ -- 2.7.4