Thread (8 messages) 8 messages, 3 authors, 2022-02-25

Re: [PATCH net-next 1/1] ice: add TTY for GNSS module for E810T device

From: Jakub Kicinski <kuba@kernel.org>
Date: 2022-02-24 18:15:50

On Thu, 24 Feb 2022 17:26:15 +0000 Nguyen, Anthony L wrote:
If you're okay with this, it looks like this patch still applies
cleanly. Would you like me to resend it or did you want to use this
one?
Are we talking about this?

+struct ice_aqc_i2c {
+	struct ice_aqc_link_topo_addr topo_addr;
+	__le16 i2c_addr;
+	u8 i2c_params;
+#define ICE_AQC_I2C_DATA_SIZE_S		0
+#define ICE_AQC_I2C_DATA_SIZE_M		(0xF << ICE_AQC_I2C_DATA_SIZE_S)
+#define ICE_AQC_I2C_USE_REPEATED_START	BIT(7)
+	u8 rsvd;
+	__le16 i2c_bus_addr;
+	u8 rsvd2[4];
+};

You can definitely improve it, even with the defines "inline" I'm 
not sure looking at this code which field those defines pertain to.
I'm guessing it's i2c_params because the next one is rsvd. Plus you 
should use kernel FIELD_* or filed_* accessors instead of defining
masks and shifts separately. I think I'm with Richard.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help