Thread (10 messages) 10 messages, 3 authors, 2017-06-21

Re: [PATCH net-next 3/4] s390/diag: add diag26c support

flat view

From: David Miller <davem@davemloft.net>
Date: 2017-06-19 14:47:28
Also in: linux-s390

From: Julian Wiedmann <redacted>
Date: Mon, 19 Jun 2017 13:22:24 +0200
quoted hunk ↗ jump to hunk
+#define DIAG26C_GET_MAC	0x0000
+struct diag26c_mac_req {
+	u32	resp_buf_len;
+	u32	resp_version;
+	u16	op_code;
+	u16	devno;
+	u8	res[4];
+} __packed;
The packed attribute is not necessary here, the structure will be
perfectly packed together because of the types used and the order of
the members.

__packed is to be used only in the last possible resort for
correctness and every effort whatsoever should be used to avoid using
it.
quoted hunk ↗ jump to hunk
+
+struct diag26c_mac_resp {
+	u32	version;
+	u8	mac[ETH_ALEN];
+	u16	res;
+} __packed __aligned(8);
Using packed with an 8 byte alignment is even more unnecessary.

Again, it is not needed, so please don't use it.
+ */
+static inline int __diag26c(void *req, void *resp, enum diag26c_sc subcode)
Do not mark functions inline in *.c files, let the compiler decide.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help