Re: [PATCH 1/4] aic7xxx: use scsi device as argument for BUILD_SCSIID()

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

 



On Tue, Mar 01, 2022 at 03:39:54PM +0100, Hannes Reinecke wrote:
> Signed-off-by: Hannes Reinecke <hare@xxxxxxxx>
> ---
>  drivers/scsi/aic7xxx/aic7xxx_osm.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> index d3b1082654d5..16d7a7310e90 100644
> --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
> @@ -799,10 +799,10 @@ struct scsi_host_template aic7xxx_driver_template = {
>  /**************************** Tasklet Handler *********************************/
>  
>  /******************************** Macros **************************************/
> -#define BUILD_SCSIID(ahc, cmd)						    \
> -	((((cmd)->device->id << TID_SHIFT) & TID)			    \
> -	| (((cmd)->device->channel == 0) ? (ahc)->our_id : (ahc)->our_id_b) \
> -	| (((cmd)->device->channel == 0) ? 0 : TWIN_CHNLB))
> +#define BUILD_SCSIID(ahc, sdev)						    \
> +	((((sdev)->id << TID_SHIFT) & TID)			    \
> +	| (((sdev)->channel == 0) ? (ahc)->our_id : (ahc)->our_id_b) \
> +	| (((sdev)->channel == 0) ? 0 : TWIN_CHNLB))

How about converting this to a function while you're at it?

Otherwise this looks good.

Same comment for aic79xx.



[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