[PATCH 5/8] staging: dwc2: remove use of NO_FS_PHY_HW_CHECKS macro

2013-11-22 Thread Paul Zimmerman
NO_FS_PHY_HW_CHECKS is never defined, so remove the conditional code that checks for it being set Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/core.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c index 8

[PATCH 1/8] staging: dwc2: fix some functions to return a proper error code

2013-11-22 Thread Paul Zimmerman
Fix some functions called by dwc2_hcd_qtd_add() to return either a proper error code or 0, instead of somewhat random values. Then change the caller of dwc2_hcd_qtd_add() to just check the return value for 0. Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/hcd.c | 6 +++--- drivers/

[PATCH 7/8] staging: dwc2: rename dwc2_check_core_status()

2013-11-22 Thread Paul Zimmerman
Rename dwc2_check_core_status() to dwc2_is_controller_alive(), and make it a boolean function. Also change the message when the controller is dead to say "dead" instead of "disconnected". Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/core.c | 6 +++--- drivers/staging/dwc2/core.h

[PATCH 6/8] staging: dwc2: remove useless cast

2013-11-22 Thread Paul Zimmerman
Remove useless cast in dwc2_get_otg_version() Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c index 6149fbc..5b490a4 100644 --- a/drivers/staging/dwc2/core.

[PATCH 8/8] staging: dwc2: remove #ifdef DEBUG from a couple of places

2013-11-22 Thread Paul Zimmerman
Remove #ifdef DEBUG from a couple of places where it is not needed Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/core_intr.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/dwc2/core_intr.c b/drivers/staging/dwc2/core_intr.c index c78bb5d..8205799 100644 --- a/d

[PATCH 4/8] staging: dwc2: make all the dwc2_set_param* functions void

2013-11-22 Thread Paul Zimmerman
We were not checking the return value from any of these functions, so make them void functions Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/core.c | 193 drivers/staging/dwc2/core.h | 60 +++--- drivers/staging/dwc2/hcd.h | 4 +-

[PATCH 3/8] staging: dwc2: rename DWC2_PARAM_TEST to DWC2_OUT_OF_BOUNDS

2013-11-22 Thread Paul Zimmerman
DWC2_PARAM_TEST is not a very good name for this macro, so rename it to DWC2_OUT_OF_BOUNDS Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/core.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/st

[PATCH 2/8] staging: dwc2: fix potential use after free

2013-11-22 Thread Paul Zimmerman
dwc2_process_non_isoc_desc() can potentially free the qtd, so null out the qtd pointer if the call fails so we don't try to access it later Signed-off-by: Paul Zimmerman --- drivers/staging/dwc2/hcd_ddma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/dwc

[PATCH 0/8] staging: dwc2: cleanups for DWC2 driver

2013-11-22 Thread Paul Zimmerman
This is a series of cleanups to the DWC2 driver, in response to Dan Carpenter's review on 11/15/2013. I believe I have addressed all of Dan's suggestions, except for removing the validation checks from the dwc2_set_param_* functions. We depend on the validation checks for setting a default value fo

[PATCH 38/39] staging: comedi: ni_mio_common: remove DEBUG_STATUS_A messages

2013-11-22 Thread H Hartley Sweeten
Defining DEBUG_STATUS_A enables dumping of a status register during the interrupt. These messages are just added noise. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 31 -- 1 file

