From: Caleb Connolly <caleb.connolly@linaro.org>
To: "J. Neuschäfer" <j.ne@posteo.net>
Cc: Tom Rini <trini@konsulko.com>, u-boot@lists.denx.de
Subject: Re: [PATCH 2/3] cmd: Allow building ufetch without CONFIG_BLK
Date: Mon, 9 Dec 2024 17:55:11 +0100 [thread overview]
Message-ID: <9f2d69ec-d760-4189-ab63-a804c419cf0a@linaro.org> (raw)
In-Reply-To: <Z1cgKCUyvspIe7Nb@probook>
On 09/12/2024 17:51, J. Neuschäfer wrote:
> On Mon, Dec 09, 2024 at 04:04:50PM +0100, Caleb Connolly wrote:
>> On 05/12/2024 19:35, J. Neuschäfer via B4 Relay wrote:
>>> From: "J. Neuschäfer" <j.ne@posteo.net>
>>>
>>> The ufetch command is still quite useful on systems without block
>>> device support; remove the CONFIG_BLK dependency and make sure the code
>>> compiles/works with and without CONFIG_BLK.
>>>
>>> Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
>>
>> Small nit below, but with that:
>>
>> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
>>> ---
> [...]
>>> default:
>>> +#ifdef CONFIG_BLK
>>> + struct udevice *dev;
>>
>> At least without the #ifdef, I see a warning "A label followed by a
>> declaration is a C23 extension".
>
> Ah, I wondered about this. Apparently I have a compiler that uses C23 as
> the default, so I didn't see the warning. I'll fix it in the next revision.
>
>> So to be on the safe side please put this section in a block:
>>
>> default: {
>
> An alternative that I prefer because it's a bit less intrusive with
> regards to indentation, is to use a semicolon:
>
> default:;
> /* code with the same indentation as usual */
> /* and no closing brace to remember */
Hmm, haven't seen that one before. fwiw I think you can leave the
indentation as-is and just add the brackets.
Kind regards,
>
> What do you think?
>
>
> -- jn
--
// Caleb (they/them)
next prev parent reply other threads:[~2024-12-09 16:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-05 18:35 [PATCH 0/3] cmd: ufetch improvements J. Neuschäfer
2024-12-05 18:35 ` J. Neuschäfer via B4 Relay
2024-12-05 18:35 ` [PATCH 1/3] cmd: ufetch: Fix type mismatch on 32-bit J. Neuschäfer
2024-12-05 18:35 ` J. Neuschäfer via B4 Relay
2024-12-09 14:58 ` Caleb Connolly
2024-12-05 18:35 ` [PATCH 2/3] cmd: Allow building ufetch without CONFIG_BLK J. Neuschäfer
2024-12-05 18:35 ` J. Neuschäfer via B4 Relay
2024-12-09 15:04 ` Caleb Connolly
2024-12-09 16:51 ` J. Neuschäfer
2024-12-09 16:55 ` Caleb Connolly [this message]
2024-12-05 18:35 ` [PATCH 3/3] cmd: ufetch: Show CPU architecture under "CPU" J. Neuschäfer
2024-12-05 18:35 ` J. Neuschäfer via B4 Relay
2024-12-09 15:09 ` Caleb Connolly
2024-12-09 16:58 ` J. Neuschäfer
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=9f2d69ec-d760-4189-ab63-a804c419cf0a@linaro.org \
--to=caleb.connolly@linaro.org \
--cc=j.ne@posteo.net \
--cc=trini@konsulko.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.