Re: [PATCH v3 4/5] qla2xxx: Convert MAKE_HANDLE() from a define into an inline function

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

 



Hi Bart,

On Wed, Feb 19, 2020 at 08:34:40PM -0800, Bart Van Assche wrote:
> -#define MAKE_HANDLE(x, y) ((uint32_t)((((uint32_t)(x)) << 16) | (uint32_t)(y)))
> +static inline uint32_t make_handle(uint16_t x, uint16_t y)
> +{
> +	return ((uint32_t)x << 16) | y;
> +}
>  
>  /*
>   * I/O register
> diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
> index 47bf60a9490a..1816660768da 100644
> --- a/drivers/scsi/qla2xxx/qla_iocb.c
> +++ b/drivers/scsi/qla2xxx/qla_iocb.c
> @@ -530,7 +530,7 @@ __qla2x00_marker(struct scsi_qla_host *vha, struct qla_qpair *qpair,
>  			int_to_scsilun(lun, (struct scsi_lun *)&mrk24->lun);
>  			host_to_fcp_swap(mrk24->lun, sizeof(mrk24->lun));
>  			mrk24->vp_index = vha->vp_idx;
> -			mrk24->handle = MAKE_HANDLE(req->id, mrk24->handle);
> +			mrk24->handle = make_handle(req->id, mrk24->handle);

The type of mrk24->handle is uint32_t and make_handle() is using type
uint16_t. Shouldn't the argument type for the y argument be uint32_t
as well?

Thanks,
Daniel



[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