diff mbox series

USB: gadget: f_mass_storage: Fix unused variable warning

Message ID cfed16c7-aa46-494b-ba84-b0e0dc99be3a@rowland.harvard.edu (mailing list archive)
State Accepted
Commit 55c3e571d2a0aabef4f1354604443f1c415d2e85
Headers show
Series USB: gadget: f_mass_storage: Fix unused variable warning | expand

Commit Message

Alan Stern Aug. 11, 2023, 5:47 p.m. UTC
Fix a "variable set but not used" warning in f_mass_storage.c.  rc is 
used if	verbose debugging is enabled but not otherwise.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Fixes: d5e2b67aae79 ("USB: g_mass_storage: template f_mass_storage.c file created")

---

Resend: I forgot to CC: the mailing list the first time.

 drivers/usb/gadget/function/f_mass_storage.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

Index: usb-devel/drivers/usb/gadget/function/f_mass_storage.c
===================================================================
--- usb-devel.orig/drivers/usb/gadget/function/f_mass_storage.c
+++ usb-devel/drivers/usb/gadget/function/f_mass_storage.c
@@ -927,7 +927,7 @@  static void invalidate_sub(struct fsg_lu
 {
 	struct file	*filp = curlun->filp;
 	struct inode	*inode = file_inode(filp);
-	unsigned long	rc;
+	unsigned long __maybe_unused	rc;
 
 	rc = invalidate_mapping_pages(inode->i_mapping, 0, -1);
 	VLDBG(curlun, "invalidate_mapping_pages -> %ld\n", rc);