linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] ocxl: Remove the unneeded result variable
@ 2022-09-06  7:20 cgel.zte
  2022-09-07  7:34 ` Andrew Donnellan
  2022-10-04 13:26 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2022-09-06  7:20 UTC (permalink / raw)
  To: fbarrat
  Cc: ajd, mpe, npiggin, christophe.leroy, linuxppc-dev, linux-kernel,
	ye xingchen, Zeal Robot

From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value opal_npu_spa_clear_cache() directly instead of storing
it in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 arch/powerpc/platforms/powernv/ocxl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/ocxl.c b/arch/powerpc/platforms/powernv/ocxl.c
index 27c936075031..629067781cec 100644
--- a/arch/powerpc/platforms/powernv/ocxl.c
+++ b/arch/powerpc/platforms/powernv/ocxl.c
@@ -478,10 +478,8 @@ EXPORT_SYMBOL_GPL(pnv_ocxl_spa_release);
 int pnv_ocxl_spa_remove_pe_from_cache(void *platform_data, int pe_handle)
 {
 	struct spa_data *data = (struct spa_data *) platform_data;
-	int rc;
 
-	rc = opal_npu_spa_clear_cache(data->phb_opal_id, data->bdfn, pe_handle);
-	return rc;
+	return opal_npu_spa_clear_cache(data->phb_opal_id, data->bdfn, pe_handle);
 }
 EXPORT_SYMBOL_GPL(pnv_ocxl_spa_remove_pe_from_cache);
 
-- 
2.25.1

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

* Re: [PATCH linux-next] ocxl: Remove the unneeded result variable
  2022-09-06  7:20 [PATCH linux-next] ocxl: Remove the unneeded result variable cgel.zte
@ 2022-09-07  7:34 ` Andrew Donnellan
  2022-10-04 13:26 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Donnellan @ 2022-09-07  7:34 UTC (permalink / raw)
  To: cgel.zte, fbarrat
  Cc: mpe, npiggin, christophe.leroy, linuxppc-dev, linux-kernel,
	ye xingchen, Zeal Robot

On Tue, 2022-09-06 at 07:20 +0000, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value opal_npu_spa_clear_cache() directly instead of
> storing
> it in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>

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

> ---
>  arch/powerpc/platforms/powernv/ocxl.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/powernv/ocxl.c
> b/arch/powerpc/platforms/powernv/ocxl.c
> index 27c936075031..629067781cec 100644
> --- a/arch/powerpc/platforms/powernv/ocxl.c
> +++ b/arch/powerpc/platforms/powernv/ocxl.c
> @@ -478,10 +478,8 @@ EXPORT_SYMBOL_GPL(pnv_ocxl_spa_release);
>  int pnv_ocxl_spa_remove_pe_from_cache(void *platform_data, int
> pe_handle)
>  {
>         struct spa_data *data = (struct spa_data *) platform_data;
> -       int rc;
>  
> -       rc = opal_npu_spa_clear_cache(data->phb_opal_id, data->bdfn,
> pe_handle);
> -       return rc;
> +       return opal_npu_spa_clear_cache(data->phb_opal_id, data-
> >bdfn, pe_handle);
>  }
>  EXPORT_SYMBOL_GPL(pnv_ocxl_spa_remove_pe_from_cache);
>  

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


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

* Re: [PATCH linux-next] ocxl: Remove the unneeded result variable
  2022-09-06  7:20 [PATCH linux-next] ocxl: Remove the unneeded result variable cgel.zte
  2022-09-07  7:34 ` Andrew Donnellan
@ 2022-10-04 13:26 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2022-10-04 13:26 UTC (permalink / raw)
  To: cgel.zte, fbarrat
  Cc: linux-kernel, Zeal Robot, ajd, linuxppc-dev, ye xingchen,
	christophe.leroy, npiggin, mpe

On Tue, 6 Sep 2022 07:20:06 +0000, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value opal_npu_spa_clear_cache() directly instead of storing
> it in another redundant variable.
> 
> 

Applied to powerpc/next.

[1/1] ocxl: Remove the unneeded result variable
      https://git.kernel.org/powerpc/c/5e4952656bca1b5d8c2be36682dc66d844797ad2

cheers

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

end of thread, other threads:[~2022-10-04 13:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06  7:20 [PATCH linux-next] ocxl: Remove the unneeded result variable cgel.zte
2022-09-07  7:34 ` Andrew Donnellan
2022-10-04 13:26 ` 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).