From: Matthew Wilcox Date: Sat, 18 Apr 2020 18:44:09 +0000 Subject: Re: [PATCH 5/9] usb: fix empty-body warning in sysfs.c Message-Id: <20200418184409.GP5820@bombadil.infradead.org> List-Id: References: <20200418184111.13401-1-rdunlap@infradead.org> <20200418184111.13401-6-rdunlap@infradead.org> In-Reply-To: <20200418184111.13401-6-rdunlap@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Randy Dunlap Cc: alsa-devel@alsa-project.org, Dmitry Torokhov , Zzy Wysm , linux-kernel@vger.kernel.org, "J. Bruce Fields" , target-devel@vger.kernel.org, Dave Jiang , linux-scsi@vger.kernel.org, linux-nvdimm@lists.01.org, Vishal Verma , linux-input@vger.kernel.org, Alexander Viro , Dan Williams , Andrew Morton , linux-nfs@vger.kernel.org, "Martin K. Petersen" , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Takashi Iwai , Chuck Lever , linux-fsdevel@vger.kernel.org, Johannes Berg , Linus Torvalds On Sat, Apr 18, 2020 at 11:41:07AM -0700, Randy Dunlap wrote: > +++ linux-next-20200327/drivers/usb/core/sysfs.c > @@ -1263,7 +1263,7 @@ void usb_create_sysfs_intf_files(struct > if (!alt->string && !(udev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) > alt->string = usb_cache_string(udev, alt->desc.iInterface); > if (alt->string && device_create_file(&intf->dev, &dev_attr_interface)) > - ; /* We don't actually care if the function fails. */ > + do_empty(); /* We don't actually care if the function fails. */ > intf->sysfs_files_created = 1; > } Why not just? + if (alt->string) + device_create_file(&intf->dev, &dev_attr_interface);