U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Neuschäfer" <j.ne@posteo.net>
To: Caleb Connolly <caleb.connolly@linaro.org>
Cc: j.ne@posteo.net, 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 16:51:52 +0000	[thread overview]
Message-ID: <Z1cgKCUyvspIe7Nb@probook> (raw)
In-Reply-To: <3367bf91-1715-416b-b6d9-751f385971d4@linaro.org>

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 */

What do you think?


-- jn

  reply	other threads:[~2024-12-09 18:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-05 18:35 [PATCH 0/3] cmd: ufetch improvements 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 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 via B4 Relay
2024-12-09 15:04   ` Caleb Connolly
2024-12-09 16:51     ` J. Neuschäfer [this message]
2024-12-09 16:55       ` Caleb Connolly
2024-12-05 18:35 ` [PATCH 3/3] cmd: ufetch: Show CPU architecture under "CPU" 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=Z1cgKCUyvspIe7Nb@probook \
    --to=j.ne@posteo.net \
    --cc=caleb.connolly@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox