Skip to contentSkip to conversation

net: usb: pegasus: Remove duplicated include from pegasus.c

PATCH In review 'Qiheng Lin 3 participants 3 messages Mar 25, 2021

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: usb: pegasus: Remove duplicated include from pegasus.c

From: Qiheng Lin <[email protected]>

Remove duplicated include.

---
 drivers/net/usb/pegasus.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/usb/pegasus.c +0 -2
index 9a907182569c..e0ee5c096396 100644
@@ -65,7 +65,6 @@ static struct usb_eth_dev usb_dev_id[] = {
 	{.name = pn, .vendor = vid, .device = pid, .private = flags},
 #define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \
 	PEGASUS_DEV(pn, vid, pid, flags)
-#include "pegasus.h"
 #undef	PEGASUS_DEV
 #undef	PEGASUS_DEV_CLASS
 	{NULL, 0, 0, 0},
@@ -84,7 +83,6 @@ static struct usb_device_id pegasus_ids[] = {
 #define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \
 	{.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_CLASS), \
 	.idVendor = vid, .idProduct = pid, .bDeviceClass = dclass},
-#include "pegasus.h"
 #undef	PEGASUS_DEV
 #undef	PEGASUS_DEV_CLASS
 	{},
#1 lore raw
Quoted 24 lines · Qiheng Lin

From: Qiheng Lin <[email protected]>

Remove duplicated include.

---
 drivers/net/usb/pegasus.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/usb/pegasus.c +0 -1
index 9a907182569c..e0ee5c096396 100644
@@ -65,7 +65,6 @@ static struct usb_eth_dev usb_dev_id[] = {
 	{.name = pn, .vendor = vid, .device = pid, .private = flags},
 #define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \
 	PEGASUS_DEV(pn, vid, pid, flags)
-#include "pegasus.h"
 #undef	PEGASUS_DEV
 #undef	PEGASUS_DEV_CLASS
 	{NULL, 0, 0, 0},

drivers/net/usb/pegasus.c static struct usb_device_id pegasus_ids[] = { · line 88

Quoted 7 lines
drivers/net/usb/pegasus.c +0 -1
@@ -84,7 +83,6 @@ static struct usb_device_id pegasus_ids[] = {
 #define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \
 	{.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_CLASS), \
 	.idVendor = vid, .idProduct = pid, .bDeviceClass = dclass},
-#include "pegasus.h"
 #undef	PEGASUS_DEV
 #undef	PEGASUS_DEV_CLASS
 	{},

Did you build and test this code now with this change?

I think you broke this driver badly now :(

Please think about _why_ the code would have been written this way in the first place, it is a bit odd, right?

netdev maintainers, consider this a NAK.

thanks,

greg k-h

maintainer
#2 lore raw
In reply to 'Qiheng Lin
Quoted 3 lines · Qiheng Lin

From: Qiheng Lin <[email protected]>

Remove duplicated include.

It is not duplicated so do not remove it. Go ahead and look carefully at the code, please.

Petko

Quoted 28 lines
---
 drivers/net/usb/pegasus.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/usb/pegasus.c +0 -2
index 9a907182569c..e0ee5c096396 100644
@@ -65,7 +65,6 @@ static struct usb_eth_dev usb_dev_id[] = {
 	{.name = pn, .vendor = vid, .device = pid, .private = flags},
 #define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \
 	PEGASUS_DEV(pn, vid, pid, flags)
-#include "pegasus.h"
 #undef	PEGASUS_DEV
 #undef	PEGASUS_DEV_CLASS
 	{NULL, 0, 0, 0},
@@ -84,7 +83,6 @@ static struct usb_device_id pegasus_ids[] = {
 #define PEGASUS_DEV_CLASS(pn, vid, pid, dclass, flags) \
 	{.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_CLASS), \
 	.idVendor = vid, .idProduct = pid, .bDeviceClass = dclass},
-#include "pegasus.h"
 #undef	PEGASUS_DEV
 #undef	PEGASUS_DEV_CLASS
 	{},