Thread (3 messages) 3 messages, 3 authors, 2019-11-27

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

From: Christoph Hellwig <hch@infradead.org>
Date: 2019-11-27 08:30:58
Also in: linux-devicetree

+#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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help