Re: [PATCH 3/11] qla2xxx: Generalize SNS generic-services routines.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -47,6 +55,9 @@ qla2x00_prep_ms_iocb(scsi_qla_host_t *ha
>  {
>  	ms_iocb_entry_t *ms_pkt;
>  
> +	if (IS_QLA24XX(ha) || IS_QLA25XX(ha))
> +		return qla24xx_prep_ms_iocb(ha, req_size, rsp_size);
> +

this is horrible style.  Please move the guts of the code of this
function to qla2x00_old_prep_ms_iocb and make qla2x00_prep_ms_iocb
a wrapper.  Or given that you things like this in lots of places
add a proper method table and just call ->prep_ms_iocb on it.

>  	ms_pkt = ha->ms_iocb;
>  	memset(ms_pkt, 0, sizeof(ms_iocb_entry_t));
>  
> @@ -72,6 +83,42 @@ qla2x00_prep_ms_iocb(scsi_qla_host_t *ha
>  }
>  
>  /**
> + * qla24xx_prep_ms_iocb() - Prepare common CT IOCB fields for SNS CT query.
> + * @ha: HA context
> + * @req_size: request size in bytes
> + * @rsp_size: response size in bytes
> + *
> + * Returns a pointer to the @ha's ms_iocb.
> + */
> +static inline void *
> +qla24xx_prep_ms_iocb(scsi_qla_host_t *ha, uint32_t req_size, uint32_t rsp_size)

also please try to avoid defining functions below their usage.  it makes
reading the code a lot harder.

-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux