mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Alex Elder <elder@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	greybus-dev@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: greybus: Reformat code in gb_operation_sync_timeout()
Date: Tue, 15 Apr 2025 08:36:13 +0200	[thread overview]
Message-ID: <Z_3-XS2DHEbqkSdx@hovoldconsulting.com> (raw)
In-Reply-To: <BF2CF4C6-5381-4266-9E49-9C81E9604007@linux.dev>

On Mon, Apr 14, 2025 at 05:00:41PM +0200, Thorsten Blum wrote:
> On 14. Apr 2025, at 09:05, Johan Hovold wrote:
> > This just makes the code *less* readable.
> 
> I guess you prefer the code with curly braces?

Around multiline statements yes, but the proposed if-else here also
obscures the logic for no good reason.

> What about the Linux kernel coding style [1]? Specifically "Do not
> unnecessarily use braces where a single statement will do."
> 
> My patch just removes any unnecessary curly braces, resulting in less
> lines of code and no line break in the memcpy() arguments.

I really don't care, the code is more readable as it stands which is
what matters.

If you want to practise sending patches you can send all the "cleanups"
you want for code in drivers/staging where churn like this may be
accepted (and where the core greybus code no longer lives, contrary to
what your Subject suggests).

Johan

      reply	other threads:[~2025-04-15  6:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-13 10:48 Thorsten Blum
2025-04-14  7:05 ` Johan Hovold
2025-04-14 15:00   ` Thorsten Blum
2025-04-15  6:36     ` Johan Hovold [this message]

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=Z_3-XS2DHEbqkSdx@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thorsten.blum@linux.dev \
    /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

all inboxes | Powered by JetHome®