The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Joey Pabalinas <joeypabalinas@gmail.com>
Cc: Phillip Potter <phil@philpotter.co.uk>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cdrom: add parentheses around macro arguments
Date: Sat, 6 Sep 2025 07:28:19 +0100	[thread overview]
Message-ID: <20250906062819.GU39973@ZenIV> (raw)
In-Reply-To: <13378f5c9cafc29425b6e420cad8b513f4a9f1e1.1757095005.git.joeypabalinas@gmail.com>

On Fri, Sep 05, 2025 at 07:59:40AM -1000, Joey Pabalinas wrote:
> Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
> ---
>  drivers/cdrom/cdrom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
> index 31ba1f8c1f7865dc99..462ee74621da6f32da 100644
> --- a/drivers/cdrom/cdrom.c
> +++ b/drivers/cdrom/cdrom.c
> @@ -408,11 +408,11 @@ static int cdrom_get_disc_info(struct cdrom_device_info *cdi,
>   * hack to have the capability flags defined const, while we can still
>   * change it here without gcc complaining at every line.
>   */
>  #define ENSURE(cdo, call, bits)					\
>  do {								\
> -	if (cdo->call == NULL)					\
> +	if ((cdo)->(call) == NULL)				\

You do realize that the right-hand argument of . and -> is *not* an
expression, right?  How would anything other than identifier work, anyway?
Note, BTW, that such identifier would not work as a standalone expression -
its meaning depends upon the structure of union you are dealing with...

General advise, from painful personal experience: before posting a patch,
make sure that you have
	* got enough caffeine in your bloodstream
	* looked through the patch
	* tried to compile the results
The order of the last two may vary, but the first one really needs to go
before anything else.

  parent reply	other threads:[~2025-09-06  6:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05 17:59 [PATCH] cdrom: add parentheses around macro arguments Joey Pabalinas
2025-09-06  6:03 ` kernel test robot
2025-09-06  6:28 ` Al Viro [this message]
2025-09-09 20:47   ` Phillip Potter

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=20250906062819.GU39973@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=joeypabalinas@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phil@philpotter.co.uk \
    /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