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: 732264 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 4A5BACD98F3 for ; Wed, 11 Oct 2023 06:45:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343923AbjJKGpw (ORCPT ); Wed, 11 Oct 2023 02:45:52 -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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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;