linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: "Singhal, Maneesh" <Maneesh.Singhal@emc.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"JBottomley@odin.com" <JBottomley@odin.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>
Subject: Re: [PATCH] drivers/scsi/emcctd: drivers/scsi/emcctd: Client driver implementation for  EMC-Symmetrix GuestOS emulated Cut-Through Device
Date: Mon, 25 Jan 2016 10:26:12 +0100	[thread overview]
Message-ID: <20160125092612.GB29561@c203.arch.suse.de> (raw)
In-Reply-To: <82807C73E0BDBB498164AAE7B8F6A1481C6181A4@MX105CL01.corp.emc.com>

On Sat, Jan 23, 2016 at 05:51:50AM +0000, Singhal, Maneesh wrote:
> Thanks for your time. My replies inlined...
> 

[...]

> > > +		}
> > > +
> > 
> > You don't do any cleanup work at
> > ctd_scsi_response_sanity_check_complete. You
> > could just reutrn 0 here as well. 
> [MS>] Just avoiding multiple exit points from the function

Please have a look at Documentation/CodingStyle Chapter 7: Centralized exiting 
of functions. Especially this part:

<quote>
The goto statement comes in handy when a function exits from multiple
locations and some common work such as cleanup has to be done.  If there is no
cleanup needed then just return directly.
</quote>

and the example below that section.

> > 
> > > +
> > > +		ctd_dprintk_crit(

[...]

> > > +	if (request && request->io_timeout < EMCCTD_MAX_RETRY) {
> > 
> > The following block is a bit long and therefore it's hard to spot an
> > eventual
> > error of handling the io_mgmt_lock. Can't it be factored out in a helper
> > function?
> > 
> [MS>] I know its little longer, but actually fits logically together... Will see if it can be factored. Not sure though.

Yes please. It's not uber important but short functions and paths are
generally favoured when debugging and reviewing code.


Thanks,
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  reply	other threads:[~2016-01-25  9:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19 11:58 [PATCH] drivers/scsi/emcctd: drivers/scsi/emcctd: Client driver implementation for EMC-Symmetrix GuestOS emulated Cut-Through Device Singhal, Maneesh
     [not found] ` <82807C73E0BDBB498164AAE7B8F6A1481C61263E-7nf3+EsVnp4EVr6dp/gChrOUoyqYp7Dr@public.gmane.org>
2016-01-19 13:50   ` Johannes Thumshirn
     [not found]     ` <20160119135016.GL2742-3LAbnSA0sDC4fIQPS+WK3rNAH6kLmebB@public.gmane.org>
2016-01-23  5:33       ` Singhal, Maneesh
2016-01-25  9:16         ` Johannes Thumshirn
2016-01-19 15:55   ` kbuild test robot
2016-01-19 16:04   ` Johannes Thumshirn
     [not found]     ` <20160119160421.GM2742-3LAbnSA0sDC4fIQPS+WK3rNAH6kLmebB@public.gmane.org>
2016-01-23  5:51       ` Singhal, Maneesh
2016-01-25  9:26         ` Johannes Thumshirn [this message]
     [not found]           ` <20160125092612.GB29561-3LAbnSA0sDC4fIQPS+WK3rNAH6kLmebB@public.gmane.org>
2016-01-25  9:30             ` Singhal, Maneesh
2016-01-25 10:08               ` Johannes Thumshirn
     [not found]                 ` <20160125100831.GC29561-3LAbnSA0sDC4fIQPS+WK3rNAH6kLmebB@public.gmane.org>
2016-01-25 10:16                   ` Singhal, Maneesh
2016-01-19 18:12   ` Greg KH
2016-01-23  6:04     ` Singhal, Maneesh
2016-01-19 15:37 ` kbuild test robot

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=20160125092612.GB29561@c203.arch.suse.de \
    --to=jthumshirn@suse.de \
    --cc=JBottomley@odin.com \
    --cc=Maneesh.Singhal@emc.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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;
as well as URLs for NNTP newsgroup(s).