Thread (9 messages) flat view 9 messages, 2 authors, 2017-02-06

Re: [PATCH net-next v5 3/4] net: phy: Allow pre-declaration of MDIO devices

From: Andrew Lunn <andrew@lunn.ch>
Date: 2017-02-06 13:48:21
Also in: linux-arm-kernel, lkml

quoted hunk ↗ jump to hunk
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 8a57f0b1242d..8850fcaf50db 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -501,6 +501,7 @@ struct platform_device_id {
 	kernel_ulong_t driver_data;
 };
 
+#define MDIO_NAME_SIZE		32
...
+struct mdio_board_info {
+	const char	*bus_id;
+	char		modalias[MDIO_NAME_SIZE];
+
I think it might be better to use MII_BUS_ID_SIZE. These are all
related, so using one define should avoid surprise buffer overruns,
truncation's.

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help