From: Albert Zhou <albert.zhou.50@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, nic_swsd@realtek.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org
Subject: [PATCH net-next RFC 4/5] r8152: merge header into source
Date: Wed, 9 Nov 2022 02:33:41 +1100 [thread overview]
Message-ID: <20221108153342.18979-5-albert.zhou.50@gmail.com> (raw)
In-Reply-To: <20221108153342.18979-1-albert.zhou.50@gmail.com>
After commit 0d5072029433 ("r8152: remove backwards compatibility"), the
header r8152_compatibility.h is short enough to be merged into r8152.c;
in addition, the duplicated include <linux/acpi.h> was removed, as well
as the now unnecessary <linux/version.h>.
Signed-off-by: Albert Zhou <albert.zhou.50@gmail.com>
---
drivers/net/usb/r8152.c | 52 ++++++++++++++++++++++-
drivers/net/usb/r8152_compatibility.h | 61 ---------------------------
2 files changed, 51 insertions(+), 62 deletions(-)
delete mode 100644 drivers/net/usb/r8152_compatibility.h
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 85a3b2a7e83b..10dff6a88093 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -35,7 +35,57 @@
#include <linux/suspend.h>
#include <linux/atomic.h>
#include <linux/acpi.h>
-#include "r8152_compatibility.h"
+
+#include <linux/init.h>
+#include <linux/in.h>
+
+#if defined(RTL8152_S5_WOL) && defined(CONFIG_PM)
+#include <linux/reboot.h>
+#endif /* defined(RTL8152_S5_WOL) && defined(CONFIG_PM) */
+
+#include <linux/mdio.h>
+#include <uapi/linux/mdio.h>
+
+#ifndef FALSE
+ #define TRUE 1
+ #define FALSE 0
+#endif
+
+enum rtl_cmd {
+ RTLTOOL_PLA_OCP_READ_DWORD = 0,
+ RTLTOOL_PLA_OCP_WRITE_DWORD,
+ RTLTOOL_USB_OCP_READ_DWORD,
+ RTLTOOL_USB_OCP_WRITE_DWORD,
+ RTLTOOL_PLA_OCP_READ,
+ RTLTOOL_PLA_OCP_WRITE,
+ RTLTOOL_USB_OCP_READ,
+ RTLTOOL_USB_OCP_WRITE,
+ RTLTOOL_USB_INFO,
+ RTL_ENABLE_USB_DIAG,
+ RTL_DISABLE_USB_DIAG,
+
+ RTLTOOL_INVALID
+};
+
+struct usb_device_info {
+ __u16 idVendor;
+ __u16 idProduct;
+ __u16 bcdDevice;
+ __u8 dev_addr[8];
+ char devpath[16];
+};
+
+struct rtltool_cmd {
+ __u32 cmd;
+ __u32 offset;
+ __u32 byteen;
+ __u32 data;
+ void *buf;
+ struct usb_device_info nic_info;
+ struct sockaddr ifru_addr;
+ struct sockaddr ifru_netmask;
+ struct sockaddr ifru_hwaddr;
+};
/* Version Information */
#define DRIVER_VERSION "v2.16.3 (2022/07/06)"
diff --git a/drivers/net/usb/r8152_compatibility.h b/drivers/net/usb/r8152_compatibility.h
deleted file mode 100644
index 5f3eca6ee9ec..000000000000
--- a/drivers/net/usb/r8152_compatibility.h
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef LINUX_COMPATIBILITY_H
-#define LINUX_COMPATIBILITY_H
-
-/*
- * Definition and macro
- */
-
-#include <linux/init.h>
-#include <linux/version.h>
-#include <linux/in.h>
-#include <linux/acpi.h>
-
-#if defined(RTL8152_S5_WOL) && defined(CONFIG_PM)
-#include <linux/reboot.h>
-#endif /* defined(RTL8152_S5_WOL) && defined(CONFIG_PM) */
-
-#include <linux/mdio.h>
-#include <uapi/linux/mdio.h>
-
-#ifndef FALSE
- #define TRUE 1
- #define FALSE 0
-#endif
-
-enum rtl_cmd {
- RTLTOOL_PLA_OCP_READ_DWORD = 0,
- RTLTOOL_PLA_OCP_WRITE_DWORD,
- RTLTOOL_USB_OCP_READ_DWORD,
- RTLTOOL_USB_OCP_WRITE_DWORD,
- RTLTOOL_PLA_OCP_READ,
- RTLTOOL_PLA_OCP_WRITE,
- RTLTOOL_USB_OCP_READ,
- RTLTOOL_USB_OCP_WRITE,
- RTLTOOL_USB_INFO,
- RTL_ENABLE_USB_DIAG,
- RTL_DISABLE_USB_DIAG,
-
- RTLTOOL_INVALID
-};
-
-struct usb_device_info {
- __u16 idVendor;
- __u16 idProduct;
- __u16 bcdDevice;
- __u8 dev_addr[8];
- char devpath[16];
-};
-
-struct rtltool_cmd {
- __u32 cmd;
- __u32 offset;
- __u32 byteen;
- __u32 data;
- void *buf;
- struct usb_device_info nic_info;
- struct sockaddr ifru_addr;
- struct sockaddr ifru_netmask;
- struct sockaddr ifru_hwaddr;
-};
-
-#endif /* LINUX_COMPATIBILITY_H */
--
2.34.1
next prev parent reply other threads:[~2022-11-08 15:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 15:33 [PATCH net-next RFC 0/5] Update r8152 to version two Albert Zhou
2022-11-08 15:33 ` [PATCH net-next RFC 1/5] net: move back netif_set_gso_max helpers Albert Zhou
2022-11-08 17:27 ` Greg KH
2022-11-08 15:33 ` [PATCH net-next RFC 3/5] r8152: remove backwards compatibility Albert Zhou
2022-11-08 15:33 ` Albert Zhou [this message]
2022-11-08 15:33 ` [PATCH net-next RFC 5/5] r8152: remove redundant code Albert Zhou
[not found] ` <20221108153342.18979-3-albert.zhou.50@gmail.com>
2022-11-08 17:28 ` [PATCH net-next RFC 2/5] r8152: update to version two Greg KH
2022-11-09 4:50 ` Albert Zhou
2022-11-09 7:42 ` Greg KH
2022-11-08 20:50 ` [PATCH net-next RFC 0/5] Update r8152 " Jakub Kicinski
2022-11-09 4:43 ` Albert Zhou
2022-11-09 18:40 ` Jakub Kicinski
2022-11-16 15:13 ` Albert Zhou
2022-11-16 16:34 ` Jakub Kicinski
2022-11-08 21:03 ` Francois Romieu
2022-11-09 4:54 ` Albert Zhou
2022-11-09 11:02 ` Hayes Wang
2022-11-09 11:20 ` Albert Zhou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221108153342.18979-5-albert.zhou.50@gmail.com \
--to=albert.zhou.50@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kuba@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).