[PATCH 33/39] staging: comedi: pcl818: remove an unnecessary printk(KERN_DEBUG ...

2013-11-22 Thread H Hartley Sweeten
This debug message is just added noise. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/p

[PATCH 15/39] staging: comedi: comedi_fops: remove use of DPRINTK

2013-11-22 Thread H Hartley Sweeten
Use dev_dbg(), or pr_debug() when dev is not valid, instead of the DPRINTK macro to output the comedi debugging information. Remove the debug messages for allocation failures. The failure will have already generated a message. Reword the messages that include the dev->minor number. This number wi

[PATCH 24/39] staging: comedi: ni_at_a2150: remove A2150_DEBUG

2013-11-22 Thread H Hartley Sweeten
The A2150_DEBUG define enables some development messages, specifically the ni_dum_regs() function. These messages are just added noise. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_at_a2150.c | 25

[PATCH 04/39] staging: comedi: dt282x: remove DEBUG define

2013-11-22 Thread H Hartley Sweeten
This define is not used by the driver. Just remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/fl512.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/fl512.c b/drivers/staging/comedi/drivers

[PATCH 16/39] staging: comedi: ni_pcidio: remove DEBUG_FLAGS define and code

2013-11-22 Thread H Hartley Sweeten
The DEBUG_FLAGS define enables some development code that outputs interrupt flags and status information in the interrupt handler. This information is just added noise. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_pcidi

[PATCH 18/39] staging: comedi: ni_pcidio: remove use of DPRINTK

2013-11-22 Thread H Hartley Sweeten
Remove the DPRINTK messages that are just function trace noise. Use dev_dbg() instead of the DPRINTK macro to output the comedi debugging information. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_pcidio.c | 34 ++-

staging: comedi: cleanup debugging support

2013-11-22 Thread H Hartley Sweeten
Currently the COMEDI_DEBUG option enables the comedi_debug module parameter as well as a DPRINTK() macro. To actually get debug messages to display the kernel still needs to be built with the -DDEBUG flag. Cleanup all the custom uses of DEBUG in comedi and use the COMEDI_DEBUG option to enable th

[PATCH 14/39] staging: comedi: dt2801: remove use of DPRINTK

2013-11-22 Thread H Hartley Sweeten
The DPRINTK messages in this driver are just added noise. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2801.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/comedi/drivers/dt2801.c b/drive

[PATCH 19/39] staging: comedi: remove DPRINTK macro

2013-11-22 Thread H Hartley Sweeten
All users of this macro have been converted to use dev_dbg(). Remove the unused macro. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/comedidev.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/comedidev.h b/driver

[PATCH 31/39] staging: comedi: c6xdigio: remove unnecessary c6xdigio_pwmo_insn_read()

2013-11-22 Thread H Hartley Sweeten
The pwm subdevice in this driver sets the subdev_flags to SDF_WRITEABLE so the s->insn_read callback is not needed. Since this callback simply outputs a printk(KERN_DEBUG ... message jsut remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/come

[PATCH 39/39] staging: comedi: ni_mio_common: remove DEBUG_INTERRUPT messages

2013-11-22 Thread H Hartley Sweeten
Defining DEBUG_INTERRUPT enables some function trace messages during the interrupt. These messages are just added noise. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 24 1 file

[PATCH 37/39] staging: comedi: ni_mio_common: remove DEBUG_STATUS_B messages

2013-11-22 Thread H Hartley Sweeten
Defining DEBUG_STATUS_B enables dumping of a status register during the interrupt. These messages are just added noise. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 29 -- 1 file

[PATCH 36/39] staging: comedi: ni_mio_common: remove DEBUG_DIO messages

2013-11-22 Thread H Hartley Sweeten
Defining DEBUG_DIO simply enables some function trace messages. These are just added noise. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 22 ++ 1 file changed, 2 insertions(+), 20 de

[PATCH 35/39] staging: comedi: ni_mio_common: remove unused NI_CS5529_DEBUG code

2013-11-22 Thread H Hartley Sweeten
The code blocked by #ifdef NI_CS5529_DEBUG is not used by the driver. Just remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 30 -- 1 file changed, 30 deletions(-) diff --git a/drivers

[PATCH 34/39] staging: comedi: dmm32at: remove some unnecessary printk(KERN_DEBUG ...

2013-11-22 Thread H Hartley Sweeten
These debug messages are just added noise. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dmm32at.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/dmm32at.c b/drivers/staging/comed

[PATCH 32/39] staging: comedi: dt2814: remove disabled irq probe code

2013-11-22 Thread H Hartley Sweeten
The irq probe code in dt2814_attach() is disabled by an #if 0 block. Just remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2814.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/drivers/staging

[PATCH 28/39] staging: comedi: pcmmio: remove commented out debug code

2013-11-22 Thread H Hartley Sweeten
Remove the commented out code in init_asics() that enables the rising edge interrupts on port0 of both asics. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmmio.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/sta

[PATCH 30/39] staging: comedi: pcmmio: convert a KERN_DEBUG message to dev_dbg()

2013-11-22 Thread H Hartley Sweeten
Convert a printk(KERN_DEBUG ... message to dev_dbg(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmmio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/

[PATCH 29/39] staging: comedi: dyna_pci10xx: convert a KERN_DEBUG message to dev_dbg()

2013-11-22 Thread H Hartley Sweeten
Convert a printk(KERN_DEBUG ... message to dev_dbg(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dyna_pci10xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/dyna_pci10xx.c b/

[PATCH 27/39] staging: comedi: pcmmio: remove DAMMIT_ITS_BROKEN debug

2013-11-22 Thread H Hartley Sweeten
These debug messages are just added noise. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmmio.c | 22 -- 1 file changed, 22 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drive

[PATCH 25/39] staging: comedi: cb_pcimdas: remove CBPCIMDAS_DEBUG

2013-11-22 Thread H Hartley Sweeten
This define is not used in the driver. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcimdas.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/d

[PATCH 26/39] staging: comedi: ni_pcimio: remove PCI_DEBUG

2013-11-22 Thread H Hartley Sweeten
This define is not used in the driver. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_pcimio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c b/drivers/staging/comedi/driv

[PATCH 23/39] staging: comedi: gsc_hpdi: remove DEBUG_PRINT

2013-11-22 Thread H Hartley Sweeten
The DEBUG_PRINT macro in this driver is used to output development debug tracing messages. These messages are just added noise. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/gsc_hpdi.c | 78 ---

[PATCH 22/39] staging: comedi: cb_pcidas64: remove DEBUG_PRINT

2013-11-22 Thread H Hartley Sweeten
The DEBUG_PRINT macro in this driver is used to output development debug tracing messages. These messages are just added noise. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidas64.c | 126 +--

[PATCH 20/39] staging: comedi: mite: remove MDPRINTK macro

2013-11-22 Thread H Hartley Sweeten
This macro is used by the comedi drivers that usee the mite module to output development function trace messages. These are just added noise. Remove the messages as well as the macro. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mite

[PATCH 21/39] staging: comedi: mite: remove DEBUG_MITE code

2013-11-22 Thread H Hartley Sweeten
The code protected by the DEBUG_MITE define outputs some development debug information. This information is just added noise in the final driver. Remove the code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mite.c | 134 ---

[PATCH 17/39] staging: comedi: ni_pcidio: remove debug_int()

2013-11-22 Thread H Hartley Sweeten
This function is not used by the driver. Just remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_pcidio.c | 31 -- 1 file changed, 31 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_pc

[PATCH 13/39] staging: comedi: amplc_pci230: remove use of DPRINTK

2013-11-22 Thread H Hartley Sweeten
Use dev_dbg() instead of the DPRINTK macro to output the comedi debugging information. The dev_dbg() will prefix the messages appropriately so remove the "comedi%d: amplc_pci230: " portion and use __func__ to show the actual function name for debugging. Signed-off-by: H Hartley Sweeten Cc: Ian A

[PATCH 11/39] staging: comedi: pcl816: remove use of DPRINTK

2013-11-22 Thread H Hartley Sweeten
Remove the DPRINTK messages that are just function trace noise. Use dev_dbg() instead of the DPRINTK macro to output the comedi debugging information. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 8 ++-- 1 file change

[PATCH 12/39] staging: comedi: amplc_pci224: remove use of DPRINTK

2013-11-22 Thread H Hartley Sweeten
Use dev_dbg() instead of the DPRINTK macro to output the comedi debugging information. The dev_dbg() will prefix the messages appropriately so remove the "comedi%d: " DRIVER_NAME portion and use __func__ to show the actual function name for debugging. Signed-off-by: H Hartley Sweeten Cc: Ian Abb

[PATCH 10/39] staging: comedi: range: remove use of DPRINTK

2013-11-22 Thread H Hartley Sweeten
Use dev_dbg() instead of the DPRINTK macro to output the comedi debugging information. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/range.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/r

[PATCH 09/39] staging: comedi: remove comedi_debug module parameter

2013-11-22 Thread H Hartley Sweeten
Remove this module parameter and use the CONFIG_COMEDI_DEBUG option to enable normal kernel debugging with -DDEBUG flag. Remove the #undef DEBUG from all the comedi source files so they will honour the -DDEBUG flag. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- dr

[PATCH 08/39] staging: comedi: dt3000: remove DEBUG define

2013-11-22 Thread H Hartley Sweeten
This define unables some debug code that prints the status flags during the interrupt handler. These messages are just added noise and it's probably not a good idea to spew them during the interrupt anyway. Remove the DEBUG define as well as the debug code. Signed-off-by: H Hartley Sweeten Cc: I

[PATCH 07/39] staging: comedi: ni_pcidio: remove DEBUG define

2013-11-22 Thread H Hartley Sweeten
This define is only used to enable some debug messages during the board attach. These are just added noise, remove them as well as the DEBUG define. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_atmio.c | 15 --- 1 file

[PATCH 05/39] staging: comedi: ni_pcidio: remove custom DPRINTK macro

2013-11-22 Thread H Hartley Sweeten
The comedi core defines a DPRINTK macro in comedidev.h. Use that macro instead of defining a private version in this driver. Also, remove the DEBUG define since it was only used to enable the DPRINTK macro. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/sta

[PATCH 03/39] staging: comedi: dt282x: remove DEBUG define

2013-11-22 Thread H Hartley Sweeten
This define is only used to enable a debug message during the board attach. The message is just added noise, remove it as well as the DEBUG define. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt282x.c | 10 -- 1 file changed

[PATCH 02/39] staging: comedi: pcl816: remove DEBUG macro

2013-11-22 Thread H Hartley Sweeten
This macro is only used to output some function tracing debug messages. These messages are just added noise so remove the DEBUG macro as well as the noise. Also, remove pcl816_cmdtest_out() which was only called as part of the DEBUG() in pcl816_ai_cmdtest(). Signed-off-by: H Hartley Sweeten Cc:

[PATCH 01/39] staging: comedi: das6402: remove DEBUG noise

2013-11-22 Thread H Hartley Sweeten
The private data does not contain 'das6402_irqcount' or 'das6402_wordsread' members so the printk noise produces build errors when DEBUG is defined. The other printk is just added noise. Remove the printk's to fix the build errors and remove the noise. Signed-off-by: H Hartley Sweeten Cc: Ian Ab

[PATCH v5 7/7] staging: et131x: update TODO list

2013-11-22 Thread ZHAO Gang
remove items that have been done Signed-off-by: ZHAO Gang Acked-by: Mark Einon --- v3 -> v4 -> v5: version bump, sequence number bump drivers/staging/et131x/README | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/et131x/README b/drivers/staging/et131x/README index 8da96a

[PATCH v5 6/7] staging: et131x: remove spinlock adapter->lock

2013-11-22 Thread ZHAO Gang
adapter->lock is only used in et131x_multicast(), which is eventually called by network stack function __dev_set_rx_mode(). __dev_set_rx_mode() is always called by (net_device *)dev->addr_list_lock hold, to protect from concurrent access. So adapter->lock is redundant. Signed-off-by: ZHAO Gang Ac

[PATCH v5 5/7] staging: et131x: stop read when hit max delay in et131x_phy_mii_read

2013-11-22 Thread ZHAO Gang
stop read and return error when hit max delay time. Signed-off-by: ZHAO Gang Acked-by: Mark Einon --- v3 -> v4 -> v5: version bump, sequence number bump drivers/staging/et131x/et131x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131

[PATCH v5 4/7] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread ZHAO Gang
As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY when tx failed. et131x_tx calls function et131x_send_packets, I put the work of et131x_send_packets directly into et131x_tx, and made some changes to let the code more readable. Signed-off-by: ZHAO Gang --- v3 -> v4: no change

[PATCH v5 3/7] staging: et131x: delete unnecessary variable in function et131x_init

2013-11-22 Thread ZHAO Gang
Variable u32 numrfd is not necessary in this function. Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 0a6cc62..6df7145 100644 --- a/drivers

[PATCH v5 2/7] staging: et131x: change function name

2013-11-22 Thread ZHAO Gang
Change function name from et1310_phy_power_down to et1310_phy_power_switch to better describe its functionality. Signed-off-by: ZHAO Gang --- drivers/staging/et131x/et131x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/stagin

[PATCH v5 1/7] staging: et131x: make some tweaks to reduce split lines

2013-11-22 Thread ZHAO Gang
1. As TODO list suggested, do this sort of things to reduce split lines: struct fbr_lookup *fbr; fbr = rx_local->fbr[id]; Then replace all the instances of "rx_local->fbr[id]" with fbr. 2. Some code style changes Signed-off-by: ZHAO Gang --- v4 -> v5: split "[PATCH v4 1/5

Re: [PATCH v4 1/5] staging: et131x: clean up code

2013-11-22 Thread Dan Carpenter
On Fri, Nov 22, 2013 at 08:35:39PM +0800, ZHAO Gang wrote: > On Fri, Nov 22, 2013 at 8:13 PM, Dan Carpenter > wrote: > > On Fri, Nov 22, 2013 at 07:37:58PM +0800, ZHAO Gang wrote: > >> On Fri, Nov 22, 2013 at 5:00 PM, Dan Carpenter > >> wrote: > >> > On Fri, Nov 22, 2013 at 04:44:48PM +0800, ZH

Re: [PATCH v4 1/5] staging: et131x: clean up code

2013-11-22 Thread ZHAO Gang
On Fri, Nov 22, 2013 at 8:13 PM, Dan Carpenter wrote: > On Fri, Nov 22, 2013 at 07:37:58PM +0800, ZHAO Gang wrote: >> On Fri, Nov 22, 2013 at 5:00 PM, Dan Carpenter >> wrote: >> > On Fri, Nov 22, 2013 at 04:44:48PM +0800, ZHAO Gang wrote: >> >> > >> >> > Otherwise this patch seems nice but it ne

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread ZHAO Gang
On Fri, Nov 22, 2013 at 7:56 PM, Denis Kirjanov wrote: > If you have no free TX descriptors that means that something went > wrong and it's a BUG. You have to tell the stack to stop sending > packets using netif_stop_queue() and reenable transmissions once tx > descriptors will be available. There

Re: [PATCH v4 1/5] staging: et131x: clean up code

2013-11-22 Thread Dan Carpenter
On Fri, Nov 22, 2013 at 07:37:58PM +0800, ZHAO Gang wrote: > On Fri, Nov 22, 2013 at 5:00 PM, Dan Carpenter > wrote: > > On Fri, Nov 22, 2013 at 04:44:48PM +0800, ZHAO Gang wrote: > >> > > >> > Otherwise this patch seems nice but it needs to be split up and resent. > >> > >> By the way, this mail

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread Denis Kirjanov
If you have no free TX descriptors that means that something went wrong and it's a BUG. You have to tell the stack to stop sending packets using netif_stop_queue() and reenable transmissions once tx descriptors will be available. There are a lot of live examples in the source tree. On 11/22/13, ZH

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread ZHAO Gang
On Fri, Nov 22, 2013 at 5:17 PM, Denis Kirjanov wrote: > On 11/22/13, Mark Einon wrote: >> On Wed, Nov 20, 2013 at 03:55:27PM +0800, ZHAO Gang wrote: >>> As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY >>> when tx failed. >>> >>> et131x_tx calls function et131x_send_packets,

Re: [PATCH v4 1/5] staging: et131x: clean up code

2013-11-22 Thread ZHAO Gang
On Fri, Nov 22, 2013 at 5:00 PM, Dan Carpenter wrote: > On Fri, Nov 22, 2013 at 04:44:48PM +0800, ZHAO Gang wrote: >> > >> > Otherwise this patch seems nice but it needs to be split up and resent. >> >> By the way, this mailing list is surely an open list, but I can't find >> how to subscribe it -

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread ZHAO Gang
On Fri, Nov 22, 2013 at 4:57 PM, Dan Carpenter wrote: > This is a lot of spaghetti. Just write it like this: > > > if (adapter->tx_ring.used >= NUM_TCB) > goto drop; > if (adapter->flags & FMP_ADAPTER_FAIL_SEND_MASK) > goto drop; > if (!neti

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread Denis Kirjanov
On 11/22/13, Mark Einon wrote: > On Wed, Nov 20, 2013 at 03:55:27PM +0800, ZHAO Gang wrote: >> As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY >> when tx failed. >> >> et131x_tx calls function et131x_send_packets, I put the work of >> et131x_send_packets directly into et131x_t

Re: [PATCH v4 1/5] staging: et131x: clean up code

2013-11-22 Thread Dan Carpenter
On Fri, Nov 22, 2013 at 04:44:48PM +0800, ZHAO Gang wrote: > > > > Otherwise this patch seems nice but it needs to be split up and resent. > > By the way, this mailing list is surely an open list, but I can't find > how to subscribe it - the website at driverdev.osuosl.org said it has > no publicl

Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

2013-11-22 Thread Dan Carpenter
On Thu, Nov 21, 2013 at 09:19:21PM +, Mark Einon wrote: > On Wed, Nov 20, 2013 at 03:55:27PM +0800, ZHAO Gang wrote: > > As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY > > when tx failed. > > > > et131x_tx calls function et131x_send_packets, I put the work of > > et131x_s

Re: [PATCH v4 1/5] staging: et131x: clean up code

2013-11-22 Thread ZHAO Gang
On Fri, Nov 22, 2013 at 4:08 PM, Dan Carpenter wrote: > On Fri, Nov 22, 2013 at 10:54:27AM +0800, ZHAO Gang wrote: >> 1. change function name: et1310_phy_power_down -> et1310_phy_power_switch >> change function name to better describe its functionality. >> >> 2. as TODO file suggested, do th

Re: [PATCH v4 1/5] staging: et131x: clean up code

2013-11-22 Thread Dan Carpenter
On Fri, Nov 22, 2013 at 10:54:27AM +0800, ZHAO Gang wrote: > 1. change function name: et1310_phy_power_down -> et1310_phy_power_switch > change function name to better describe its functionality. > > 2. as TODO file suggested, do this sort of things to reduce split lines > struct fbr_l