Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752038AbcKGJD0 (ORCPT ); Mon, 7 Nov 2016 04:03:26 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:52860 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750927AbcKGJDY (ORCPT ); Mon, 7 Nov 2016 04:03:24 -0500 Subject: Re: [PATCH 1/1] pinctrl: st: st_pinconf_dbg_show wrong format string To: Heinrich Schuchardt , Linus Walleij References: <20161105142515.4377-1-xypron.glpk@gmx.de> CC: , , , From: Patrice Chotard Message-ID: <8069c787-a934-ba1f-0284-1a28f170ef6d@st.com> Date: Mon, 7 Nov 2016 10:02:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161105142515.4377-1-xypron.glpk@gmx.de> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.48.1.66] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-07_03:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 829 Lines: 32 On 11/05/2016 03:25 PM, Heinrich Schuchardt wrote: > function is defined as unsigned int. > So we need %u to print it. > > Signed-off-by: Heinrich Schuchardt > --- > drivers/pinctrl/pinctrl-st.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c > index b7bb371..8308f15 100644 > --- a/drivers/pinctrl/pinctrl-st.c > +++ b/drivers/pinctrl/pinctrl-st.c > @@ -1006,7 +1006,7 @@ static void st_pinconf_dbg_show(struct pinctrl_dev *pctldev, > > function = st_pctl_get_pin_function(pc, offset); > if (function) > - snprintf(f, 10, "Alt Fn %d", function); > + snprintf(f, 10, "Alt Fn %u", function); > else > snprintf(f, 5, "GPIO"); > > Hi Heinrich Acked-by: Patrice Chotard Thanks