linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Donnellan <ajd@linux.ibm.com>
To: Li kunyu <kunyu@nfschina.com>,
	fbarrat@linux.ibm.com, arnd@arndb.de, gregkh@linuxfoundation.org
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] misc: ocxl: main: Remove unnecessary ‘0’ values from rc
Date: Mon, 20 Nov 2023 15:19:31 +1100	[thread overview]
Message-ID: <233c463be8440240dde08d0d0d564050a5bf5b73.camel@linux.ibm.com> (raw)
In-Reply-To: <20231113015229.12074-1-kunyu@nfschina.com>

On Mon, 2023-11-13 at 09:52 +0800, Li kunyu wrote:
> rc is assigned first, so it does not need to initialize the
> assignment.
> 
> Signed-off-by: Li kunyu <kunyu@nfschina.com>

I don't have strong feelings about whether to get rid of unnecessary
initialisations, but most of the code doesn't do it, so for
consistency:

Acked-by: Andrew Donnellan <ajd@linux.ibm.com>

> ---
>  drivers/misc/ocxl/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/misc/ocxl/main.c b/drivers/misc/ocxl/main.c
> index ef73cf35dda2b..658974143c3cc 100644
> --- a/drivers/misc/ocxl/main.c
> +++ b/drivers/misc/ocxl/main.c
> @@ -7,7 +7,7 @@
>  
>  static int __init init_ocxl(void)
>  {
> -	int rc = 0;
> +	int rc;
>  
>  	if (!tlbie_capable)
>  		return -EINVAL;

-- 
Andrew Donnellan    OzLabs, ADL Canberra
ajd@linux.ibm.com   IBM Australia Limited

  reply	other threads:[~2023-11-20  4:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13  1:52 [PATCH] misc: ocxl: main: Remove unnecessary ‘0’ values from rc Li kunyu
2023-11-20  4:19 ` Andrew Donnellan [this message]
2023-12-07 12:38 ` Michael Ellerman

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=233c463be8440240dde08d0d0d564050a5bf5b73.camel@linux.ibm.com \
    --to=ajd@linux.ibm.com \
    --cc=arnd@arndb.de \
    --cc=fbarrat@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kunyu@nfschina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).