linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bus: mhi: host: remove unused-but-set parameter
@ 2023-08-11 13:45 Arnd Bergmann
  2023-08-11 13:51 ` Jeffrey Hugo
  2023-08-11 15:06 ` Manivannan Sadhasivam
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2023-08-11 13:45 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Nathan Chancellor, Nick Desaulniers
  Cc: Arnd Bergmann, Tom Rix, Jeffrey Hugo, Vivek Pernamitta,
	Carl Vanderlip, Qiang Yu, mhi, linux-arm-msm, linux-kernel, llvm

From: Arnd Bergmann <arnd@arndb.de>

Clang warns about a parameter that is decremented but never evaluated heere:

bus/mhi/host/main.c:803:13: error: parameter 'event_quota' set but not used [-Werror,-Wunused-but-set-parameter]
                             u32 event_quota)

Remove the access to the variable to avoid that warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/bus/mhi/host/main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/bus/mhi/host/main.c b/drivers/bus/mhi/host/main.c
index 74a75439c7130..dcf627b36e829 100644
--- a/drivers/bus/mhi/host/main.c
+++ b/drivers/bus/mhi/host/main.c
@@ -938,7 +938,6 @@ int mhi_process_ctrl_ev_ring(struct mhi_controller *mhi_cntrl,
 				if (!mhi_chan->configured)
 					break;
 				parse_xfer_event(mhi_cntrl, local_rp, mhi_chan);
-				event_quota--;
 			}
 			break;
 		default:
-- 
2.39.2


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

* Re: [PATCH] bus: mhi: host: remove unused-but-set parameter
  2023-08-11 13:45 [PATCH] bus: mhi: host: remove unused-but-set parameter Arnd Bergmann
@ 2023-08-11 13:51 ` Jeffrey Hugo
  2023-08-11 15:06 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 3+ messages in thread
From: Jeffrey Hugo @ 2023-08-11 13:51 UTC (permalink / raw)
  To: Arnd Bergmann, Manivannan Sadhasivam, Nathan Chancellor,
	Nick Desaulniers
  Cc: Arnd Bergmann, Tom Rix, Vivek Pernamitta, Carl Vanderlip,
	Qiang Yu, mhi, linux-arm-msm, linux-kernel, llvm

On 8/11/2023 7:45 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Clang warns about a parameter that is decremented but never evaluated heere:
> 
> bus/mhi/host/main.c:803:13: error: parameter 'event_quota' set but not used [-Werror,-Wunused-but-set-parameter]
>                               u32 event_quota)
> 
> Remove the access to the variable to avoid that warning.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>


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

* Re: [PATCH] bus: mhi: host: remove unused-but-set parameter
  2023-08-11 13:45 [PATCH] bus: mhi: host: remove unused-but-set parameter Arnd Bergmann
  2023-08-11 13:51 ` Jeffrey Hugo
@ 2023-08-11 15:06 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2023-08-11 15:06 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Nathan Chancellor, Nick Desaulniers, Arnd Bergmann, Tom Rix,
	Jeffrey Hugo, Vivek Pernamitta, Carl Vanderlip, Qiang Yu, mhi,
	linux-arm-msm, linux-kernel, llvm

On Fri, Aug 11, 2023 at 03:45:41PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Clang warns about a parameter that is decremented but never evaluated heere:
> 
> bus/mhi/host/main.c:803:13: error: parameter 'event_quota' set but not used [-Werror,-Wunused-but-set-parameter]
>                              u32 event_quota)
> 
> Remove the access to the variable to avoid that warning.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied to mhi-next!

- Mani

> ---
>  drivers/bus/mhi/host/main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/bus/mhi/host/main.c b/drivers/bus/mhi/host/main.c
> index 74a75439c7130..dcf627b36e829 100644
> --- a/drivers/bus/mhi/host/main.c
> +++ b/drivers/bus/mhi/host/main.c
> @@ -938,7 +938,6 @@ int mhi_process_ctrl_ev_ring(struct mhi_controller *mhi_cntrl,
>  				if (!mhi_chan->configured)
>  					break;
>  				parse_xfer_event(mhi_cntrl, local_rp, mhi_chan);
> -				event_quota--;
>  			}
>  			break;
>  		default:
> -- 
> 2.39.2
> 

-- 
மணிவண்ணன் சதாசிவம்

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

end of thread, other threads:[~2023-08-11 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11 13:45 [PATCH] bus: mhi: host: remove unused-but-set parameter Arnd Bergmann
2023-08-11 13:51 ` Jeffrey Hugo
2023-08-11 15:06 ` Manivannan Sadhasivam

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