Received: by 2002:ab2:5c0e:0:b0:1ef:a325:1205 with SMTP id i14csp68622lqk; Wed, 13 Mar 2024 16:57:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXhpdyJSdk3g7of5m/BdfCzmt/fnI2JfZjBtEJQON4hxwbChN6lbnZFmKzdIja8cMTYBaSiujKkBw5jc7eADjO4kB6uy1bftrbOZjLaOw== X-Google-Smtp-Source: AGHT+IF9dCRvftEk0VcO3ednzkgXx7B6pogkus6bxpBGl2na39KWvqm3PHIKivb/iP6dqCTBetND X-Received: by 2002:ad4:5495:0:b0:690:c7ec:bee2 with SMTP id pv21-20020ad45495000000b00690c7ecbee2mr534695qvb.18.1710374223848; Wed, 13 Mar 2024 16:57:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710374223; cv=pass; d=google.com; s=arc-20160816; b=rPkDoNyAZ35LMvA1TXAZcxKTrPOjFH6QAVPgIY5mRp4+mdmnMKT/PNwJgN8+2bXf66 vzPDZ0BcB+XPyaUki+8e4YoGHk1btv8AEHEUK8XfnSzpl8SfiEE+5rwpcsJz9kR25Zv6 KPSYH6qdoU2nx8MGY1AePrYnMbdFf3lc8AQnlfk50haa/+JZsfs536EiSQkDNFooxzII /EGeytWXF0lyP4cvjsHam2wiihAVb6xsn4ZLxpNp0075pyl2CKjYYtVHZbZ1nenKvMEl jmCCa4ZoWu2zKD1m0JtdODDZlnARSVuuhsDJ2+rw5z+kZWLsBUkYVQHnAA5amMokJcIe Zd4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from; bh=84SbZAsdy1dejTc3WyO0AId0rbaWYGNnHbETILqzlkM=; fh=YgUZ2/lPRGLRG7A+awv03LUUmaPSy2eh3E767EmTYHs=; b=gXFBoos/YgwU770inZazbTNvljiVKtLGbv9n/GtKY+UspxIzhRY9Bro1Gpbam8fu0T 6tFGhIQAZJ/t06CoqUuqPmxkxbO0TPxVL14NwR0+V5rGR5vHREGcu3e9y8n8Lcv178Wb 7FiNVihwO4PM3jsu8OWLR8PXe1OqRypeCpt22YmG7GF9SzIkV9FNxtFPDgZWNSszrI+3 pFLR71G6ONzQ9nq+iQh99H+lWOcEjjVD220w8YOtuAnoeORZ6IXd6UL9fctMiiRO8RdF VgbGmq34ddH2BzcNpTy+LdVcWXzvhDAqWEIU3Nv8AtoWzkocP6t7k4KkI2I+1EvtpA+c dERg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-102664-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102664-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p10-20020ad45f4a000000b0068f8eee6161si320318qvg.404.2024.03.13.16.57.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 16:57:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102664-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-102664-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102664-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 920E51C20E8A for ; Wed, 13 Mar 2024 23:57:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 36E595E22B; Wed, 13 Mar 2024 23:55:40 +0000 (UTC) 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 E08FF5D73A 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=1710374139; cv=none; b=Hk84plPrOsgrfrVCM/A9Q6zUTwsSJBJYyVaoUEECz/RkgjYMSM/POLpP/yvFrlihte8HR5icAmf/AS+518caM5AZC2BeR6zDOBzQPjAtr0yjc0PkMeCOsQoOXdQtClcK59W+hIXVzO8QvGdUcGhp1X8qLpD28Wo8AIm00j994Ww= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710374139; c=relaxed/simple; bh=nSF/R8gYLxY6alFA60B5rOXw4QyV2pEDvssncoOLngY=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NB9HoJKFrd2URpCT3lgUy/fiBQfdCiEwt+dVF/MxA9KqB1t/xYPwYjeNxHLkP7tXUsLqZEj62ipunDOwmZdG/7IwQgFtm0xL07NirDjMNxOSvNjuVMmMU1fLrP1KDuq5zO9rfNFZohU6wgT7zXg9fB4+1fFWrYqtegorMHTTEbw= 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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; } -- 2.44.0