mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michał Nazarewicz" <m.nazarewicz@samsung.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michal Nazarewicz <mina86@mina86.com>
Subject: Re: [PATCH 1/7] USB: gadget: file_storage: put_device() in error recovery
Date: Tue, 26 Oct 2010 17:26:47 +0200	[thread overview]
Message-ID: <op.vk6vuxix7p4s8u@pikus> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1010261113320.1634-100000@iolanthe.rowland.org>

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--

  reply	other threads:[~2010-10-26 15:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-26 13:38 Michal Nazarewicz
2010-10-26 13:38 ` [PATCH 2/7] USB: gadget: f_mass_storage: " Michal Nazarewicz
2010-10-26 13:38   ` [PATCH 3/7] USB: gadget: f_mass_storage: use ?: instead of a macro Michal Nazarewicz
2010-10-26 13:38     ` [PATCH 4/7] USB: gadget: f_mass_storage: drop START_TRANSFER() macro Michal Nazarewicz
2010-10-26 13:38       ` [PATCH 5/7] USB: gadget: f_mass_storage: remove needless complete() Michal Nazarewicz
2010-10-26 13:38         ` [PATCH 6/7] USB: gadget: f_mass_storage: code style clean ups Michal Nazarewicz
2010-10-26 13:38           ` [PATCH 7/7] usb: gadget: FunctionFS: fix typos and coding styles Michal Nazarewicz
2010-10-26 14:09 ` [PATCH 1/7] USB: gadget: file_storage: put_device() in error recovery Alan Stern
2010-10-26 15:03   ` Michał Nazarewicz
2010-10-26 15:14     ` Alan Stern
2010-10-26 15:26       ` Michał Nazarewicz [this message]
2010-10-28 15:31   ` [PATCHv2 " Michal Nazarewicz
2010-10-28 15:31     ` [PATCHv2 2/7] USB: gadget: f_mass_storage: " Michal Nazarewicz
2010-10-28 15:31     ` [PATCHv2 3/7] USB: gadget: f_mass_storage: use ?: instead of a macro Michal Nazarewicz
2010-10-28 15:31     ` [PATCHv2 4/7] USB: gadget: f_mass_storage: drop START_TRANSFER() macro Michal Nazarewicz
2010-10-28 15:31     ` [PATCHv2 5/7] USB: gadget: f_mass_storage: remove needless complete() Michal Nazarewicz
2010-10-28 15:31     ` [PATCHv2 6/7] USB: gadget: f_mass_storage: code style clean ups Michal Nazarewicz
2010-10-28 15:31     ` [PATCHv2 7/7] USB: gadget: FunctionFS: fix typos and coding styles Michal Nazarewicz
2010-11-11 13:59       ` Greg KH
2010-11-12 13:29         ` [PATCH 1/2] usb: gadget: FunctionFS: fix typos and coding style Michal Nazarewicz
2010-11-12 13:29           ` [PATCH 2/2] usb: gadget: f_fs: remove custom printk() wrappers Michal Nazarewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=op.vk6vuxix7p4s8u@pikus \
    --to=m.nazarewicz@samsung.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mina86@mina86.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome