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.

Reply via email to