Message ID | 20221209075040.2141042-2-haibo.chen@nxp.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-gpio-owner@kernel.org> 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 7F402C10F1B for <linux-gpio@archiver.kernel.org>; Fri, 9 Dec 2022 07:50:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229891AbiLIHut (ORCPT <rfc822;linux-gpio@archiver.kernel.org>); Fri, 9 Dec 2022 02:50:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229919AbiLIHuq (ORCPT <rfc822;linux-gpio@vger.kernel.org>); Fri, 9 Dec 2022 02:50:46 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2044.outbound.protection.outlook.com [40.107.21.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EB5350D41 for <linux-gpio@vger.kernel.org>; Thu, 8 Dec 2022 23:50:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LlYGSn5DYJLUUkuRsL3iRDDZ9fSFcC4M8HzNr05A1CGJ4hhKGYEHAVyypBpOpxK2duNOH287bcn16e8EfSEffC8TsWEZL3bkyIeLGHx5LEobUWBR16CBLsIqdYXTyIY90U5gr/TJWoWsBBPjMVenuEIm5X9+qSGREmUuuql8bb2oZNZ79SnC4zt0LO3vpTH1rQwZytrt+7TgOGKTeoI+VOsOu3o9xgWEBhpr1ai5Sqh2054sypwQPSvsQMRdqVoZXKM7c0nqzwv0Ql6uTc2CHdfH5Wst+DWqwdVN5qv/+dLHvsMXBUUjyzer2jI9cUjsFDDxF3NMqquLAkxdq1wm7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qFcwBFWLIisiR7tR64UZucQM3Oepa1pz2Pcz+GFcY7w=; b=mTi7Tu/L7CIdB/Eno6Zm0r8fvpDZrbyFbl0YKkxn6AX7SVmsdU3BAGEb/3wE5lPLdfkvLDyzVWQB/3IBOMb5RfZ2KhjMuU4XlYWC0UxfCerv/3Lffc4T1WBqScEsJxvxwB3HFB153zG+UMSeU6YjNxSjVPK9HpuM9GAjpGryIRgR4TjeVLAVlzhlFiZbOfuGKdvUs9yBw7Taoz5q/pfTuOw6wc81unxpTo3l8d9CBYC1oM+Ir7kLBfPfFAQ76EjjQ13VeT7gHuAA1Vx7CffSLj2/eXiPljIDjhpx9svxWVEjvYETGnQ0a/bVVnpqmtOTsLFSkZT0r5naH8OFzp0Pyg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qFcwBFWLIisiR7tR64UZucQM3Oepa1pz2Pcz+GFcY7w=; b=lVa64tT47d6kRBn1dE66OqphGhSaWx2/dBSZ9w8ZNYnPG4z6mrU1HZq11byYJzjKlsacVZP1bZGypGZYKLTeHnEVqTTHJthOjCiPU2fC8+CHsiBjxzNb9aWJ7pCRQk/gEYA8zuGvwXy1KOH6eQ/eyZXWORH9O/8j0HGVM62f1es= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB7PR04MB4010.eurprd04.prod.outlook.com (2603:10a6:5:21::30) by DU2PR04MB9099.eurprd04.prod.outlook.com (2603:10a6:10:2f2::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.20; Fri, 9 Dec 2022 07:50:43 +0000 Received: from DB7PR04MB4010.eurprd04.prod.outlook.com ([fe80::7479:76ef:8e5:da0b]) by DB7PR04MB4010.eurprd04.prod.outlook.com ([fe80::7479:76ef:8e5:da0b%7]) with mapi id 15.20.5880.018; Fri, 9 Dec 2022 07:50:43 +0000 From: haibo.chen@nxp.com To: linus.walleij@linaro.org, brgl@bgdev.pl Cc: haibo.chen@nxp.com, linux-imx@nxp.com, linux-gpio@vger.kernel.org, martyn.welch@collabora.com Subject: [PATCH 2/2] gpio: pca953x: avoid logically dead code Date: Fri, 9 Dec 2022 15:50:40 +0800 Message-Id: <20221209075040.2141042-2-haibo.chen@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221209075040.2141042-1-haibo.chen@nxp.com> References: <20221209075040.2141042-1-haibo.chen@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0088.apcprd02.prod.outlook.com (2603:1096:4:90::28) To DB7PR04MB4010.eurprd04.prod.outlook.com (2603:10a6:5:21::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB7PR04MB4010:EE_|DU2PR04MB9099:EE_ X-MS-Office365-Filtering-Correlation-Id: 22635fbf-ee20-447a-ebf3-08dad9ba1300 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U5FxqXBwYwqLAC6UeQWjF5oEt1xsWH4kePtTYj4bAe3lWMOOyI/zb8nUcX4/WUPpJswZ/UTRfxTmFVW2mtlgAarDRnfSkDE5UvacNCBuOEjfh7AGus1vvoU01Q9MNBFb7c9F3Hh+EIVbxTevDi0o0wFw2ujo7OZMpSHGme+f5jG5XN5qwB3i+NcYHXYIrILznHxtEJk4eEnfiCi0Lp12zNdb827NObjjaThR4hnBO2+QxxX52IzgNophR69bPglcd484X1cWg+R7OZ6jUYVNAZI2+phvaLCk5otMouivStgUV8qA2IQnE69k6oSsLnMSvzgFty5ZVVByCDbN18lXiu5SSsQbgueCx2m+jz2rPuH8gSLBtK22OB/jC0oEj74FsCtvhFoc2uonye1XtXdZLfuDoNm1U64Jf4HYDJDd1F9xvONBVvg/WYdHtg6U4llIqMqM1U4uzLI5lgw7+xCBUbXDdh5b0go4wghFaGPD0G6RlJiaBlSsLRkNX0nS1FnGYcP/qgQIu0a7NKidueAMMS2sum+WMautRXnaRF2FrrElqvOSuEtAPcSHLc6c+0fLUj0a77ivFRqv8g10NXaQJgrdgzIbhZlK18fUmKrooBpkyeIYsd/fXCdM6wq/wljJeX0X/9vYyoGWE5U97Psspo37RL7c5IFTd+3BK5/OPLqHh5WMCez79cyolNiRN4RxGOJoAmzXrvSdlOvOfiTdUA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR04MB4010.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(39860400002)(396003)(376002)(136003)(366004)(451199015)(2906002)(4744005)(38350700002)(8936002)(38100700002)(86362001)(83380400001)(4326008)(66476007)(36756003)(5660300002)(52116002)(66946007)(2616005)(1076003)(186003)(41300700001)(66556008)(6506007)(6512007)(316002)(9686003)(8676002)(478600001)(6486002)(26005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 23lGaPTtL8Jaj6VtTHpPIfkr9+3Yt/iwBQ4JLS2gLXQCb1gHLEbmXwjQ6o5KEqtj0aLIDe20uM/4U4KMjxDMGjnZvDoPjy6p3z0XFqxuJIbbolooai6fc5lBEd0pwGUaa9jdMY/Bwc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uReaUXc531e4GYt5gXZCilAr9ybQBsEPD9RyqyiC/NI1rb+Ffzw5fKHNQn4KheplE4MPRJbE7wEZUT1l8PljC630+iT2eb8B6BHF9b2HkzDcM19dPwnw+KIM4pUJxO36uaXgTfSNrPi1eOQwREmqmnPFqxzl6bTv19pStxbSewFxjBFKgdguBfCpX9Pdmf3StILJoIySFcqvqNDGceMsOdQWbdhlzlwTcwPMHD6kmWcAoYLgKPELMnoZXurX+iAQ6uqlBOyVzss/e9EKFuLRqOJ17i7pkpmPi2/EuJ3UREm78ydKOwLOecOds0FnVn/r+0hF0Y4Wc7ZONd3I/dywrsCd0tDPgQHsbgwNMbvcw4xUSmkDJ4jVL+Ci X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22635fbf-ee20-447a-ebf3-08dad9ba1300 X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB4010.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2022 07:50:43.6224 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +NSApOZ6lGax/UFWDAy7KHISERUqSpZgazc4TTSXTc3/ZGeoQgSeYn/GLAsdWdasjveKFnNVTqlFFwa9S9UfEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9099 Precedence: bulk List-ID: <linux-gpio.vger.kernel.org> X-Mailing-List: linux-gpio@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index c3dd5ceab421..2a12c6673482 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -309,7 +309,7 @@ static bool pcal6534_check_register(struct pca953x_chip *chip, unsigned int reg, int bank; int offset; - if (reg >= 0x30) { + if (reg >= 0x30 && reg < 0x54) { /* * Reserved block between 14h and 2Fh does not align on * expected bank boundaries like other devices.