Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5AF17C6FD18 for ; Fri, 31 Mar 2023 10:20:13 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AD79685ACE; Fri, 31 Mar 2023 12:20:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de 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; secure) header.d=gmx.de header.i=xypron.glpk@gmx.de header.b="qU28d0O/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A16EC85BAC; Fri, 31 Mar 2023 12:20:07 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5142A83A02 for ; Fri, 31 Mar 2023 12:20:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1680258001; i=xypron.glpk@gmx.de; bh=KbuSAWiJueQ5hVD647Tm/vhS3tdhFLLcP31ErgzyokU=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=qU28d0O/2VAXrIvEusKGeG4JzmzCrXkgSoO12/EEoaHndxT+DQOpV1sBCj5IkeEUS TnNIa7Nv1g3Mhe0sH3v7eIQK+tBop3CwFxtcd6d0rv9m2SIzCjFIK7Mx76DSnUuqVq ccBpUc0t8+BlTO56NWvkcZ0BjQq42uEk7mDTLzFIgFLGOqyyujN6hLj4DqnpP7R8Iw bV1CC95td1RgaKW9myA5zTbTuqpT485CEixCF+I2y8S5gqWWsDGwZYKCu91RcedjcQ 8B5JpHya1DkeNwkpD4ZRGFtAMv1ZHh2PeHBtrmQtJLiASfrFmMw5Wg9eYILzzovTRu s0h/00fFCFxtw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.123.94] ([88.152.145.137]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MG9g4-1peqsv3CTU-00GVlU; Fri, 31 Mar 2023 12:20:01 +0200 Message-ID: <90675a84-3c3e-dc95-b8f5-565f8bd5f6be@gmx.de> Date: Fri, 31 Mar 2023 12:19:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 32/38] fs: fat: Shrink the size of a few strings To: Ilias Apalodimas , Simon Glass Cc: U-Boot Mailing List , Bin Meng , =?UTF-8?Q?Beno=c3=aet_Th=c3=a9baudeau?= References: <20230330213227.2142353-1-sjg@chromium.org> <20230331103047.32.If2eea014ebc68815d68f373640c80a761a082f83@changeid> <4009FAD0-AC34-49F3-8535-D0686A291640@gmx.de> Content-Language: en-US From: Heinrich Schuchardt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:DHHkMcMf6i84vRiynGYTXOAXnVtUvYh5GHqcqGTeP9yfSZNH6Qr +0Y3uWATGvPSqFUZnn3xHs2XfSgFAFPOnj99ytbtBBZNZtAZ6uspu/aSnB3QoUHoodcycJ1 OhSqixKEu4/vsJY2TaJAaq2uXwBKPDOUJysaKJm3r6+RJO2L1yRvj8F1CRKmA9QdvHYympg UkgTtG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ot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean On 3/31/23 09:33, Ilias Apalodimas wrote: > On Fri, 31 Mar 2023 at 09:51, Heinrich Schuchardt w= rote: >> >> >> >> Am 31. M=C3=A4rz 2023 03:16:13 MESZ schrieb Simon Glass : >>> Hi Heinrich, >>> >>> On Fri, 31 Mar 2023 at 13:05, Heinrich Schuchardt = wrote: >>>> >>>> >>>> >>>> Am 31. M=C3=A4rz 2023 01:49:35 MESZ schrieb Simon Glass : >>>>> Hi Heinrich, >>>>> >>>>> On Fri, 31 Mar 2023 at 11:48, Heinrich Schuchardt wrote: >>>>>> >>>>>> >>>>>> >>>>>> Am 30. M=C3=A4rz 2023 23:32:21 MESZ schrieb Simon Glass : >>>>>>> To save a few bytes, replace Error with ** and try to use the same= string >>>>>>> for multiple messages where possible. >>>>>>> >>>>>>> Signed-off-by: Simon Glass >>>>>>> --- >>>>>>> >>>>>>> fs/fat/fat.c | 12 ++++++------ >>>>>>> fs/fat/fat_write.c | 14 ++++---------- >>>>>>> 2 files changed, 10 insertions(+), 16 deletions(-) >>>>>>> >>>>>>> diff --git a/fs/fat/fat.c b/fs/fat/fat.c >>>>>>> index 2da93dae3cf3..f0df7988e172 100644 >>>>>>> --- a/fs/fat/fat.c >>>>>>> +++ b/fs/fat/fat.c >>>>>>> @@ -97,8 +97,8 @@ int fat_register_device(struct blk_desc *dev_des= c, int part_no) >>>>>>> /* Read the partition table, if present */ >>>>>>> if (part_get_info(dev_desc, part_no, &info)) { >>>>>>> if (part_no !=3D 0) { >>>>>>> - printf("** Partition %d not valid on device= %d **\n", >>>>>>> - part_no, dev_desc->devnum); >>>>>>> + printf("** Partition %d invalid on device %= d **\n", >>>>>>> + part_no, dev_desc->devnum); >>>>>>> return -1; >>>>>>> } >>>>>>> >>>>>>> @@ -168,7 +168,7 @@ static __u32 get_fatent(fsdata *mydata, __u32 = entry) >>>>>>> __u32 ret =3D 0x00; >>>>>>> >>>>>>> if (CHECK_CLUST(entry, mydata->fatsize)) { >>>>>>> - printf("Error: Invalid FAT entry: 0x%08x\n", entry)= ; >>>>>>> + printf("** Invalid FAT entry: %#08x\n", entry); >>>>>> >>>>>> The ** is superfluous. The text makes it clear that an error occure= d >>>>> >>>>> So should I drop the other ** strings in these files too? Please tak= e >>>>> a look and see what you think. >>>> >>>> I suggest to avoid prefixes like 'Error:' and '**' in all our code if= the message text already indicates an error. >>> >>> That makes sense to me. It is sometimes hard to know whether something >>> indicates an error, though. If you look through fat.c you'll see what >>> I mean. >> >> Users might prefer log_err writing messages in red on the console. > > FWIW I agree with Heinrich here. We got 'Error: XXXXX' sprinkled > around from older code, but it makes sense to convert them to log_err > where possible We should move all error output to log_err() and then can later add decoration (color or prefix) in log_err(). Best regards Heinrich > > Regards > /Ilias >> >>> >>> Regards, >>> Simon