Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp450103pxj; Fri, 11 Jun 2021 03:19:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1j/4ScN+QXCRE6i7yj2rZXgOYIKqvB7jg4LggQivEX1Lmxev37NanjbJt0zfOoGBdS3/m X-Received: by 2002:a50:ee18:: with SMTP id g24mr2914299eds.11.1623406741739; Fri, 11 Jun 2021 03:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623406741; cv=none; d=google.com; s=arc-20160816; b=Itp9tR1p1f97hj0fcK8X471FUSjtdIobSttd9jbZ1a3AmoSGF1WOpsuoVt3+dgpqCO 6XfnfGdZHGABC4dOXp4qKV1qt/ltHM3NBV9va3p89GChK/0d5ugod1dA3I++23iruHtf z7+qaar1hYX2AsZRVRAJbrycpdpiGNHHR+b5icSYWsFeGf0/reIPJXMOjAMLK3qjP5kM rch7Q5EksfCz/6nhmkzn7dYnGqV1s1TvKUTEYwGw5wxaW4fp6EfTl6KZExXUCtoM+Utq 1yzp6ip28DTkOu48ZXV1QonKyf48Uz2w0Sf+shCqE28K+P/LztSMok0aJYSYo8nlucJP a8ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MqHjjtlP417DehFwIZpq4Zb2xRnooMCgvYKxNkmOcrc=; b=HeEbeUlMlUX6h/3TpX/XcoT5CWoNhm5UjZs0QKfbq+0DFekhWXpwp2Vr7VgJttE/rs yuc6b7uc3tLtd0Q4/XhrVxoUWKcFCH9ynilaOJ+zZPxcL6Xs07xTF7KxVUcykGyXzxki dqBPwKzLpDRKASZAtPoPyS4SfZ+NqmN4WKxHI2HZigNqxNiD8Y0TJoJNYYiOC412TEdA Lr8jjcuCIuHHSuFcVXWiNcjyVAGBj4vtWSoFHbzqaZ5hM7R5I2kYp/3DSlbR/ZJ/jxlD ny9XsyD0tKigWH3LMj3j5E5ih+mkGfDKsdKThhs9FBS38lgK9Cz2vk8WVFnfbI6BJrnJ s9tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Z9m35EgF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u23si4764861edi.175.2021.06.11.03.18.38; Fri, 11 Jun 2021 03:19:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Z9m35EgF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231685AbhFKKTc (ORCPT + 99 others); Fri, 11 Jun 2021 06:19:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:52894 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231639AbhFKKTc (ORCPT ); Fri, 11 Jun 2021 06:19:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E796C613E7; Fri, 11 Jun 2021 10:17:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623406654; bh=SktPH/nCgCIqMxnFs4Cm09a5Wf7+Yi7f2ePYaDScGIY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z9m35EgFqdnSZ2vi28lkKd/GCmvSmbEpo0LtQW0UzX06vmW0ECQOuLCEuDY1JLawk SDf5BoK/zmqCGbz6xGVwaHrlvM6gkIsJurmTk9HFjh0dH9083EqO9TGK3wXnonLrTy yOftS1JYYNzY3+2IMAkkU8acljqkSLU/ppsnovIQ= Date: Fri, 11 Jun 2021 12:17:31 +0200 From: Greg KH To: Marion & Christophe JAILLET Cc: Srinivas Kandagatla , Dan Carpenter , linux-kernel@vger.kernel.org, Chunyan Zhang Subject: Re: [PATCH 4/9] nvmem: sprd: Fix an error message Message-ID: References: <20210611083348.20170-1-srinivas.kandagatla@linaro.org> <20210611083348.20170-5-srinivas.kandagatla@linaro.org> <7bd13064-8a50-2723-4ebe-d4ff7563c199@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7bd13064-8a50-2723-4ebe-d4ff7563c199@wanadoo.fr> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 11, 2021 at 12:10:58PM +0200, Marion & Christophe JAILLET wrote: > > Le 11/06/2021 ? 11:45, Greg KH a ?crit?: > > On Fri, Jun 11, 2021 at 11:17:50AM +0200, Greg KH wrote: > > > On Fri, Jun 11, 2021 at 10:05:40AM +0100, Srinivas Kandagatla wrote: > > > > > > > > On 11/06/2021 09:56, Greg KH wrote: > > > > > On Fri, Jun 11, 2021 at 09:33:43AM +0100, Srinivas Kandagatla wrote: > > > > > > From: Christophe JAILLET > > > > > > > > > > > > 'ret' is known to be 0 here. > > > > > > The expected error status is stored in 'status', so use it instead. > > > > > > > > > > > > Also change %d in %u, because status is an u32, not a int. > > > > > > > > > > > > Fixes: 096030e7f449 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support") > > > > > > Signed-off-by: Christophe JAILLET > > > > > > Acked-by: Chunyan Zhang > > > > > > Signed-off-by: Srinivas Kandagatla > > > > > > --- > > > > > > drivers/nvmem/sprd-efuse.c | 2 +- > > > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > > > > > diff --git a/drivers/nvmem/sprd-efuse.c b/drivers/nvmem/sprd-efuse.c > > > > > > index 5d394559edf2..e3e721d4c205 100644 > > > > > > --- a/drivers/nvmem/sprd-efuse.c > > > > > > +++ b/drivers/nvmem/sprd-efuse.c > > > > > > @@ -234,7 +234,7 @@ static int sprd_efuse_raw_prog(struct sprd_efuse *efuse, u32 blk, bool doub, > > > > > > status = readl(efuse->base + SPRD_EFUSE_ERR_FLAG); > > > > > > if (status) { > > > > > > dev_err(efuse->dev, > > > > > > - "write error status %d of block %d\n", ret, blk); > > > > > > + "write error status %u of block %d\n", status, blk); > > > > > Shouldn't this be %pe and not %u? > > > > This is not error pointer its status value read back from a register. > > > > > > > > I think %u should be good here. > > > Argh, you are right, my fault. For some reason I thought this worked > > > for integers as well. Don't we have such a printk modifier somewhere to > > > turn error values into strings? Let me dig... > > Ah, errname() will do it. > > > > Looks like no one uses it, so nevermind, sorry for the noise. I'll go > > apply this one now. > > > > thanks, > > > > greg k-h > > Hi, > > errname() depends on CONFIG_SYMBOLIC_ERRNAME. > Is this widely used? It is set by default if you enable CONFIG_PRINTK > If not, using errname() directly would loose the error code. > (note that %pe already deals with it) > > Dan Capenter already spoke about a potential %e extension, but I don't think > anyone did anything yet. That would be a fun and simple beginner task for someone to do. Maybe I'll mention it to this new round of interns that have just started... thanks, greg k-h