u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Simon Glass <sjg@chromium.org>
Cc: "U-Boot Mailing List" <u-boot@lists.denx.de>,
	"Bin Meng" <bmeng.cn@gmail.com>,
	"Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
Subject: Re: [PATCH 32/38] fs: fat: Shrink the size of a few strings
Date: Fri, 31 Mar 2023 12:19:57 +0200	[thread overview]
Message-ID: <90675a84-3c3e-dc95-b8f5-565f8bd5f6be@gmx.de> (raw)
In-Reply-To: <CAC_iWjJQeHAt2OhddfWebD-0OW9nnJTvU2+PwCBRkbFEnRh_Yw@mail.gmail.com>

On 3/31/23 09:33, Ilias Apalodimas wrote:
> On Fri, 31 Mar 2023 at 09:51, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>>
>>
>>
>> Am 31. März 2023 03:16:13 MESZ schrieb Simon Glass <sjg@chromium.org>:
>>> Hi Heinrich,
>>>
>>> On Fri, 31 Mar 2023 at 13:05, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>>>>
>>>>
>>>>
>>>> Am 31. März 2023 01:49:35 MESZ schrieb Simon Glass <sjg@chromium.org>:
>>>>> Hi Heinrich,
>>>>>
>>>>> On Fri, 31 Mar 2023 at 11:48, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> Am 30. März 2023 23:32:21 MESZ schrieb Simon Glass <sjg@chromium.org>:
>>>>>>> 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 <sjg@chromium.org>
>>>>>>> ---
>>>>>>>
>>>>>>> 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_desc, int part_no)
>>>>>>>        /* Read the partition table, if present */
>>>>>>>        if (part_get_info(dev_desc, part_no, &info)) {
>>>>>>>                if (part_no != 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 = 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 occured
>>>>>
>>>>> So should I drop the other ** strings in these files too? Please take
>>>>> 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


  reply	other threads:[~2023-03-31 10:20 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 21:31 [PATCH 00/38] x86: Use qemu-x86_64 to boot EFI installers Simon Glass
2023-03-30 21:31 ` [PATCH 01/38] x86: Tidy up availability of string functions Simon Glass
2023-03-30 21:31 ` [PATCH 02/38] x86: Allow listing MTRRs in SPL Simon Glass
2023-03-30 22:10   ` Heinrich Schuchardt
2023-04-20 16:30     ` Simon Glass
2023-03-30 21:31 ` [PATCH 03/38] bios_emulator: Add Kconfig and adjust Makefile for SPL Simon Glass
2023-03-30 21:31 ` [PATCH 04/38] bios_emulator: Drop VIDEO_IO_OFFSET Simon Glass
2023-03-30 21:31 ` [PATCH 05/38] x86: Tidy up EFI code in interrupt_init() Simon Glass
2023-03-30 21:31 ` [PATCH 06/38] x86: Set high bits of the mtrr base registrer Simon Glass
2023-03-30 21:31 ` [PATCH 07/38] x86: Add a comment for board_init_f_r_trampoline() Simon Glass
2023-03-30 22:16   ` Heinrich Schuchardt
2023-03-30 21:31 ` [PATCH 08/38] x86: Show the CPU physical address size with bdinfo Simon Glass
2023-03-30 21:31 ` [PATCH 09/38] x86: Correct get_sp() implementation for 64-bit Simon Glass
2023-03-30 21:31 ` [PATCH 10/38] x86: Show an error when a BINS exception occurs Simon Glass
2023-03-30 22:23   ` Heinrich Schuchardt
2023-03-30 21:32 ` [PATCH 11/38] acpi: Add a comment to set the acpi tables Simon Glass
2023-03-30 21:32 ` [PATCH 12/38] bdinfo: Show the RAM top and approximate stack pointer Simon Glass
2023-03-30 21:32 ` [PATCH 13/38] part: Allow setting the partition-table type Simon Glass
2023-03-30 22:27   ` Heinrich Schuchardt
2023-03-30 23:49     ` Simon Glass
2023-03-31  0:12       ` Heinrich Schuchardt
2023-03-31  1:16         ` Simon Glass
2023-03-30 21:32 ` [PATCH 14/38] qfw: Show the file address if available Simon Glass
2023-03-30 22:31   ` Heinrich Schuchardt
2023-03-30 23:48     ` Simon Glass
2023-03-31  9:44     ` Mark Kettenis
2023-03-30 21:32 ` [PATCH 15/38] log: Tidy up an ambiguous comment Simon Glass
2023-03-30 21:32 ` [PATCH 16/38] video: Allow building video drivers for SPL Simon Glass
2023-03-30 21:32 ` [PATCH 17/38] qfw: Set the address of the ACPI tables Simon Glass
2023-03-30 21:32 ` [PATCH 18/38] efi: Show all known UUIDs with CONFIG_CMD_EFIDEBUG Simon Glass
2023-03-30 22:38   ` Heinrich Schuchardt
2023-03-30 23:48     ` Simon Glass
2023-03-31  0:27       ` Heinrich Schuchardt
2023-03-31  1:16         ` Simon Glass
2023-03-31  6:46           ` Heinrich Schuchardt
2023-04-01  6:31             ` Simon Glass
2023-03-30 21:32 ` [PATCH 19/38] x86: Improve the trampoline in 64-bit mode Simon Glass
2023-03-30 21:32 ` [PATCH 20/38] Show the malloc base with the bdinfo command Simon Glass
2023-03-30 21:32 ` [PATCH 21/38] nvme: Provide more useful debugging messages Simon Glass
2023-03-30 21:32 ` [PATCH 22/38] pci: Support autoconfig in SPL Simon Glass
2023-03-30 21:32 ` [PATCH 23/38] pci: Allow the video BIOS to work in SPL with QEMU Simon Glass
2023-03-30 21:32 ` [PATCH 24/38] pci: Tidy up logging and reporting for video BIOS Simon Glass
2023-03-30 21:32 ` [PATCH 25/38] x86: Allow video-BIOS code to be built for SPL Simon Glass
2023-03-30 21:32 ` [PATCH 26/38] x86: Pass video settings from SPL to U-Boot proper Simon Glass
2023-03-30 21:32 ` [PATCH 27/38] x86: Init video in SPL if enabled Simon Glass
2023-03-30 21:32 ` [PATCH 28/38] pci: Adjust video BIOS debugging to be SPL-friendly Simon Glass
2023-03-30 21:32 ` [PATCH 29/38] pci: Mask the ROM address in case it is already enabled Simon Glass
2023-03-30 21:32 ` [PATCH 30/38] x86: Enable display for QEMU 64-bit Simon Glass
2023-03-30 21:32 ` [PATCH 31/38] x86: Allow logging to be used in SPL reliably Simon Glass
2023-03-30 21:32 ` [PATCH 32/38] fs: fat: Shrink the size of a few strings Simon Glass
2023-03-30 22:48   ` Heinrich Schuchardt
2023-03-30 23:49     ` Simon Glass
2023-03-31  0:00       ` Heinrich Schuchardt
2023-03-31  1:16         ` Simon Glass
2023-03-31  6:51           ` Heinrich Schuchardt
2023-03-31  7:33             ` Ilias Apalodimas
2023-03-31 10:19               ` Heinrich Schuchardt [this message]
2023-03-30 21:32 ` [PATCH 33/38] fs: fat: Support reading from a larger block size Simon Glass
2023-03-30 22:55   ` Heinrich Schuchardt
2023-03-31 10:23     ` Heinrich Schuchardt
2023-04-20 16:30       ` Simon Glass
2023-03-30 21:32 ` [PATCH 34/38] x86: Enable useful options for qemu-86_64 Simon Glass
2023-03-30 21:32 ` [PATCH 35/38] x86: Record the start and end of the tables Simon Glass
2023-03-30 21:32 ` [PATCH 36/38] sandbox: Correct header order in board file Simon Glass
2023-03-30 21:32 ` [PATCH 37/38] sandbox: Install ACPI tables on startup Simon Glass
2023-03-30 21:32 ` [PATCH 38/38] efi: Use the installed ACPI tables Simon Glass
2023-03-30 21:53   ` Heinrich Schuchardt
2023-03-30 23:48     ` Simon Glass
2023-04-19  1:45 ` [PATCH 00/38] x86: Use qemu-x86_64 to boot EFI installers Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=90675a84-3c3e-dc95-b8f5-565f8bd5f6be@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=benoit.thebaudeau@advansee.com \
    --cc=bmeng.cn@gmail.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).