From patchwork Wed Mar 13 23:52:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 1911943 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=linux-gpio+bounces-4309-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [IPv6:2604:1380:45d1:ec00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tw6qj4z67z1yWn for ; Thu, 14 Mar 2024 10:56:49 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 315491C20F19 for ; Wed, 13 Mar 2024 23:56:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 051735D905; Wed, 13 Mar 2024 23:55:39 +0000 (UTC) X-Original-To: linux-gpio@vger.kernel.org Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D7745D73B for ; Wed, 13 Mar 2024 23:55:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.84 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710374138; cv=none; b=A0oBSVIA8l9MQf80QJRHdrGJplI5ZqMA+8ZtmYnxiUi8v0kXADtO2cBXj99c38I1odWP2ljwXjDSvldOW+jAuidRmdgSVpaWajPQySXfQXGohAqJ1ZM5krNfo4uTB+S3OPZhzjS7WTJ0/F4VVk5jwqPJ+MVPHF1+7jGgTdY0cio= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710374138; c=relaxed/simple; bh=nSF/R8gYLxY6alFA60B5rOXw4QyV2pEDvssncoOLngY=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GihsehR22lkC5PPe6kkMYDKCH+cJdjDG2GxxUX4lenoN4ppiTeVRNTFYYUdb7IJzgSQWXb/aCkegjxmXWeQcBPdcFoJY4HfcgXhtus8i9bfjUGHrEeiWbXpAiz4ZwbHj9K7Uc+nQp1OtuAL0QEvybxYhlIaNw9soKX/Hocn27TA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-26-217.elisa-laajakaista.fi [88.113.26.217]) by fgw23.mail.saunalahti.fi (Halon) with ESMTP id 05ea9cf5-e195-11ee-b972-005056bdfda7; Thu, 14 Mar 2024 01:54:26 +0200 (EET) From: Andy Shevchenko To: Linus Walleij , Andy Shevchenko , AngeloGioacchino Del Regno , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 02/11] pinctrl: aw9523: Use correct error code for not supported functionality Date: Thu, 14 Mar 2024 01:52:05 +0200 Message-ID: <20240313235422.180075-3-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240313235422.180075-1-andy.shevchenko@gmail.com> References: <20240313235422.180075-1-andy.shevchenko@gmail.com> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The pin control subsystem internally uses ENOTSUPP for the not supported functionality. The checkpatch is false positive about this error code. Signed-off-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-aw9523.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-aw9523.c b/drivers/pinctrl/pinctrl-aw9523.c index 66629af0b88b4..65d523697b731 100644 --- a/drivers/pinctrl/pinctrl-aw9523.c +++ b/drivers/pinctrl/pinctrl-aw9523.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -239,7 +240,7 @@ static int aw9523_pcfg_param_to_reg(enum pin_config_param pcp, int pin, u8 *r) reg = AW9523_REG_OUT_STATE(pin); break; default: - return -EOPNOTSUPP; + return -ENOTSUPP; } *r = reg; @@ -290,7 +291,7 @@ static int aw9523_pconf_get(struct pinctrl_dev *pctldev, unsigned int pin, val = FIELD_GET(AW9523_GCR_GPOMD_MASK, val); break; default: - return -EOPNOTSUPP; + return -ENOTSUPP; } if (val < 1) return -EINVAL; @@ -344,7 +345,7 @@ static int aw9523_pconf_set(struct pinctrl_dev *pctldev, unsigned int pin, case PIN_CONFIG_DRIVE_OPEN_DRAIN: /* Open-Drain is supported only on port 0 */ if (pin >= AW9523_PINS_PER_PORT) { - rc = -EOPNOTSUPP; + rc = -ENOTSUPP; goto end; } mask = AW9523_GCR_GPOMD_MASK; @@ -361,7 +362,7 @@ static int aw9523_pconf_set(struct pinctrl_dev *pctldev, unsigned int pin, val = AW9523_GCR_GPOMD_MASK; break; default: - rc = -EOPNOTSUPP; + rc = -ENOTSUPP; goto end; }