On Thu, 2011-12-01 at 20:06 +0100, Bart Van Assche wrote:
> Register transport attributes after the attribute array has been
> set up instead of before.

Why?

I don't disagree with the change, but there should be at least a little
discussion of why you're doing it. Your last message about this to James
Bottomley had quite a bit of content, perhaps too much, but then his
comment that 'it's best practice to initialize a structure before
registering it' seems appropriate.

> Signed-off-by: Bart Van Assche <[email protected]>
> Cc: FUJITA Tomonori <[email protected]>
> Cc: Brian King <[email protected]>
> Cc: David Dillow <[email protected]>
> Cc: Roland Dreier <[email protected]>
> Cc: [email protected]
> ---
>  drivers/scsi/scsi_transport_srp.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/scsi/scsi_transport_srp.c 
> b/drivers/scsi/scsi_transport_srp.c
> index 21a045e..07c4394 100644
> --- a/drivers/scsi/scsi_transport_srp.c
> +++ b/drivers/scsi/scsi_transport_srp.c
> @@ -324,13 +324,14 @@ srp_attach_transport(struct srp_function_template *ft)
>       i->rport_attr_cont.ac.attrs = &i->rport_attrs[0];
>       i->rport_attr_cont.ac.class = &srp_rport_class.class;
>       i->rport_attr_cont.ac.match = srp_rport_match;
> -     transport_container_register(&i->rport_attr_cont);
>  
>       count = 0;
>       SETUP_RPORT_ATTRIBUTE_RD(port_id);
>       SETUP_RPORT_ATTRIBUTE_RD(roles);
>       i->rport_attrs[count] = NULL;
>  
> +     transport_container_register(&i->rport_attr_cont);
> +
>       i->f = ft;
>  
>       return &i->t;

-- 
Dave Dillow
National Center for Computational Science
Oak Ridge National Laboratory
(865) 241-6602 office

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to