Thread (11 messages) flat view 11 messages, 3 authors, 2026-01-29

Re: [PATCH net-next 1/3] net: usb: rtl8150: remove rtl8150_t typedef for struct rtl8150

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-01-25 16:40:04
Also in: linux-usb

On Sun, Jan 25, 2026 at 12:34:55AM -0800, Ethan Nelson-Moore wrote:
quoted hunk ↗ jump to hunk
It violates kernel code style guidelines to define typedefs for
non-opaque types. Update rtl8150 to conform to these guidelines by
expanding the rtl8150_t typedef. Also remove a few extra spaces after
the * in pointer declarations to adhere to kernel code style.

Signed-off-by: Ethan Nelson-Moore <redacted>
---
 drivers/net/usb/rtl8150.c | 68 +++++++++++++++++++--------------------
 1 file changed, 33 insertions(+), 35 deletions(-)
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c
index e40b0669d9f4..142bd468b2a3 100644
--- a/drivers/net/usb/rtl8150.c
+++ b/drivers/net/usb/rtl8150.c
@@ -144,8 +144,6 @@ struct rtl8150 {
 	u8 phy;
 };
 
-typedef struct rtl8150 rtl8150_t;
-
 struct async_req {
 	struct usb_ctrlrequest dr;
 	u16 rx_creg;
@@ -158,14 +156,14 @@ static const char driver_name [] = "rtl8150";
 **	device related part of the code
 **
 */
-static int get_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
+static int get_registers(struct rtl8150 *dev, u16 indx, u16 size, void *data)
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#clean-up-patches

  Netdev discourages patches which perform simple clean-ups, which are
  not in the context of other work. For example:

  Addressing checkpatch.pl, and other trivial coding style warnings

  Addressing Local variable ordering issues

  Conversions to device-managed APIs (devm_ helpers)

  This is because it is felt that the churn that such changes produce
  comes at a greater cost than the value of such clean-ups.

These patches are getting into this territory. If you have these
devices in your hand, and are going to add new features, when we might
accept them as part of a bigger patchsets. Otherwise we are likely to
reject them, they are just pointless churn.

     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