[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3998d056-e115-4e36-2705-eea132cce7de@infradead.org>
Date: Sat, 18 Apr 2020 11:46:32 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Matthew Wilcox <willy@...radead.org>
Cc: linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
linux-input@...r.kernel.org, Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org,
"J. Bruce Fields" <bfields@...ldses.org>,
Chuck Lever <chuck.lever@...cle.com>,
linux-nfs@...r.kernel.org,
Johannes Berg <johannes@...solutions.net>,
Dan Williams <dan.j.williams@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Dave Jiang <dave.jiang@...el.com>, linux-nvdimm@...ts.01.org,
"Martin K. Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
Zzy Wysm <zzy@...wysm.com>
Subject: Re: [PATCH 5/9] usb: fix empty-body warning in sysfs.c
On 4/18/20 11:44 AM, Matthew Wilcox wrote:
> 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);
>
Yes, looks good. Thanks.
--
~Randy
Powered by blists - more mailing lists