Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp991155lqh; Fri, 29 Mar 2024 03:59:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/7so8ajR+867BF8x9wJ8WDdLKlUH6xiYjXD6JGmVxXh5ljy5jLB3JNnm4b6/0/N0DpnyLutoKQnAEoCrA8RuuLy/pc7Wx+1FtzEnKzg== X-Google-Smtp-Source: AGHT+IEkMRb1j4bOKSQC6uwhxBh62OaDYE/1XplCpnv/4lDiiRptcwhtSky+rJtx1iDSXhv96Z7q X-Received: by 2002:a17:906:2349:b0:a4e:253f:99ef with SMTP id m9-20020a170906234900b00a4e253f99efmr1374548eja.46.1711709959368; Fri, 29 Mar 2024 03:59:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711709959; cv=pass; d=google.com; s=arc-20160816; b=dfQHGhzqvo3HFEljrHVHNGRU/iaFmnPQiovw8RcGZsi9cKwdvP/tcihJVHoFI7F6Lm zQN1zglk2T6sPD1R+Nb6/KPi/zicd8HFfkPxI5PA+9E53GJHgi+TD3v9cXRlLtv7ov4G lEeDkRb7hhIORYaqBbQRBUzzC4hEv34pFWSG4V3wGEufgcleKpPKDt2wBnTQYjKxJvlO IjR4kQ0ZoVVj6gwMd/PlbdHUmr2L4MvduduCS3tWfQUIACtdrIq+Jp/KYZrdp+/L2mVy anV6rjN9rg1k4vUtKnHFeKVF76dY3d+r9I/EToalFleubkq8PDc58CBLnvfyqk9okJGv xKQQ== 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=enQTO0EPNDoueC8lce8b1VLbDPZCB+v9eyHhqUPWx84iITBJ/ToSfcw9y9eRy9QZLp G4KVWyzzsywrjWgxu0dsIRV+QV6evT7zJ2ZNDoMxXRX1wDHyikMbtR7xJt0+t2Z9bZ7u OFydJcbyRC3UrCJgM+oTiVIRMKWg9NGuplxhHQ05ylA92ttXG6qB3wX+pnUj00jLqy4H ebwXKzbEqsK8fxOCHKRNEEGaMR6Gq0dkUT2HCVQZRzunHfTqTaCivbU/hG10YrBufigL 4jD9nb19qOjqABZdn0RdL/PC6YG5glIQ2YY67SNNJsGn+PEVMycsG+v7fqhW+wkNb5cF V0/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-124419-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124419-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q19-20020a170906a09300b00a470767e993si1679012ejy.688.2024.03.29.03.59.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 03:59:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124419-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-124419-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124419-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1C8461F23ED0 for ; Fri, 29 Mar 2024 10:59:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2AC906A34B; Fri, 29 Mar 2024 10:57:51 +0000 (UTC) Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) (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 0153869E0F for ; Fri, 29 Mar 2024 10:57:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711709870; cv=none; b=AjNnknpte/zR0SSuQBJGfCaYTNA8zGvH5lXYYaP+EhuVVor+zp18JiM5qMOuzw+pIWMtmLxaTQjgE9GPkusqEcIbydF5fDO5kOvKgVa4mz8LfPBBd3jiu452JL/60OgMQH0upErZllHL7wcWyF5nYC+XbeIo5DLMGLTVw0aP2oM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711709870; c=relaxed/simple; bh=nSF/R8gYLxY6alFA60B5rOXw4QyV2pEDvssncoOLngY=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gmMspT7KmfHPezgIKSXvcRfoE5ynAez8J0QcBZTrth1JcXgGJeIiPLAPiTmJ1qZys3SVhK/6plilOVivT2LoZHqL19P0Xl8ULL2nyUUc9nT+6MKG5qKZyHUOP7fiT25XfvQhDmD6BBu/kukASP+rOurSXG6Nr7c9SM9q9+HQxOE= 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.81 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 fgw20.mail.saunalahti.fi (Halon) with ESMTP id 04a93f69-edbb-11ee-b3cf-005056bd6ce9; Fri, 29 Mar 2024 12:56:38 +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 v2 02/11] pinctrl: aw9523: Use correct error code for not supported functionality Date: Fri, 29 Mar 2024 12:55:16 +0200 Message-ID: <20240329105634.712457-3-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240329105634.712457-1-andy.shevchenko@gmail.com> References: <20240329105634.712457-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