[PATCH 03/14] powerpc/vas: Define nx_fault_stamp in coprocessor_request_block

Christoph Hellwig hch at infradead.org
Wed Nov 27 19:30:55 AEDT 2019


> +#define crb_csb_addr(c)		__be64_to_cpu(c->csb_addr)
> +#define crb_nx_fault_addr(c)	__be64_to_cpu(c->stamp.nx.fault_storage_addr)
> +#define crb_nx_flags(c)		c->stamp.nx.flags
> +#define crb_nx_fault_status(c)	c->stamp.nx.fault_status

Except for crb_nx_fault_addr all these macros are unused, and
crb_nx_fault_addr probably makes more sense open coded in the only
caller.

Also please don't use the __ prefixed byte swap helpers in any driver
or arch code.

> +
> +static inline uint32_t crb_nx_pswid(struct coprocessor_request_block *crb)
> +{
> +	return __be32_to_cpu(crb->stamp.nx.pswid);
> +}

Same here.  Also not sure what the point of the helper is except for
obsfucating the code.


More information about the Linuxppc-dev mailing list