2023-08-11 14:17:58

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH] bus: mhi: host: remove unused-but-set parameter

From: Arnd Bergmann <[email protected]>

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 <[email protected]>
---
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



2023-08-11 15:05:52

by Jeffrey Hugo

[permalink] [raw]
Subject: Re: [PATCH] bus: mhi: host: remove unused-but-set parameter

On 8/11/2023 7:45 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> 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 <[email protected]>

Reviewed-by: Jeffrey Hugo <[email protected]>


2023-08-11 15:25:11

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH] bus: mhi: host: remove unused-but-set parameter

On Fri, Aug 11, 2023 at 03:45:41PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> 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 <[email protected]>

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
>

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