lkml.org 
[lkml]   [2010]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/7] USB: gadget: file_storage: put_device() in error recovery
On Tue, 26 Oct 2010 17:14:52 +0200, Alan Stern <stern@rowland.harvard.edu> wrote:

> On Tue, 26 Oct 2010, [utf-8] Michał Nazarewicz wrote:
>
>> >> + if ((rc = device_create_file(&curlun->dev, &dev_attr_ro)) ||
>> >> + (rc = device_create_file(&curlun->dev, &dev_attr_nofua)) ||
>> >> + (rc = device_create_file(&curlun->dev, &dev_attr_file)))
>> >> + goto out;
>> >
>> > As long as you're changing these anyway, you may as well use the style
>> > most developers seem to prefer:
>> >
>> > rc = device_create_file(&curlun->dev, &dev_attr_ro);
>> > if (rc)
>> > goto out;
>> > ...
>>
>> But then it'd be total of 9 lines consisting of three 3-line ifs. I decided
>> that it would be more readable with a single if even though it is not compliant
>> with coding style. What do you think? I can just resend it.
>
> I think you should change it as I suggested.

OK, I'll resend the whole set tomorrow or the day after tomorrow.

--
Best regards, _ _
| Humble Liege of Serenely Enlightened Majesty of o' \,=./ `o
| Computer Science, Michał "mina86" Nazarewicz (o o)
+----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-10-26 17:27    [W:0.051 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site