Re: [PATCH v2 04/17] qla2xxx: Include Exchange offload/Extended Login into FW dump

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

 



On Tue, 2017-05-30 at 10:54 -0700, Himanshu Madhani wrote:
>  static inline void *
> +qla25xx_copy_exlogin(struct qla_hw_data *ha, void *ptr, uint32_t **last_chain)
> +{
> +	struct qla2xxx_offld_chain *c = ptr;
> +
> +	if (!ha->exlogin_buf)
> +		return ptr;
> +
> +	*last_chain = &c->type;
> +
> +	c->type = htonl(DUMP_CHAIN_EXLOGIN);
> +	c->chain_size = htonl(sizeof(struct qla2xxx_offld_chain) +
> +	    ha->exlogin_size);
> +	c->size = htonl(ha->exlogin_size);

Since this is not networking code, why is this code using htonl() instead of 
cpu_to_be32()?

> +	c->addr_l = htonl(LSD(ha->exlogin_buf_dma));
> +	c->addr_h = htonl(MSD(ha->exlogin_buf_dma));

Please use cpu_to_be64() instead of this weird construct.

> +	uint32_t addr_l;
> +	uint32_t addr_h;

Please declare this as a single 64-bit variable instead of using this weird
split into two 32-bit variables.

Thanks,

Bart.



[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