public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: cgel.zte@gmail•com, linux-kernel@vger•kernel.org
Cc: ye xingchen <ye.xingchen@zte•com.cn>,
	Zeal Robot <zealci@zte•com.cn>,
	linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH linux-next] macintosh:adb:recordmcount:use !E in conditional statements
Date: Mon, 01 Aug 2022 16:36:06 +1000	[thread overview]
Message-ID: <87edy0bhd5.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20220801022521.1594464-1-ye.xingchen@zte.com.cn>

cgel.zte@gmail•com writes:
> From: ye xingchen <ye.xingchen@zte•com.cn>
>
> Use !E to replace the type of x == 0. This change is just to 
> simplify the code, no actual functional changes.
>
> Reported-by: Zeal Robot <zealci@zte•com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte•com.cn>
> ---
>  drivers/macintosh/adb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

The subject is wrong, why does it mention recordmcount?

But in general this is very old code which is best left alone unless
there's an actual bug, it doesn't need these sort of style refactorings
done to it IMO.

cheers

> diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
> index 1bbb9ca08d40..368ab25db234 100644
> --- a/drivers/macintosh/adb.c
> +++ b/drivers/macintosh/adb.c
> @@ -673,7 +673,7 @@ static int adb_open(struct inode *inode, struct file *file)
>  		goto out;
>  	}
>  	state = kmalloc(sizeof(struct adbdev_state), GFP_KERNEL);
> -	if (state == 0) {
> +	if (!state) {
>  		ret = -ENOMEM;
>  		goto out;
>  	}
> -- 
> 2.25.1

      reply	other threads:[~2022-08-01  6:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01  2:25 [PATCH linux-next] macintosh:adb:recordmcount:use !E in conditional statements cgel.zte
2022-08-01  6:36 ` Michael Ellerman [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=87edy0bhd5.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=cgel.zte@gmail$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=ye.xingchen@zte$(echo .)com.cn \
    --cc=zealci@zte$(echo .)com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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