* [PATCH] ATM: Delete no use FILL_RX_POOLS_IN_BH marco
@ 2011-07-08 13:01 stufever
2011-08-05 12:20 ` Wang Shaoyan
0 siblings, 1 reply; 2+ messages in thread
From: stufever @ 2011-07-08 13:01 UTC (permalink / raw)
To: netdev; +Cc: Wang Shaoyan, Chas Williams, linux-atm-general
From: Wang Shaoyan <wangshaoyan.pt@taobao.com>
The macro FILL_RX_POOLS_IN_BH is never been used, in order to avoid
the compiler reports error because of the usage of function INIT_WORK,
we just delete the marco.
Cc: Chas Williams <chas@cmf.nrl.navy.mil>
Cc: linux-atm-general@lists.sourceforge.net
Signed-off-by: Wang Shaoyan <wangshaoyan.pt@taobao.com>
---
drivers/atm/ambassador.c | 11 +----------
drivers/atm/ambassador.h | 4 ----
2 files changed, 1 insertions(+), 14 deletions(-)
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index a5fcb1e..bb3b016 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -813,7 +813,7 @@ static void fill_rx_pool (amb_dev * dev, unsigned char pool,
return;
}
-// top up all RX pools (can also be called as a bottom half)
+// top up all RX pools
static void fill_rx_pools (amb_dev * dev) {
unsigned char pool;
@@ -872,11 +872,7 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id) {
++irq_work;
if (irq_work) {
-#ifdef FILL_RX_POOLS_IN_BH
- schedule_work (&dev->bh);
-#else
fill_rx_pools (dev);
-#endif
PRINTD (DBG_IRQ, "work done: %u", irq_work);
} else {
@@ -2154,11 +2150,6 @@ static void setup_dev(amb_dev *dev, struct pci_dev *pci_dev)
dev->tx_avail = ATM_OC3_PCR;
dev->rx_avail = ATM_OC3_PCR;
-#ifdef FILL_RX_POOLS_IN_BH
- // initialise bottom half
- INIT_WORK(&dev->bh, (void (*)(void *)) fill_rx_pools, dev);
-#endif
-
// semaphore for txer/rxer modifications - we cannot use a
// spinlock as the critical region needs to switch processes
mutex_init(&dev->vcc_sf);
diff --git a/drivers/atm/ambassador.h b/drivers/atm/ambassador.h
index bd1c46a..aa97105 100644
--- a/drivers/atm/ambassador.h
+++ b/drivers/atm/ambassador.h
@@ -630,10 +630,6 @@ struct amb_dev {
u32 iobase;
u32 * membase;
-#ifdef FILL_RX_POOLS_IN_BH
- struct work_struct bh;
-#endif
-
amb_cq cq;
amb_txq txq;
amb_rxq rxq[NUM_RX_POOLS];
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ATM: Delete no use FILL_RX_POOLS_IN_BH marco
2011-07-08 13:01 [PATCH] ATM: Delete no use FILL_RX_POOLS_IN_BH marco stufever
@ 2011-08-05 12:20 ` Wang Shaoyan
0 siblings, 0 replies; 2+ messages in thread
From: Wang Shaoyan @ 2011-08-05 12:20 UTC (permalink / raw)
To: netdev
applied
2011/7/8 <stufever@gmail.com>:
> From: Wang Shaoyan <wangshaoyan.pt@taobao.com>
>
> The macro FILL_RX_POOLS_IN_BH is never been used, in order to avoid
> the compiler reports error because of the usage of function INIT_WORK,
> we just delete the marco.
>
> Cc: Chas Williams <chas@cmf.nrl.navy.mil>
> Cc: linux-atm-general@lists.sourceforge.net
> Signed-off-by: Wang Shaoyan <wangshaoyan.pt@taobao.com>
> ---
> drivers/atm/ambassador.c | 11 +----------
> drivers/atm/ambassador.h | 4 ----
> 2 files changed, 1 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
> index a5fcb1e..bb3b016 100644
> --- a/drivers/atm/ambassador.c
> +++ b/drivers/atm/ambassador.c
> @@ -813,7 +813,7 @@ static void fill_rx_pool (amb_dev * dev, unsigned char pool,
> return;
> }
>
> -// top up all RX pools (can also be called as a bottom half)
> +// top up all RX pools
> static void fill_rx_pools (amb_dev * dev) {
> unsigned char pool;
>
> @@ -872,11 +872,7 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id) {
> ++irq_work;
>
> if (irq_work) {
> -#ifdef FILL_RX_POOLS_IN_BH
> - schedule_work (&dev->bh);
> -#else
> fill_rx_pools (dev);
> -#endif
>
> PRINTD (DBG_IRQ, "work done: %u", irq_work);
> } else {
> @@ -2154,11 +2150,6 @@ static void setup_dev(amb_dev *dev, struct pci_dev *pci_dev)
> dev->tx_avail = ATM_OC3_PCR;
> dev->rx_avail = ATM_OC3_PCR;
>
> -#ifdef FILL_RX_POOLS_IN_BH
> - // initialise bottom half
> - INIT_WORK(&dev->bh, (void (*)(void *)) fill_rx_pools, dev);
> -#endif
> -
> // semaphore for txer/rxer modifications - we cannot use a
> // spinlock as the critical region needs to switch processes
> mutex_init(&dev->vcc_sf);
> diff --git a/drivers/atm/ambassador.h b/drivers/atm/ambassador.h
> index bd1c46a..aa97105 100644
> --- a/drivers/atm/ambassador.h
> +++ b/drivers/atm/ambassador.h
> @@ -630,10 +630,6 @@ struct amb_dev {
> u32 iobase;
> u32 * membase;
>
> -#ifdef FILL_RX_POOLS_IN_BH
> - struct work_struct bh;
> -#endif
> -
> amb_cq cq;
> amb_txq txq;
> amb_rxq rxq[NUM_RX_POOLS];
> --
> 1.7.4.1
>
>
--
Wang Shaoyan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-05 12:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-08 13:01 [PATCH] ATM: Delete no use FILL_RX_POOLS_IN_BH marco stufever
2011-08-05 12:20 ` Wang Shaoyan
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).