lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221108153342.18979-5-albert.zhou.50@gmail.com>
Date:   Wed,  9 Nov 2022 02:33:41 +1100
From:   Albert Zhou <albert.zhou.50@...il.com>
To:     gregkh@...uxfoundation.org
Cc:     linux-usb@...r.kernel.org, nic_swsd@...ltek.com,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, netdev@...r.kernel.org
Subject: [PATCH net-next RFC 4/5] r8152: merge header into source

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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