Skip to contentSkip to conversation

bus: mhi: host: remove unused-but-set parameter

PATCH Applied Arnd Bergmann 3 participants 3 messages Aug 11, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/bus/mhi/host/main.c | 1 -
 1 file changed, 1 deletion(-)
drivers/bus/mhi/host/main.c +0 -1
index 74a75439c7130..dcf627b36e829 100644
@@ -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:
Signature · 1 line
2.39.2
maintainer Applied
#2 lore raw
In reply to Arnd Bergmann
Quoted 10 lines · Arnd Bergmann

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.

Applied to mhi-next!

- Mani

Quoted 19 lines
---
 drivers/bus/mhi/host/main.c | 1 -
 1 file changed, 1 deletion(-)
drivers/bus/mhi/host/main.c +0 -1
index 74a75439c7130..dcf627b36e829 100644
@@ -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:
Signature · 1 line
2.39.2
Signature · 1 line
மணிவண்ணன் சதாசிவம்