* [PATCH 0/7] staging: rtl8192e: Remove entries from struct rtl819x_ops start with .tx_enable
@ 2023-02-21 20:52 Philipp Hortmann
2023-02-21 20:52 ` [PATCH 1/7] staging: rtl8192e: Remove entry .tx_enable from struct rtl819x_ops Philipp Hortmann
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-02-21 20:52 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Remove unnecessary entries from rtl819x_ops and replace them with
function names when required. This increases readability of the code as
the reader does not always need to look up the corresponding function
name. One patch just removes dead code which increases also readability.
Tested with rtl8192e
Transferred this patch over wlan connection of rtl8192e
This patch series requires the this patch series:
"[PATCH 00/11] staging: rtl8192e: Remove entries from struct rtl819x_ops
start with .get_eeprom_size"
Philipp Hortmann (7):
staging: rtl8192e: Remove entry .tx_enable from struct rtl819x_ops
staging: rtl8192e: Remove entry .interrupt_re.. from struct
rtl819x_ops
staging: rtl8192e: Remove entry .tx_check_stuc.. from struct
rtl819x_ops
staging: rtl8192e: Remove entry .rx_check_stuc.. from struct
rtl819x_ops
staging: rtl8192e: Remove dead code from struct rtl819x_ops
staging: rtl8192e: Remove entry .link_change from struct rtl819x_ops
staging: rtl8192e: Remove entry .nic_type from struct rtl819x_ops
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 20 +++++---------------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 12 ------------
drivers/staging/rtl8192e/rtl8192e/rtl_pci.c | 6 +++---
3 files changed, 8 insertions(+), 30 deletions(-)
--
2.39.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/7] staging: rtl8192e: Remove entry .tx_enable from struct rtl819x_ops
2023-02-21 20:52 [PATCH 0/7] staging: rtl8192e: Remove entries from struct rtl819x_ops start with .tx_enable Philipp Hortmann
@ 2023-02-21 20:52 ` Philipp Hortmann
2023-02-21 20:53 ` [PATCH 2/7] staging: rtl8192e: Remove entry .interrupt_re.. " Philipp Hortmann
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-02-21 20:52 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Remove entry .tx_enable and replace it with function name
rtl92e_enable_tx. This increases readability of the code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 +--
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index aa0456931b09..f1cde3fc8634 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -30,7 +30,6 @@ static const struct rtl819x_ops rtl819xp_ops = {
.link_change = rtl92e_link_change,
.rx_command_packet_handler = NULL,
.irq_clear = rtl92e_clear_irq,
- .tx_enable = rtl92e_enable_tx,
.interrupt_recognized = rtl92e_ack_irq,
.tx_check_stuck_handler = rtl92e_is_tx_stuck,
.rx_check_stuck_handler = rtl92e_is_rx_stuck,
@@ -1406,7 +1405,7 @@ void rtl92e_tx_enable(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
- priv->ops->tx_enable(dev);
+ rtl92e_enable_tx(dev);
rtllib_reset_queue(priv->rtllib);
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 71958c7a4cbf..79281c077182 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -211,7 +211,6 @@ struct rtl819x_ops {
struct sk_buff *skb,
struct rx_desc *pdesc);
void (*irq_clear)(struct net_device *dev);
- void (*tx_enable)(struct net_device *dev);
void (*interrupt_recognized)(struct net_device *dev,
u32 *p_inta, u32 *p_intb);
bool (*tx_check_stuck_handler)(struct net_device *dev);
--
2.39.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/7] staging: rtl8192e: Remove entry .interrupt_re.. from struct rtl819x_ops
2023-02-21 20:52 [PATCH 0/7] staging: rtl8192e: Remove entries from struct rtl819x_ops start with .tx_enable Philipp Hortmann
2023-02-21 20:52 ` [PATCH 1/7] staging: rtl8192e: Remove entry .tx_enable from struct rtl819x_ops Philipp Hortmann
@ 2023-02-21 20:53 ` Philipp Hortmann
2023-02-21 20:53 ` [PATCH 3/7] staging: rtl8192e: Remove entry .tx_check_stuc.. " Philipp Hortmann
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-02-21 20:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Remove entry .interrupt_recognized and replace it with function name
rtl92e_ack_irq. This increases readability of the code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 +--
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 --
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index f1cde3fc8634..3323bdf564ee 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -30,7 +30,6 @@ static const struct rtl819x_ops rtl819xp_ops = {
.link_change = rtl92e_link_change,
.rx_command_packet_handler = NULL,
.irq_clear = rtl92e_clear_irq,
- .interrupt_recognized = rtl92e_ack_irq,
.tx_check_stuck_handler = rtl92e_is_tx_stuck,
.rx_check_stuck_handler = rtl92e_is_rx_stuck,
};
@@ -2103,7 +2102,7 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
spin_lock_irqsave(&priv->irq_th_lock, flags);
- priv->ops->interrupt_recognized(dev, &inta, &intb);
+ rtl92e_ack_irq(dev, &inta, &intb);
if (!inta) {
spin_unlock_irqrestore(&priv->irq_th_lock, flags);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 79281c077182..d3558bf6ce23 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -211,8 +211,6 @@ struct rtl819x_ops {
struct sk_buff *skb,
struct rx_desc *pdesc);
void (*irq_clear)(struct net_device *dev);
- void (*interrupt_recognized)(struct net_device *dev,
- u32 *p_inta, u32 *p_intb);
bool (*tx_check_stuck_handler)(struct net_device *dev);
bool (*rx_check_stuck_handler)(struct net_device *dev);
};
--
2.39.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/7] staging: rtl8192e: Remove entry .tx_check_stuc.. from struct rtl819x_ops
2023-02-21 20:52 [PATCH 0/7] staging: rtl8192e: Remove entries from struct rtl819x_ops start with .tx_enable Philipp Hortmann
2023-02-21 20:52 ` [PATCH 1/7] staging: rtl8192e: Remove entry .tx_enable from struct rtl819x_ops Philipp Hortmann
2023-02-21 20:53 ` [PATCH 2/7] staging: rtl8192e: Remove entry .interrupt_re.. " Philipp Hortmann
@ 2023-02-21 20:53 ` Philipp Hortmann
2023-02-21 20:53 ` [PATCH 4/7] staging: rtl8192e: Remove entry .rx_check_stuc.. " Philipp Hortmann
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-02-21 20:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Remove entry .tx_check_stuck_handler and replace it with function name
rtl92e_is_tx_stuck. This increases readability of the code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 +--
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 3323bdf564ee..410c03833b9f 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -30,7 +30,6 @@ static const struct rtl819x_ops rtl819xp_ops = {
.link_change = rtl92e_link_change,
.rx_command_packet_handler = NULL,
.irq_clear = rtl92e_clear_irq,
- .tx_check_stuck_handler = rtl92e_is_tx_stuck,
.rx_check_stuck_handler = rtl92e_is_rx_stuck,
};
@@ -1055,7 +1054,7 @@ static enum reset_type _rtl92e_tx_check_stuck(struct net_device *dev)
spin_unlock_irqrestore(&priv->irq_th_lock, flags);
if (bCheckFwTxCnt) {
- if (priv->ops->tx_check_stuck_handler(dev))
+ if (rtl92e_is_tx_stuck(dev))
return RESET_TYPE_SILENT;
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index d3558bf6ce23..87be8aaa7822 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -211,7 +211,6 @@ struct rtl819x_ops {
struct sk_buff *skb,
struct rx_desc *pdesc);
void (*irq_clear)(struct net_device *dev);
- bool (*tx_check_stuck_handler)(struct net_device *dev);
bool (*rx_check_stuck_handler)(struct net_device *dev);
};
--
2.39.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/7] staging: rtl8192e: Remove entry .rx_check_stuc.. from struct rtl819x_ops
2023-02-21 20:52 [PATCH 0/7] staging: rtl8192e: Remove entries from struct rtl819x_ops start with .tx_enable Philipp Hortmann
` (2 preceding siblings ...)
2023-02-21 20:53 ` [PATCH 3/7] staging: rtl8192e: Remove entry .tx_check_stuc.. " Philipp Hortmann
@ 2023-02-21 20:53 ` Philipp Hortmann
2023-02-21 20:53 ` [PATCH 5/7] staging: rtl8192e: Remove dead code " Philipp Hortmann
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-02-21 20:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Remove entry .rx_check_stuck_handler and replace it with function name
rtl92e_is_rx_stuck. This increases readability of the code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 +----
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 410c03833b9f..15eab612b08f 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -30,7 +30,6 @@ static const struct rtl819x_ops rtl819xp_ops = {
.link_change = rtl92e_link_change,
.rx_command_packet_handler = NULL,
.irq_clear = rtl92e_clear_irq,
- .rx_check_stuck_handler = rtl92e_is_rx_stuck,
};
static struct pci_device_id rtl8192_pci_id_tbl[] = {
@@ -1063,9 +1062,7 @@ static enum reset_type _rtl92e_tx_check_stuck(struct net_device *dev)
static enum reset_type _rtl92e_rx_check_stuck(struct net_device *dev)
{
- struct r8192_priv *priv = rtllib_priv(dev);
-
- if (priv->ops->rx_check_stuck_handler(dev))
+ if (rtl92e_is_rx_stuck(dev))
return RESET_TYPE_SILENT;
return RESET_TYPE_NORESET;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 87be8aaa7822..43e1c651e6d2 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -211,7 +211,6 @@ struct rtl819x_ops {
struct sk_buff *skb,
struct rx_desc *pdesc);
void (*irq_clear)(struct net_device *dev);
- bool (*rx_check_stuck_handler)(struct net_device *dev);
};
struct r8192_priv {
--
2.39.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/7] staging: rtl8192e: Remove dead code from struct rtl819x_ops
2023-02-21 20:52 [PATCH 0/7] staging: rtl8192e: Remove entries from struct rtl819x_ops start with .tx_enable Philipp Hortmann
` (3 preceding siblings ...)
2023-02-21 20:53 ` [PATCH 4/7] staging: rtl8192e: Remove entry .rx_check_stuc.. " Philipp Hortmann
@ 2023-02-21 20:53 ` Philipp Hortmann
2023-02-21 20:53 ` [PATCH 6/7] staging: rtl8192e: Remove entry .link_change " Philipp Hortmann
2023-02-21 20:53 ` [PATCH 7/7] staging: rtl8192e: Remove entry .nic_type " Philipp Hortmann
6 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-02-21 20:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Remove entry .rx_command_packet_handler, .irq_clear and
.init_before_adapter_start as it is dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 --
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 5 -----
2 files changed, 7 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 15eab612b08f..0c1eb75f37f6 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -28,8 +28,6 @@ static char *ifname = "wlan%d";
static const struct rtl819x_ops rtl819xp_ops = {
.nic_type = NIC_8192E,
.link_change = rtl92e_link_change,
- .rx_command_packet_handler = NULL,
- .irq_clear = rtl92e_clear_irq,
};
static struct pci_device_id rtl8192_pci_id_tbl[] = {
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 43e1c651e6d2..e572915c1fd2 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -205,12 +205,7 @@ struct rtl8192_tx_ring {
struct rtl819x_ops {
enum nic_t nic_type;
- void (*init_before_adapter_start)(struct net_device *dev);
void (*link_change)(struct net_device *dev);
- bool (*rx_command_packet_handler)(struct net_device *dev,
- struct sk_buff *skb,
- struct rx_desc *pdesc);
- void (*irq_clear)(struct net_device *dev);
};
struct r8192_priv {
--
2.39.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 6/7] staging: rtl8192e: Remove entry .link_change from struct rtl819x_ops
2023-02-21 20:52 [PATCH 0/7] staging: rtl8192e: Remove entries from struct rtl819x_ops start with .tx_enable Philipp Hortmann
` (4 preceding siblings ...)
2023-02-21 20:53 ` [PATCH 5/7] staging: rtl8192e: Remove dead code " Philipp Hortmann
@ 2023-02-21 20:53 ` Philipp Hortmann
2023-02-21 20:53 ` [PATCH 7/7] staging: rtl8192e: Remove entry .nic_type " Philipp Hortmann
6 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2023-02-21 20:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Remove entry .link_change and replace it with function name
rtl92e_link_change. This increases readability of the code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 +--
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 0c1eb75f37f6..2d2f9d4a0ff5 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -27,7 +27,6 @@ static char *ifname = "wlan%d";
static const struct rtl819x_ops rtl819xp_ops = {
.nic_type = NIC_8192E,
- .link_change = rtl92e_link_change,
};
static struct pci_device_id rtl8192_pci_id_tbl[] = {
@@ -762,7 +761,7 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
priv->rtllib->softmac_hard_start_xmit = _rtl92e_hard_start_xmit;
priv->rtllib->set_chan = _rtl92e_set_chan;
- priv->rtllib->link_change = priv->ops->link_change;
+ priv->rtllib->link_change = rtl92e_link_change;
priv->rtllib->softmac_data_hard_start_xmit = _rtl92e_hard_data_xmit;
priv->rtllib->check_nic_enough_desc = _rtl92e_check_nic_enough_desc;
priv->rtllib->handle_assoc_response = _rtl92e_handle_assoc_response;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index e572915c1fd2..fa72f8891409 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -205,7 +205,6 @@ struct rtl8192_tx_ring {
struct rtl819x_ops {
enum nic_t nic_type;
- void (*link_change)(struct net_device *dev);
};
struct r8192_priv {
--
2.39.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 7/7] staging: rtl8192e: Remove entry .nic_type from struct rtl819x_ops
2023-02-21 20:52 [PATCH 0/7] staging: rtl8192e: Remove entries from struct rtl819x_ops start with .tx_enable Philipp Hortmann
` (5 preceding siblings ...)
2023-02-21 20:53 ` [PATCH 6/7] staging: rtl8192e: Remove entry .link_change " Philipp Hortmann
@ 2023-02-21 20:53 ` Philipp Hortmann
2023-02-22 13:40 ` Dan Carpenter
6 siblings, 1 reply; 9+ messages in thread
From: Philipp Hortmann @ 2023-02-21 20:53 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
Remove unchanged entry .nic_type and replace it with constant NIC_8192E.
This increases readability of the code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_pci.c | 6 +++---
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 2d2f9d4a0ff5..044cab649ff1 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -26,7 +26,6 @@ int hwwep = 1;
static char *ifname = "wlan%d";
static const struct rtl819x_ops rtl819xp_ops = {
- .nic_type = NIC_8192E,
};
static struct pci_device_id rtl8192_pci_id_tbl[] = {
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index fa72f8891409..f75cc96052d9 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -204,7 +204,6 @@ struct rtl8192_tx_ring {
};
struct rtl819x_ops {
- enum nic_t nic_type;
};
struct r8192_priv {
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
index 81e1bb856c60..0bc3e013001e 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
@@ -39,7 +39,7 @@ bool rtl92e_check_adapter(struct pci_dev *pdev, struct net_device *dev)
revision_id = pdev->revision;
pci_read_config_word(pdev, 0x3C, &irq_line);
- priv->card_8192 = priv->ops->nic_type;
+ priv->card_8192 = NIC_8192E;
if (device_id == 0x8192) {
switch (revision_id) {
@@ -64,10 +64,10 @@ bool rtl92e_check_adapter(struct pci_dev *pdev, struct net_device *dev)
}
}
- if (priv->ops->nic_type != priv->card_8192) {
+ if (priv->card_8192 != NIC_8192E) {
dev_info(&pdev->dev,
"Detect info(%x) and hardware info(%x) not match!\n",
- priv->ops->nic_type, priv->card_8192);
+ NIC_8192E, priv->card_8192);
dev_info(&pdev->dev,
"Please select proper driver before install!!!!\n");
return false;
--
2.39.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 7/7] staging: rtl8192e: Remove entry .nic_type from struct rtl819x_ops
2023-02-21 20:53 ` [PATCH 7/7] staging: rtl8192e: Remove entry .nic_type " Philipp Hortmann
@ 2023-02-22 13:40 ` Dan Carpenter
0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2023-02-22 13:40 UTC (permalink / raw)
To: Philipp Hortmann; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel
On Tue, Feb 21, 2023 at 09:53:43PM +0100, Philipp Hortmann wrote:
> Remove unchanged entry .nic_type and replace it with constant NIC_8192E.
> This increases readability of the code.
>
> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
> ---
> drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 -
> drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 -
> drivers/staging/rtl8192e/rtl8192e/rtl_pci.c | 6 +++---
> 3 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> index 2d2f9d4a0ff5..044cab649ff1 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
> @@ -26,7 +26,6 @@ int hwwep = 1;
> static char *ifname = "wlan%d";
>
> static const struct rtl819x_ops rtl819xp_ops = {
> - .nic_type = NIC_8192E,
> };
Delete.
>
> static struct pci_device_id rtl8192_pci_id_tbl[] = {
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
> index fa72f8891409..f75cc96052d9 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
> @@ -204,7 +204,6 @@ struct rtl8192_tx_ring {
> };
>
> struct rtl819x_ops {
> - enum nic_t nic_type;
> };
Delete this empty struct too.
Otherwise these patches are really nice. Thanks!
regards,
dan carpenter
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-02-22 13:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-21 20:52 [PATCH 0/7] staging: rtl8192e: Remove entries from struct rtl819x_ops start with .tx_enable Philipp Hortmann
2023-02-21 20:52 ` [PATCH 1/7] staging: rtl8192e: Remove entry .tx_enable from struct rtl819x_ops Philipp Hortmann
2023-02-21 20:53 ` [PATCH 2/7] staging: rtl8192e: Remove entry .interrupt_re.. " Philipp Hortmann
2023-02-21 20:53 ` [PATCH 3/7] staging: rtl8192e: Remove entry .tx_check_stuc.. " Philipp Hortmann
2023-02-21 20:53 ` [PATCH 4/7] staging: rtl8192e: Remove entry .rx_check_stuc.. " Philipp Hortmann
2023-02-21 20:53 ` [PATCH 5/7] staging: rtl8192e: Remove dead code " Philipp Hortmann
2023-02-21 20:53 ` [PATCH 6/7] staging: rtl8192e: Remove entry .link_change " Philipp Hortmann
2023-02-21 20:53 ` [PATCH 7/7] staging: rtl8192e: Remove entry .nic_type " Philipp Hortmann
2023-02-22 13:40 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox