From patchwork Wed Oct 11 06:45:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 151156 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp345313vqb; Tue, 10 Oct 2023 23:46:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3JAsqWIiBzvZwwOAOX36aLzNO3K2r2Q1QMA144eTS381Fz6HX7ug6BI6VdjkyrJVSKWrP X-Received: by 2002:a17:90a:6848:b0:26d:4ade:fcf0 with SMTP id e8-20020a17090a684800b0026d4adefcf0mr17944625pjm.4.1697006785365; Tue, 10 Oct 2023 23:46:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697006785; cv=none; d=google.com; s=arc-20160816; b=TQC1V3HOXIfsg23Tzy/Ccac94+XS310juugR69DYP7u0w4vH8hF/ORDnqEAVfzIGqt XRdIcewEXJmf32QKL8F5nk4lbbfsqJAlBV7wdzAd6+WU7yCWOIqfIIv6/jAlF4/YaY/s NLPySYqgd1ryi6xHTVaTNgRzp9C2jl/syJFwToT3oyXzeCJspBYpZ2HVWdhQFkdKctX8 Hrv/wQuiVwsvYHKIpcNeoV3yBUqBPLkAwgkqzrxZ7BnU7ia0NqWQa9pGi7tl4DwQS+ev yGBFOuEnb4mRvrZSuTe8+Kit+Dr7H/j/eR8HvAJ+dmuRbMY7ePxZ06XPZ4s6PqnIRG5c osRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=VupDWgimIrRqjTbC2O3GAltiGzwOZdIOpW+LUqeakCU=; fh=qMpay9pujDi8rXSo/JfItmDXYJygxb+gXUCh6hKUytw=; b=kuH5so/tnQmNi4pImE2mH1svpyf1f0zB5b27KeIFfkqQv6pTK67r27cnia21Wzbv7R 7Y6SsIlGzC+pQ3b03bgrYPT9VexeuJyB5nbYxTa2s6RwrM7AkDDc+e8xP9gQPd4vKOEz 2DD2SmEgo0XGkYlxqpzaVzLX6Wm2XBqvtBZXvEGQC+PxfD+tB8QNZULXgTUCdw5iGkTt 1LKw3GeZVFcliDhP83v3NE91r9m1TgfgRKFreaQGMllG40tPWPkArgbZ+MHX0lL1DWm8 iSRa8NHj4iMR/iC6L1MsUyKTGzQPMvcpC7dSzCELT3J7FWZiDMMpXdXa0+XMX6arxyAr DK4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ktopex5L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id gn16-20020a17090ac79000b0026376acd6fesi9650632pjb.22.2023.10.10.23.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 23:46:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ktopex5L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B096F8069DA3; Tue, 10 Oct 2023 23:46:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344454AbjJKGpx (ORCPT + 19 others); Wed, 11 Oct 2023 02:45:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344090AbjJKGpv (ORCPT ); Wed, 11 Oct 2023 02:45:51 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA4F590; Tue, 10 Oct 2023 23:45:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697006749; x=1728542749; h=from:to:cc:subject:date:message-id; bh=y4UC8gG1+gAZpQcXTEzxnRFZ4Z3jnxyMdDMevoJdM78=; b=Ktopex5LQg6hU5UohS0elDJsAzYKdsJVz6BpBjtGntlB99e6ySs4PYlQ Y+rNleyVmdTQPfi7EqO+n1kVQTQLFp+QyP7w1upC46dbGrFUY0YtE7EII v1p7Ho5yO0lRCd1DaWP1wemB5MW64su8ApLIbIcvZHNPcOaRzqlGNruRJ BSOisM5Ja/KDn4GudlIKuRYMYWQdhPRdukya1N3Ilyse+i0VPvKUxseLY IusUWGPCefOnn9wuLiaW2qZj6Y3WHOrSGlkkmENfbQKRHk9xf+1QrOf9h mxMx+T5DcLcsXt0qlDJQjzXmFl8SF7dux2nAaFK05/+1n3QV8XuYOyM6z w==; X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="364877788" X-IronPort-AV: E=Sophos;i="6.03,214,1694761200"; d="scan'208";a="364877788" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 23:45:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="753711804" X-IronPort-AV: E=Sophos;i="6.03,214,1694761200"; d="scan'208";a="753711804" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga002.jf.intel.com with ESMTP; 10 Oct 2023 23:45:45 -0700 From: Raag Jadav To: linus.walleij@linaro.org, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, pandith.n@intel.com, Raag Jadav Subject: [PATCH v1] pinctrl: cherryview: reduce scope of PIN_CONFIG_BIAS_HIGH_IMPEDANCE case Date: Wed, 11 Oct 2023 12:15:33 +0530 Message-Id: <20231011064533.20549-1-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 10 Oct 2023 23:46:01 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779440586625796346 X-GMAIL-MSGID: 1779440586625796346 We have a couple of pinconfig cases inside the braces which are meant for PIN_CONFIG_BIAS_HIGH_IMPEDANCE case. Although it is valid C, it makes the code less readable and prone to misinterpretation. Limit the braces to PIN_CONFIG_BIAS_HIGH_IMPEDANCE case to avoid this. Signed-off-by: Raag Jadav Acked-by: Mika Westerberg --- drivers/pinctrl/intel/pinctrl-cherryview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 55176feaa4d8f7d07005c6199d7843bc2991773d diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c index 5fde4fec59c1..b1d8f6136f99 100644 --- a/drivers/pinctrl/intel/pinctrl-cherryview.c +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c @@ -894,6 +894,7 @@ static int chv_config_get(struct pinctrl_dev *pctldev, unsigned int pin, return -EINVAL; break; + } case PIN_CONFIG_DRIVE_PUSH_PULL: if (ctrl1 & CHV_PADCTRL1_ODEN) @@ -904,7 +905,6 @@ static int chv_config_get(struct pinctrl_dev *pctldev, unsigned int pin, if (!(ctrl1 & CHV_PADCTRL1_ODEN)) return -EINVAL; break; - } default: return -ENOTSUPP;