USB: gadget: f_mass_storage: Fix unused variable warning
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 11 Aug 2023 17:47:04 +0000 (13:47 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Aug 2023 08:06:12 +0000 (10:06 +0200)
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")
Link: https://lore.kernel.org/r/cfed16c7-aa46-494b-ba84-b0e0dc99be3a@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_mass_storage.c

index da07e45..722a3ab 100644 (file)
@@ -927,7 +927,7 @@ static void invalidate_sub(struct fsg_lun *curlun)
 {
        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);