From: Dan Carpenter <dan.carpenter@linaro.org>
To: KrishnaAgarwal1308 <krishnaworkemail1308@gmail.com>
Cc: Andy Shevchenko <andy@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: fbtft: fix macro flow control warning and empty macro argument in fbtft-bus.c
Date: Mon, 2 Feb 2026 23:01:39 +0300 [thread overview]
Message-ID: <aYECoy7Apjwgzr9r@stanley.mountain> (raw)
In-Reply-To: <20260202162826.116739-1-krishnaworkemail1308@gmail.com>
On Mon, Feb 02, 2026 at 09:58:26PM +0530, KrishnaAgarwal1308 wrote:
> Fix checkpatch warning by adding identity modifier for define_fbtft_write_reg().
> No functional change.
>
This commit does two things. It introduces fbtft_identity()
and it flips the if (ret < 0) condition around to avoid the goto
inside a macro. Only the first change is mentioned in the commit
message.
I have see the fbtft_identity() approach before and I don't like it.
https://lore.kernel.org/all/20250718191935.5918-2-abronzo@mac.com/
The name identity() doesn't mean anything. It's a real word and
it has a meaning but it doesn't have a meaning which is at all
related to this code.
I think I would be okay with this the macro were called nop_endian()
or cpu_to_cpu_endian() or something. Or another approach is to just
leave the code as-is. Or maybe we could add a comment?
Regarding the flipped condition, the new code is badly formatted and
uglier than the original. I would prefer to leave it as-is.
regards,
dan carpenter
next prev parent reply other threads:[~2026-02-02 20:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 16:28 [PATCH] staging: fbtft: fix macro flow control warning and empty macro argument in fbtft-bus.c KrishnaAgarwal1308
2026-02-02 20:01 ` Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-02-03 4:47 [PATCH] Revert "staging: fbtft: remove goto from define_fbtft_write_reg macro and clarify empty modifier fbtft-bus.c" KrishnaAgarwal1308
2026-02-03 4:47 ` [PATCH] staging: fbtft: fix macro flow control warning and empty macro argument in fbtft-bus.c KrishnaAgarwal1308
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=aYECoy7Apjwgzr9r@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=andy@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=krishnaworkemail1308@gmail.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.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