From patchwork Mon Jan 11 14:03:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrice CHOTARD X-Patchwork-Id: 1424655 X-Patchwork-Delegate: patrick.delaunay73@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=1wwAQc/L; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DDwS75CM2z9sVy for ; Tue, 12 Jan 2021 01:04:23 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ACEC682826; Mon, 11 Jan 2021 15:04:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.b="1wwAQc/L"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2032F82801; Mon, 11 Jan 2021 15:03:58 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D7DE2827D2 for ; Mon, 11 Jan 2021 15:03:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrice.chotard@foss.st.com Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10BE2XAg014214; Mon, 11 Jan 2021 15:03:54 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=pH5kswz+7wTS+VeGf/KYC/pic0pGcph1rZO3zKgAWvs=; b=1wwAQc/LOAjZmBgEZpKCmelwPj4siXF3zcdtNC1m2IfbV+upX5KJv6Jb70GPeen187+O 3VZMpX0R99w97hipFeSomKvVSJxPCfMiN9u1l+pzEDbw8HVwYbnJyY+zGnQVnvCPW7vh ktrF0BIuSBwXfgppGAn9+1FqaZKOWtOqYePYPgMBiPicjKHVfM+zIIK6kVTOdShmtKOb TxxgWck+0tsS40TheWP6r+249jhfWyD5HgXsXZzr3s4RSupCEdeb8iSSYUwtOj8RL+A6 HGhvF9tUjJF7MK86ah8CDjcKOqADXZlaNLCe83N0fqFG0oVX9Zc1iv7x2T7F72Ol+5Ev HQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 35yp3xf5j6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Jan 2021 15:03:54 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D6459100034; Mon, 11 Jan 2021 15:03:53 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id CBCB12B4D28; Mon, 11 Jan 2021 15:03:53 +0100 (CET) Received: from localhost (10.75.127.51) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 11 Jan 2021 15:03:53 +0100 From: Patrice Chotard To: CC: Patrice CHOTARD , Patrick DELAUNAY , U-Boot STM32 , Patrick Delaunay , Simon Glass Subject: [PATCH 1/2] pinctrl: stmfx: Fix MAX_PIN_NAME_LEN Date: Mon, 11 Jan 2021 15:03:46 +0100 Message-ID: <20210111140347.5754-2-patrice.chotard@foss.st.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210111140347.5754-1-patrice.chotard@foss.st.com> References: <20210111140347.5754-1-patrice.chotard@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG3NODE2.st.com (10.75.127.8) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2021-01-11_26:2021-01-11, 2021-01-11 signatures=0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean MAX_PIN_NAME_LEN is set to 7 whereas stmfx pin name prefix "stmfx_gpio" is 10 char long. So "pinmux status" output looks like: STM32MP> pinmux status -a -------------------------- stmfx@42: stmfx_ : input stmfx_ : input stmfx_ : input stmfx_ : input stmfx_ : input ..... Set MAX_PIN_NAME_LEN to 13 to get a correct pinmux command output. Fixes: e27e96aa804e("pinctrl: stmfx: update pin name") Signed-off-by: Patrice Chotard --- drivers/pinctrl/pinctrl-stmfx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c index a62be44d2d..d23ad862f2 100644 --- a/drivers/pinctrl/pinctrl-stmfx.c +++ b/drivers/pinctrl/pinctrl-stmfx.c @@ -346,7 +346,7 @@ static int stmfx_pinctrl_get_pins_count(struct udevice *dev) * STMFX pins[15:0] are called "stmfx_gpio[15:0]" * and STMFX pins[23:16] are called "stmfx_agpio[7:0]" */ -#define MAX_PIN_NAME_LEN 7 +#define MAX_PIN_NAME_LEN 13 static char pin_name[MAX_PIN_NAME_LEN]; static const char *stmfx_pinctrl_get_pin_name(struct udevice *dev, unsigned int selector)