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

Haren Myneni hbabu at us.ibm.com
Wed Nov 27 20:38:21 AEDT 2019



"Linuxppc-dev" <linuxppc-dev-bounces+hbabu=us.ibm.com at lists.ozlabs.org>
wrote on 11/27/2019 12:30:55 AM:

>
> > +#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.

Thanks, My mistake, code got changed and forgot to remove unused macros.

>
> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20191127/dd33036e/attachment-0001.htm>


More information about the Linuxppc-dev mailing list