All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: rtl8192e: Remove struct rtl819x_ops that has no entries
@ 2023-02-23  6:47 Philipp Hortmann
  2023-02-23  6:47 ` [PATCH 1/2] staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE Philipp Hortmann
  2023-02-23  6:47 ` [PATCH 2/2] staging: rtl8192e: Remove empty struct rtl819x_ops Philipp Hortmann
  0 siblings, 2 replies; 3+ messages in thread
From: Philipp Hortmann @ 2023-02-23  6:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Replace macro RTL_PCI_DEVICE with PCI_DEVICE to get rid of struct
rtl819x_ops in this macro. Remove empty struct rtl819x_ops from
driver as it has no entries and is dead code.

Tested with rtl8192e
Transferred this patch over wlan connection of rtl8192e

This patch series requires the this patch series:
"[PATCH 0/7] staging: rtl8192e: Remove entries from struct rtl819x_ops start with .tx_enable"

Philipp Hortmann (2):
  staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE
  staging: rtl8192e: Remove empty struct rtl819x_ops

 drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 12 +++---------
 drivers/staging/rtl8192e/rtl8192e/rtl_core.h |  9 ---------
 2 files changed, 3 insertions(+), 18 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE
  2023-02-23  6:47 [PATCH 0/2] staging: rtl8192e: Remove struct rtl819x_ops that has no entries Philipp Hortmann
@ 2023-02-23  6:47 ` Philipp Hortmann
  2023-02-23  6:47 ` [PATCH 2/2] staging: rtl8192e: Remove empty struct rtl819x_ops Philipp Hortmann
  1 sibling, 0 replies; 3+ messages in thread
From: Philipp Hortmann @ 2023-02-23  6:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Replace macro RTL_PCI_DEVICE with PCI_DEVICE to get rid of rtl819xp_ops
which is empty.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 +++---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 5 -----
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 044cab649ff1..f5a155d1a81a 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -29,9 +29,9 @@ static const struct rtl819x_ops rtl819xp_ops = {
 };
 
 static struct pci_device_id rtl8192_pci_id_tbl[] = {
-	{RTL_PCI_DEVICE(0x10ec, 0x8192, rtl819xp_ops)},
-	{RTL_PCI_DEVICE(0x07aa, 0x0044, rtl819xp_ops)},
-	{RTL_PCI_DEVICE(0x07aa, 0x0047, rtl819xp_ops)},
+	{PCI_DEVICE(0x10ec, 0x8192)},
+	{PCI_DEVICE(0x07aa, 0x0044)},
+	{PCI_DEVICE(0x07aa, 0x0047)},
 	{}
 };
 
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index f75cc96052d9..c2a4b2ae6a81 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -55,11 +55,6 @@
 #define IS_HARDWARE_TYPE_8192SE(_priv)		\
 	(((struct r8192_priv *)rtllib_priv(dev))->card_8192 == NIC_8192SE)
 
-#define RTL_PCI_DEVICE(vend, dev, cfg) \
-	.vendor = (vend), .device = (dev), \
-	.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, \
-	.driver_data = (kernel_ulong_t)&(cfg)
-
 #define TOTAL_CAM_ENTRY		32
 #define CAM_CONTENT_COUNT	8
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] staging: rtl8192e: Remove empty struct rtl819x_ops
  2023-02-23  6:47 [PATCH 0/2] staging: rtl8192e: Remove struct rtl819x_ops that has no entries Philipp Hortmann
  2023-02-23  6:47 ` [PATCH 1/2] staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE Philipp Hortmann
@ 2023-02-23  6:47 ` Philipp Hortmann
  1 sibling, 0 replies; 3+ messages in thread
From: Philipp Hortmann @ 2023-02-23  6:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

Remove empty struct rtl819x_ops as it is dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 ------
 drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 4 ----
 2 files changed, 10 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index f5a155d1a81a..718d69b4ce16 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -25,9 +25,6 @@
 int hwwep = 1;
 static char *ifname = "wlan%d";
 
-static const struct rtl819x_ops rtl819xp_ops = {
-};
-
 static struct pci_device_id rtl8192_pci_id_tbl[] = {
 	{PCI_DEVICE(0x10ec, 0x8192)},
 	{PCI_DEVICE(0x07aa, 0x0044)},
@@ -2190,7 +2187,6 @@ static int _rtl92e_pci_probe(struct pci_dev *pdev,
 	unsigned long ioaddr = 0;
 	struct net_device *dev = NULL;
 	struct r8192_priv *priv = NULL;
-	struct rtl819x_ops *ops = (struct rtl819x_ops *)(id->driver_data);
 	unsigned long pmem_start, pmem_len, pmem_flags;
 	int err = -ENOMEM;
 	u8 revision_id;
@@ -2257,8 +2253,6 @@ static int _rtl92e_pci_probe(struct pci_dev *pdev,
 	if (pdev->device == 0x8192 && revision_id == 0x10)
 		goto err_unmap;
 
-	priv->ops = ops;
-
 	if (!rtl92e_check_adapter(pdev, dev))
 		goto err_unmap;
 
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index c2a4b2ae6a81..c8816c44ca51 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -198,9 +198,6 @@ struct rtl8192_tx_ring {
 	struct sk_buff_head queue;
 };
 
-struct rtl819x_ops {
-};
-
 struct r8192_priv {
 	struct pci_dev *pdev;
 	struct pci_dev *bridge_pdev;
@@ -218,7 +215,6 @@ struct r8192_priv {
 	struct delayed_work		txpower_tracking_wq;
 	struct delayed_work		rfpath_check_wq;
 	struct delayed_work		gpio_change_rf_wq;
-	struct rtl819x_ops			*ops;
 	struct rtllib_device			*rtllib;
 
 	struct work_struct				reset_wq;
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-23  6:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23  6:47 [PATCH 0/2] staging: rtl8192e: Remove struct rtl819x_ops that has no entries Philipp Hortmann
2023-02-23  6:47 ` [PATCH 1/2] staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE Philipp Hortmann
2023-02-23  6:47 ` [PATCH 2/2] staging: rtl8192e: Remove empty struct rtl819x_ops Philipp Hortmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.