linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] misc: ocxl: main: Remove unnecessary ‘0’ values from rc
@ 2023-11-13  1:52 Li kunyu
  2023-11-20  4:19 ` Andrew Donnellan
  2023-12-07 12:38 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Li kunyu @ 2023-11-13  1:52 UTC (permalink / raw)
  To: fbarrat, ajd, arnd, gregkh; +Cc: Li kunyu, linuxppc-dev, linux-kernel

rc is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li kunyu <kunyu@nfschina.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;
-- 
2.18.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] misc: ocxl: main: Remove unnecessary ‘0’ values from rc
  2023-11-13  1:52 [PATCH] misc: ocxl: main: Remove unnecessary ‘0’ values from rc Li kunyu
@ 2023-11-20  4:19 ` Andrew Donnellan
  2023-12-07 12:38 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Donnellan @ 2023-11-20  4:19 UTC (permalink / raw)
  To: Li kunyu, fbarrat, arnd, gregkh; +Cc: linuxppc-dev, linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] misc: ocxl: main: Remove unnecessary ‘0’ values from rc
  2023-11-13  1:52 [PATCH] misc: ocxl: main: Remove unnecessary ‘0’ values from rc Li kunyu
  2023-11-20  4:19 ` Andrew Donnellan
@ 2023-12-07 12:38 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2023-12-07 12:38 UTC (permalink / raw)
  To: fbarrat, ajd, arnd, gregkh, Li kunyu; +Cc: linuxppc-dev, linux-kernel

On Mon, 13 Nov 2023 09:52:29 +0800, Li kunyu wrote:
> rc is assigned first, so it does not need to initialize the assignment.
> 
> 

Applied to powerpc/next.

[1/1] misc: ocxl: main: Remove unnecessary ‘0’ values from rc
      https://git.kernel.org/powerpc/c/29685ea5754f04c84ad443fd7c6869c68f636c26

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-07 12:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-13  1:52 [PATCH] misc: ocxl: main: Remove unnecessary ‘0’ values from rc Li kunyu
2023-11-20  4:19 ` Andrew Donnellan
2023-12-07 12:38 ` Michael Ellerman

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).