LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/5] treewide: Add missing breaks in switch/case
@ 2011-07-10  9:28 Joe Perches
  2011-07-10  9:28 ` [PATCH 1/5] gpio-tps65910.c: " Joe Perches
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Joe Perches @ 2011-07-10  9:28 UTC (permalink / raw)
  To: linux-wireless, ath5k-devel, linux-usb; +Cc: linux-kernel, netdev, alsa-devel

Found by grep.  Uncompiled/untested.

Joe Perches (5):
  gpio-tps65910.c: Add missing breaks in switch/case
  tps65910-irq: Add missing breaks in switch/case
  ath5k: Add missing breaks in switch/case
  fusb300_udc: Add missing breaks in switch/case
  dbri: Add missing breaks in switch/case

 drivers/gpio/gpio-tps65910.c          |    2 ++
 drivers/mfd/tps65910-irq.c            |    2 ++
 drivers/net/wireless/ath/ath5k/desc.c |    3 +++
 drivers/usb/gadget/fusb300_udc.c      |    3 +++
 sound/sparc/dbri.c                    |    5 +++++
 5 files changed, 15 insertions(+), 0 deletions(-)

-- 
1.7.6.131.g99019


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

* [PATCH 1/5] gpio-tps65910.c: Add missing breaks in switch/case
  2011-07-10  9:28 [PATCH 0/5] treewide: Add missing breaks in switch/case Joe Perches
@ 2011-07-10  9:28 ` Joe Perches
  2011-07-10 10:47   ` Grant Likely
  2011-07-10  9:28 ` [PATCH 2/5] tps65910-irq: " Joe Perches
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: Joe Perches @ 2011-07-10  9:28 UTC (permalink / raw)
  To: Grant Likely; +Cc: linux-kernel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/gpio/gpio-tps65910.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/gpio/gpio-tps65910.c b/drivers/gpio/gpio-tps65910.c
index 4171033..b9c1c29 100644
--- a/drivers/gpio/gpio-tps65910.c
+++ b/drivers/gpio/gpio-tps65910.c
@@ -81,8 +81,10 @@ void tps65910_gpio_init(struct tps65910 *tps65910, int gpio_base)
 	switch(tps65910_chip_id(tps65910)) {
 	case TPS65910:
 		tps65910->gpio.ngpio	= 6;
+		break;
 	case TPS65911:
 		tps65910->gpio.ngpio	= 9;
+		break;
 	default:
 		return;
 	}
-- 
1.7.6.131.g99019


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

* [PATCH 2/5] tps65910-irq: Add missing breaks in switch/case
  2011-07-10  9:28 [PATCH 0/5] treewide: Add missing breaks in switch/case Joe Perches
  2011-07-10  9:28 ` [PATCH 1/5] gpio-tps65910.c: " Joe Perches
@ 2011-07-10  9:28 ` Joe Perches
  2011-07-10  9:28 ` [PATCH 3/5] ath5k: " Joe Perches
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 19+ messages in thread
From: Joe Perches @ 2011-07-10  9:28 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-kernel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/mfd/tps65910-irq.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/tps65910-irq.c b/drivers/mfd/tps65910-irq.c
index 2bfad5c..a56be93 100644
--- a/drivers/mfd/tps65910-irq.c
+++ b/drivers/mfd/tps65910-irq.c
@@ -178,8 +178,10 @@ int tps65910_irq_init(struct tps65910 *tps65910, int irq,
 	switch (tps65910_chip_id(tps65910)) {
 	case TPS65910:
 		tps65910->irq_num = TPS65910_NUM_IRQ;
+		break;
 	case TPS65911:
 		tps65910->irq_num = TPS65911_NUM_IRQ;
+		break;
 	}
 
 	/* Register with genirq */
-- 
1.7.6.131.g99019


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

* [PATCH 3/5] ath5k: Add missing breaks in switch/case
  2011-07-10  9:28 [PATCH 0/5] treewide: Add missing breaks in switch/case Joe Perches
  2011-07-10  9:28 ` [PATCH 1/5] gpio-tps65910.c: " Joe Perches
  2011-07-10  9:28 ` [PATCH 2/5] tps65910-irq: " Joe Perches
@ 2011-07-10  9:28 ` Joe Perches
  2011-07-11 15:50   ` [ath5k-devel] " Pavel Roskin
  2011-07-11 21:24   ` Nick Kossifidis
  2011-07-10  9:28 ` [PATCH 4/5] fusb300_udc: " Joe Perches
  2011-07-10  9:28 ` [PATCH 5/5] dbri: Add missing breaks in switch/case Joe Perches
  4 siblings, 2 replies; 19+ messages in thread
From: Joe Perches @ 2011-07-10  9:28 UTC (permalink / raw)
  To: Jiri Slaby, Nick Kossifidis, Luis R. Rodriguez, Bob Copeland
  Cc: John W. Linville, linux-wireless, ath5k-devel, netdev, linux-kernel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/ath/ath5k/desc.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/desc.c b/drivers/net/wireless/ath/ath5k/desc.c
index 62172d5..f82383b 100644
--- a/drivers/net/wireless/ath/ath5k/desc.c
+++ b/drivers/net/wireless/ath/ath5k/desc.c
@@ -107,10 +107,13 @@ ath5k_hw_setup_2word_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
 		case AR5K_PKT_TYPE_BEACON:
 		case AR5K_PKT_TYPE_PROBE_RESP:
 			frame_type = AR5K_AR5210_TX_DESC_FRAME_TYPE_NO_DELAY;
+			break;
 		case AR5K_PKT_TYPE_PIFS:
 			frame_type = AR5K_AR5210_TX_DESC_FRAME_TYPE_PIFS;
+			break;
 		default:
 			frame_type = type;
+			break;
 		}
 
 		tx_ctl->tx_control_0 |=
-- 
1.7.6.131.g99019


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

* [PATCH 4/5] fusb300_udc: Add missing breaks in switch/case
  2011-07-10  9:28 [PATCH 0/5] treewide: Add missing breaks in switch/case Joe Perches
                   ` (2 preceding siblings ...)
  2011-07-10  9:28 ` [PATCH 3/5] ath5k: " Joe Perches
@ 2011-07-10  9:28 ` Joe Perches
  2011-07-11  6:39   ` Felipe Balbi
  2011-07-14  8:08   ` Sebastian Andrzej Siewior
  2011-07-10  9:28 ` [PATCH 5/5] dbri: Add missing breaks in switch/case Joe Perches
  4 siblings, 2 replies; 19+ messages in thread
From: Joe Perches @ 2011-07-10  9:28 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/usb/gadget/fusb300_udc.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/fusb300_udc.c b/drivers/usb/gadget/fusb300_udc.c
index 06353e7..453bc0f 100644
--- a/drivers/usb/gadget/fusb300_udc.c
+++ b/drivers/usb/gadget/fusb300_udc.c
@@ -688,10 +688,13 @@ static void fusb300_cmp_dbg_fifo(struct fusb300_ep *ep,
 	switch (length % 4) {
 	case 1:
 		golden_value = *tmp;
+		break;
 	case 2:
 		golden_value = *tmp | *(tmp + 1) << 8;
+		break;
 	case 3:
 		golden_value = *tmp | *(tmp + 1) << 8 | *(tmp + 2) << 16;
+		break;
 	default:
 		break;
 
-- 
1.7.6.131.g99019


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

* [PATCH 5/5] dbri: Add missing breaks in switch/case
  2011-07-10  9:28 [PATCH 0/5] treewide: Add missing breaks in switch/case Joe Perches
                   ` (3 preceding siblings ...)
  2011-07-10  9:28 ` [PATCH 4/5] fusb300_udc: " Joe Perches
@ 2011-07-10  9:28 ` Joe Perches
  2011-07-10 14:36   ` Joe Perches
  4 siblings, 1 reply; 19+ messages in thread
From: Joe Perches @ 2011-07-10  9:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel

Signed-off-by: Joe Perches <joe@perches.com>
---
 sound/sparc/dbri.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 73f9cba..ca978b1 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -578,14 +578,19 @@ static __u32 reverse_bytes(__u32 b, int len)
 	switch (len) {
 	case 32:
 		b = ((b & 0xffff0000) >> 16) | ((b & 0x0000ffff) << 16);
+		break;
 	case 16:
 		b = ((b & 0xff00ff00) >> 8) | ((b & 0x00ff00ff) << 8);
+		break;
 	case 8:
 		b = ((b & 0xf0f0f0f0) >> 4) | ((b & 0x0f0f0f0f) << 4);
+		break;
 	case 4:
 		b = ((b & 0xcccccccc) >> 2) | ((b & 0x33333333) << 2);
+		break;
 	case 2:
 		b = ((b & 0xaaaaaaaa) >> 1) | ((b & 0x55555555) << 1);
+		break;
 	case 1:
 	case 0:
 		break;
-- 
1.7.6.131.g99019


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

* Re: [PATCH 1/5] gpio-tps65910.c: Add missing breaks in switch/case
  2011-07-10  9:28 ` [PATCH 1/5] gpio-tps65910.c: " Joe Perches
@ 2011-07-10 10:47   ` Grant Likely
  0 siblings, 0 replies; 19+ messages in thread
From: Grant Likely @ 2011-07-10 10:47 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, Axel Lin

Axel published a patch that fixed this issue which is already in mainline.

g.

On Sun, Jul 10, 2011 at 6:28 PM, Joe Perches <joe@perches.com> wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/gpio/gpio-tps65910.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpio/gpio-tps65910.c b/drivers/gpio/gpio-tps65910.c
> index 4171033..b9c1c29 100644
> --- a/drivers/gpio/gpio-tps65910.c
> +++ b/drivers/gpio/gpio-tps65910.c
> @@ -81,8 +81,10 @@ void tps65910_gpio_init(struct tps65910 *tps65910, int gpio_base)
>        switch(tps65910_chip_id(tps65910)) {
>        case TPS65910:
>                tps65910->gpio.ngpio    = 6;
> +               break;
>        case TPS65911:
>                tps65910->gpio.ngpio    = 9;
> +               break;
>        default:
>                return;
>        }
> --
> 1.7.6.131.g99019
>
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* Re: [PATCH 5/5] dbri: Add missing breaks in switch/case
  2011-07-10  9:28 ` [PATCH 5/5] dbri: Add missing breaks in switch/case Joe Perches
@ 2011-07-10 14:36   ` Joe Perches
  0 siblings, 0 replies; 19+ messages in thread
From: Joe Perches @ 2011-07-10 14:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel

On Sun, 2011-07-10 at 02:28 -0700, Joe Perches wrote:

defective patch, please ignore.

> diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
> index 73f9cba..ca978b1 100644
> --- a/sound/sparc/dbri.c
> +++ b/sound/sparc/dbri.c
> @@ -578,14 +578,19 @@ static __u32 reverse_bytes(__u32 b, int len)
>  	switch (len) {
>  	case 32:
>  		b = ((b & 0xffff0000) >> 16) | ((b & 0x0000ffff) << 16);
> +		break;

Maybe add a comment for fall through use instead.



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

* Re: [PATCH 4/5] fusb300_udc: Add missing breaks in switch/case
  2011-07-10  9:28 ` [PATCH 4/5] fusb300_udc: " Joe Perches
@ 2011-07-11  6:39   ` Felipe Balbi
  2011-07-14  8:08   ` Sebastian Andrzej Siewior
  1 sibling, 0 replies; 19+ messages in thread
From: Felipe Balbi @ 2011-07-11  6:39 UTC (permalink / raw)
  To: Joe Perches; +Cc: Felipe Balbi, Greg Kroah-Hartman, linux-usb, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

On Sun, Jul 10, 2011 at 02:28:27AM -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>

if you want to carry via Trivial that's ok to me:

Acked-by: Felipe Balbi <balbi@ti.com>

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: [ath5k-devel] [PATCH 3/5] ath5k: Add missing breaks in switch/case
  2011-07-10  9:28 ` [PATCH 3/5] ath5k: " Joe Perches
@ 2011-07-11 15:50   ` Pavel Roskin
  2011-07-11 21:24   ` Nick Kossifidis
  1 sibling, 0 replies; 19+ messages in thread
From: Pavel Roskin @ 2011-07-11 15:50 UTC (permalink / raw)
  To: Joe Perches
  Cc: Jiri Slaby, Nick Kossifidis, Luis R. Rodriguez, Bob Copeland,
	netdev, ath5k-devel, linux-wireless, John W. Linville,
	linux-kernel

On 07/10/2011 05:28 AM, Joe Perches wrote:
> Signed-off-by: Joe Perches<joe@perches.com>

Acked-by: Pavel Roskin <proski@gnu.org>

> ---
>   drivers/net/wireless/ath/ath5k/desc.c |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/desc.c b/drivers/net/wireless/ath/ath5k/desc.c
> index 62172d5..f82383b 100644
> --- a/drivers/net/wireless/ath/ath5k/desc.c
> +++ b/drivers/net/wireless/ath/ath5k/desc.c
> @@ -107,10 +107,13 @@ ath5k_hw_setup_2word_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
>   		case AR5K_PKT_TYPE_BEACON:
>   		case AR5K_PKT_TYPE_PROBE_RESP:
>   			frame_type = AR5K_AR5210_TX_DESC_FRAME_TYPE_NO_DELAY;
> +			break;
>   		case AR5K_PKT_TYPE_PIFS:
>   			frame_type = AR5K_AR5210_TX_DESC_FRAME_TYPE_PIFS;
> +			break;
>   		default:
>   			frame_type = type;
> +			break;
>   		}

The intention here is to replace frame types from enum ath5k_pkt_type 
with their AR5210-specific counterparts.  So the intention is definitely 
to have breaks here.

Unfortunately, AR5210 cards are extremely rare these days.  I have one, 
but it only works with old motherboards.  It would take me half a day to 
dust off that system, compile the kernel and check the patch.  But I 
assume your patch is fine.  At least it's very unlikely to break anything.

-- 
Regards,
Pavel Roskin

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

* Re: [PATCH 3/5] ath5k: Add missing breaks in switch/case
  2011-07-10  9:28 ` [PATCH 3/5] ath5k: " Joe Perches
  2011-07-11 15:50   ` [ath5k-devel] " Pavel Roskin
@ 2011-07-11 21:24   ` Nick Kossifidis
  1 sibling, 0 replies; 19+ messages in thread
From: Nick Kossifidis @ 2011-07-11 21:24 UTC (permalink / raw)
  To: Joe Perches
  Cc: Jiri Slaby, Luis R. Rodriguez, Bob Copeland, John W. Linville,
	linux-wireless, ath5k-devel, netdev, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 1453 bytes --]

2011/7/10 Joe Perches <joe@perches.com>:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/net/wireless/ath/ath5k/desc.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/desc.c b/drivers/net/wireless/ath/ath5k/desc.c
> index 62172d5..f82383b 100644
> --- a/drivers/net/wireless/ath/ath5k/desc.c
> +++ b/drivers/net/wireless/ath/ath5k/desc.c
> @@ -107,10 +107,13 @@ ath5k_hw_setup_2word_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
>                case AR5K_PKT_TYPE_BEACON:
>                case AR5K_PKT_TYPE_PROBE_RESP:
>                        frame_type = AR5K_AR5210_TX_DESC_FRAME_TYPE_NO_DELAY;
> +                       break;
>                case AR5K_PKT_TYPE_PIFS:
>                        frame_type = AR5K_AR5210_TX_DESC_FRAME_TYPE_PIFS;
> +                       break;
>                default:
>                        frame_type = type;
> +                       break;
>                }
>
>                tx_ctl->tx_control_0 |=

Acked-by: Nick Kossifidis <mickflemm@gmail.com>



-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [PATCH 4/5] fusb300_udc: Add missing breaks in switch/case
  2011-07-10  9:28 ` [PATCH 4/5] fusb300_udc: " Joe Perches
  2011-07-11  6:39   ` Felipe Balbi
@ 2011-07-14  8:08   ` Sebastian Andrzej Siewior
  2011-07-14  8:36     ` Wendy Yuan-Hsin Chen(陳元馨)
  1 sibling, 1 reply; 19+ messages in thread
From: Sebastian Andrzej Siewior @ 2011-07-14  8:08 UTC (permalink / raw)
  To: Yuan-Hsin Chen
  Cc: Felipe Balbi, Greg Kroah-Hartman, linux-usb, linux-kernel, Joe Perches

* Joe Perches | 2011-07-10 02:28:27 [-0700]:

>Signed-off-by: Joe Perches <joe@perches.com>
>---
> drivers/usb/gadget/fusb300_udc.c |    3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
>diff --git a/drivers/usb/gadget/fusb300_udc.c b/drivers/usb/gadget/fusb300_udc.c
>index 06353e7..453bc0f 100644
>--- a/drivers/usb/gadget/fusb300_udc.c
>+++ b/drivers/usb/gadget/fusb300_udc.c
>@@ -688,10 +688,13 @@ static void fusb300_cmp_dbg_fifo(struct fusb300_ep *ep,
> 	switch (length % 4) {
> 	case 1:
> 		golden_value = *tmp;
>+		break;
> 	case 2:
> 		golden_value = *tmp | *(tmp + 1) << 8;
>+		break;
> 	case 3:
> 		golden_value = *tmp | *(tmp + 1) << 8 | *(tmp + 2) << 16;
>+		break;
> 	default:
> 		break;
> 

That is in an #if 0 block. Maybe we should remove the #if 0? Yuan-Hsin?

Sebastian

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

* RE: [PATCH 4/5] fusb300_udc: Add missing breaks in switch/case
  2011-07-14  8:08   ` Sebastian Andrzej Siewior
@ 2011-07-14  8:36     ` Wendy Yuan-Hsin Chen(陳元馨)
  2011-07-14 10:36       ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 19+ messages in thread
From: Wendy Yuan-Hsin Chen(陳元馨) @ 2011-07-14  8:36 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: Felipe Balbi, Greg Kroah-Hartman, linux-usb, linux-kernel, Joe Perches

 

-----Original Message-----
From: Sebastian Andrzej Siewior [mailto:bigeasy@linutronix.de] 
Sent: Thursday, July 14, 2011 4:09 PM
To: Wendy Yuan-Hsin Chen(陳元馨)
Cc: Felipe Balbi; Greg Kroah-Hartman; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; Joe Perches
Subject: Re: [PATCH 4/5] fusb300_udc: Add missing breaks in switch/case

* Joe Perches | 2011-07-10 02:28:27 [-0700]:

>Signed-off-by: Joe Perches <joe@perches.com>
>---
> drivers/usb/gadget/fusb300_udc.c |    3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
>diff --git a/drivers/usb/gadget/fusb300_udc.c 
>b/drivers/usb/gadget/fusb300_udc.c
>index 06353e7..453bc0f 100644
>--- a/drivers/usb/gadget/fusb300_udc.c
>+++ b/drivers/usb/gadget/fusb300_udc.c
>@@ -688,10 +688,13 @@ static void fusb300_cmp_dbg_fifo(struct fusb300_ep *ep,
> 	switch (length % 4) {
> 	case 1:
> 		golden_value = *tmp;
>+		break;
> 	case 2:
> 		golden_value = *tmp | *(tmp + 1) << 8;
>+		break;
> 	case 3:
> 		golden_value = *tmp | *(tmp + 1) << 8 | *(tmp + 2) << 16;
>+		break;
> 	default:
> 		break;
> 

That is in an #if 0 block. Maybe we should remove the #if 0? Yuan-Hsin?

It's ok to remove the #if 0. But the warning will occur while compling.

Sebastian

Yuan-Hsin

********************* Confidentiality Notice ************************
This electronic message and any attachments may contain
confidential and legally privileged information or
information which is otherwise protected from disclosure.
If you are not the intended recipient,please do not disclose
the contents, either in whole or in part, to anyone,and
immediately delete the message and any attachments from
your computer system and destroy all hard copies.
Thank you for your cooperation.
***********************************************************************


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

* Re: [PATCH 4/5] fusb300_udc: Add missing breaks in switch/case
  2011-07-14  8:36     ` Wendy Yuan-Hsin Chen(陳元馨)
@ 2011-07-14 10:36       ` Sebastian Andrzej Siewior
  2011-07-14 13:28         ` Wendy Yuan-Hsin Chen(陳元馨)
  0 siblings, 1 reply; 19+ messages in thread
From: Sebastian Andrzej Siewior @ 2011-07-14 10:36 UTC (permalink / raw)
  To: Wendy Yuan-Hsin Chen(??????)
  Cc: Felipe Balbi, Greg Kroah-Hartman, linux-usb, linux-kernel, Joe Perches

* Wendy Yuan-Hsin Chen(??????) | 2011-07-14 16:36:39 [+0800]:

>>>diff --git a/drivers/usb/gadget/fusb300_udc.c 
>>>b/drivers/usb/gadget/fusb300_udc.c
>>>index 06353e7..453bc0f 100644
>>>--- a/drivers/usb/gadget/fusb300_udc.c
>>>+++ b/drivers/usb/gadget/fusb300_udc.c
>>>@@ -688,10 +688,13 @@ static void fusb300_cmp_dbg_fifo(struct fusb300_ep *ep,
>>> 	switch (length % 4) {
>>> 	case 1:
>>> 		golden_value = *tmp;
>>>+		break;
>>> 	case 2:
>>> 		golden_value = *tmp | *(tmp + 1) << 8;
>>>+		break;
>>> 	case 3:
>>> 		golden_value = *tmp | *(tmp + 1) << 8 | *(tmp + 2) << 16;
>>>+		break;
>>> 	default:
>>> 		break;
>>> 
>
>>That is in an #if 0 block. Maybe we should remove the #if 0? Yuan-Hsin?
>
>It's ok to remove the #if 0. But the warning will occur while compling.

By removing the #if 0 block I meant to remove the unused functions
fusb300_cmp_dbg_fifo() and fusb300_dbg_fifo(). There should be no
warning then.
Are you okey with this? Are those function required?

>Yuan-Hsin

Sebastian

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

* RE: [PATCH 4/5] fusb300_udc: Add missing breaks in switch/case
  2011-07-14 10:36       ` Sebastian Andrzej Siewior
@ 2011-07-14 13:28         ` Wendy Yuan-Hsin Chen(陳元馨)
  2011-07-18  8:36           ` Felipe Balbi
  0 siblings, 1 reply; 19+ messages in thread
From: Wendy Yuan-Hsin Chen(陳元馨) @ 2011-07-14 13:28 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: Felipe Balbi, Greg Kroah-Hartman, linux-usb, linux-kernel, Joe Perches

 

-----Original Message-----
From: Sebastian Andrzej Siewior [mailto:bigeasy@linutronix.de] 
Sent: Thursday, July 14, 2011 6:36 PM
To: Wendy Yuan-Hsin Chen(陳元馨)
Cc: Felipe Balbi; Greg Kroah-Hartman; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; Joe Perches
Subject: Re: [PATCH 4/5] fusb300_udc: Add missing breaks in switch/case

* Wendy Yuan-Hsin Chen(??????) | 2011-07-14 16:36:39 [+0800]:

>>>diff --git a/drivers/usb/gadget/fusb300_udc.c
>>>b/drivers/usb/gadget/fusb300_udc.c
>>>index 06353e7..453bc0f 100644
>>>--- a/drivers/usb/gadget/fusb300_udc.c
>>>+++ b/drivers/usb/gadget/fusb300_udc.c
>>>@@ -688,10 +688,13 @@ static void fusb300_cmp_dbg_fifo(struct fusb300_ep *ep,
>>> 	switch (length % 4) {
>>> 	case 1:
>>> 		golden_value = *tmp;
>>>+		break;
>>> 	case 2:
>>> 		golden_value = *tmp | *(tmp + 1) << 8;
>>>+		break;
>>> 	case 3:
>>> 		golden_value = *tmp | *(tmp + 1) << 8 | *(tmp + 2) << 16;
>>>+		break;
>>> 	default:
>>> 		break;
>>> 
>
>>That is in an #if 0 block. Maybe we should remove the #if 0? Yuan-Hsin?
>
>It's ok to remove the #if 0. But the warning will occur while compling.

By removing the #if 0 block I meant to remove the unused functions
fusb300_cmp_dbg_fifo() and fusb300_dbg_fifo(). There should be no warning then.
Are you okey with this? Are those function required?

These funtions are used for debugging. I think it's ok to remove them. Thanks.

Yuan-Hsin

********************* Confidentiality Notice ************************
This electronic message and any attachments may contain
confidential and legally privileged information or
information which is otherwise protected from disclosure.
If you are not the intended recipient,please do not disclose
the contents, either in whole or in part, to anyone,and
immediately delete the message and any attachments from
your computer system and destroy all hard copies.
Thank you for your cooperation.
***********************************************************************


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

* Re: [PATCH 4/5] fusb300_udc: Add missing breaks in switch/case
  2011-07-14 13:28         ` Wendy Yuan-Hsin Chen(陳元馨)
@ 2011-07-18  8:36           ` Felipe Balbi
  2011-07-18 12:54             ` Wendy Yuan-Hsin Chen(陳元馨)
  0 siblings, 1 reply; 19+ messages in thread
From: Felipe Balbi @ 2011-07-18  8:36 UTC (permalink / raw)
  To: Wendy Yuan-Hsin Chen(陳元馨)
  Cc: Sebastian Andrzej Siewior, Felipe Balbi, Greg Kroah-Hartman,
	linux-usb, linux-kernel, Joe Perches

[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]

Hi,

On Thu, Jul 14, 2011 at 09:28:46PM +0800, Wendy Yuan-Hsin Chen(陳元馨) wrote:
> >>>diff --git a/drivers/usb/gadget/fusb300_udc.c
> >>>b/drivers/usb/gadget/fusb300_udc.c
> >>>index 06353e7..453bc0f 100644
> >>>--- a/drivers/usb/gadget/fusb300_udc.c
> >>>+++ b/drivers/usb/gadget/fusb300_udc.c
> >>>@@ -688,10 +688,13 @@ static void fusb300_cmp_dbg_fifo(struct fusb300_ep *ep,
> >>> 	switch (length % 4) {
> >>> 	case 1:
> >>> 		golden_value = *tmp;
> >>>+		break;
> >>> 	case 2:
> >>> 		golden_value = *tmp | *(tmp + 1) << 8;
> >>>+		break;
> >>> 	case 3:
> >>> 		golden_value = *tmp | *(tmp + 1) << 8 | *(tmp + 2) << 16;
> >>>+		break;
> >>> 	default:
> >>> 		break;
> >>> 
> >
> >>That is in an #if 0 block. Maybe we should remove the #if 0? Yuan-Hsin?
> >
> >It's ok to remove the #if 0. But the warning will occur while compling.
> 
> By removing the #if 0 block I meant to remove the unused functions
> fusb300_cmp_dbg_fifo() and fusb300_dbg_fifo(). There should be no warning then.
> Are you okey with this? Are those function required?
> 
> These funtions are used for debugging. I think it's ok to remove them. Thanks.

maybe make a debugfs interface instead ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

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

* RE: [PATCH 4/5] fusb300_udc: Add missing breaks in switch/case
  2011-07-18  8:36           ` Felipe Balbi
@ 2011-07-18 12:54             ` Wendy Yuan-Hsin Chen(陳元馨)
  2011-07-19 19:47               ` [PATCH] usb/fusb300: remove #if 0 block Sebastian Andrzej Siewior
  0 siblings, 1 reply; 19+ messages in thread
From: Wendy Yuan-Hsin Chen(陳元馨) @ 2011-07-18 12:54 UTC (permalink / raw)
  To: balbi
  Cc: Sebastian Andrzej Siewior, Greg Kroah-Hartman, linux-usb,
	linux-kernel, Joe Perches

Hi,

> >>>diff --git a/drivers/usb/gadget/fusb300_udc.c
> >>>b/drivers/usb/gadget/fusb300_udc.c
> >>>index 06353e7..453bc0f 100644
> >>>--- a/drivers/usb/gadget/fusb300_udc.c
> >>>+++ b/drivers/usb/gadget/fusb300_udc.c
> >>>@@ -688,10 +688,13 @@ static void fusb300_cmp_dbg_fifo(struct fusb300_ep *ep,
> >>> 	switch (length % 4) {
> >>> 	case 1:
> >>> 		golden_value = *tmp;
> >>>+		break;
> >>> 	case 2:
> >>> 		golden_value = *tmp | *(tmp + 1) << 8;
> >>>+		break;
> >>> 	case 3:
> >>> 		golden_value = *tmp | *(tmp + 1) << 8 | *(tmp + 2) << 16;
> >>>+		break;
> >>> 	default:
> >>> 		break;
> >>> 
> >
> >>That is in an #if 0 block. Maybe we should remove the #if 0? Yuan-Hsin?
> >
> >It's ok to remove the #if 0. But the warning will occur while compling.
> 
> By removing the #if 0 block I meant to remove the unused functions
> fusb300_cmp_dbg_fifo() and fusb300_dbg_fifo(). There should be no warning then.
> Are you okey with this? Are those function required?
> 
> These funtions are used for debugging. I think it's ok to remove them. Thanks.

maybe make a debugfs interface instead ?

These functions were used to debug unstable hw fifo while developing fusb300.  It's much more stable now.
So these functions can be removed. Thanks for your advice.

Yuan-Hsin

********************* Confidentiality Notice ************************
This electronic message and any attachments may contain
confidential and legally privileged information or
information which is otherwise protected from disclosure.
If you are not the intended recipient,please do not disclose
the contents, either in whole or in part, to anyone,and
immediately delete the message and any attachments from
your computer system and destroy all hard copies.
Thank you for your cooperation.
***********************************************************************


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

* [PATCH] usb/fusb300: remove #if 0 block
  2011-07-18 12:54             ` Wendy Yuan-Hsin Chen(陳元馨)
@ 2011-07-19 19:47               ` Sebastian Andrzej Siewior
  2011-07-26 14:52                 ` Felipe Balbi
  0 siblings, 1 reply; 19+ messages in thread
From: Sebastian Andrzej Siewior @ 2011-07-19 19:47 UTC (permalink / raw)
  To: Wendy Yuan-Hsin Chen(??????)
  Cc: balbi, Greg Kroah-Hartman, linux-usb, linux-kernel, Joe Perches

The code in this block is unused and the Author is fine with removing:
|These functions were used to debug unstable hw fifo while developing
|fusb300.  It's much more stable now.
|So these functions can be removed.

Cc: "Wendy Yuan-Hsin Chen" <yhchen@faraday-tech.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/usb/gadget/fusb300_udc.c |  101 --------------------------------------
 1 files changed, 0 insertions(+), 101 deletions(-)

diff --git a/drivers/usb/gadget/fusb300_udc.c b/drivers/usb/gadget/fusb300_udc.c
index 24a9243..4ec888f 100644
--- a/drivers/usb/gadget/fusb300_udc.c
+++ b/drivers/usb/gadget/fusb300_udc.c
@@ -609,107 +609,6 @@ void fusb300_rdcxf(struct fusb300 *fusb300,
 	}
 }
 
-#if 0
-static void fusb300_dbg_fifo(struct fusb300_ep *ep,
-				u8 entry, u16 length)
-{
-	u32 reg;
-	u32 i = 0;
-	u32 j = 0;
-
-	reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_GTM);
-	reg &= ~(FUSB300_GTM_TST_EP_ENTRY(0xF) |
-		FUSB300_GTM_TST_EP_NUM(0xF) | FUSB300_GTM_TST_FIFO_DEG);
-	reg |= (FUSB300_GTM_TST_EP_ENTRY(entry) |
-		FUSB300_GTM_TST_EP_NUM(ep->epnum) | FUSB300_GTM_TST_FIFO_DEG);
-	iowrite32(reg, ep->fusb300->reg + FUSB300_OFFSET_GTM);
-
-	for (i = 0; i < (length >> 2); i++) {
-		if (i * 4 == 1024)
-			break;
-		reg = ioread32(ep->fusb300->reg +
-			FUSB300_OFFSET_BUFDBG_START + i * 4);
-		printk(KERN_DEBUG"  0x%-8x", reg);
-		j++;
-		if ((j % 4)  == 0)
-			printk(KERN_DEBUG "\n");
-	}
-
-	if (length % 4) {
-		reg = ioread32(ep->fusb300->reg +
-			FUSB300_OFFSET_BUFDBG_START + i * 4);
-		printk(KERN_DEBUG "  0x%x\n", reg);
-	}
-
-	if ((j % 4)  != 0)
-		printk(KERN_DEBUG "\n");
-
-	fusb300_disable_bit(ep->fusb300, FUSB300_OFFSET_GTM,
-		FUSB300_GTM_TST_FIFO_DEG);
-}
-
-static void fusb300_cmp_dbg_fifo(struct fusb300_ep *ep,
-				u8 entry, u16 length, u8 *golden)
-{
-	u32 reg;
-	u32 i = 0;
-	u32 golden_value;
-	u8 *tmp;
-
-	tmp = golden;
-
-	printk(KERN_DEBUG "fusb300_cmp_dbg_fifo (entry %d) : start\n", entry);
-
-	reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_GTM);
-	reg &= ~(FUSB300_GTM_TST_EP_ENTRY(0xF) |
-		FUSB300_GTM_TST_EP_NUM(0xF) | FUSB300_GTM_TST_FIFO_DEG);
-	reg |= (FUSB300_GTM_TST_EP_ENTRY(entry) |
-		FUSB300_GTM_TST_EP_NUM(ep->epnum) | FUSB300_GTM_TST_FIFO_DEG);
-	iowrite32(reg, ep->fusb300->reg + FUSB300_OFFSET_GTM);
-
-	for (i = 0; i < (length >> 2); i++) {
-		if (i * 4 == 1024)
-			break;
-		golden_value = *tmp | *(tmp + 1) << 8 |
-				*(tmp + 2) << 16 | *(tmp + 3) << 24;
-
-		reg = ioread32(ep->fusb300->reg +
-			FUSB300_OFFSET_BUFDBG_START + i*4);
-
-		if (reg != golden_value) {
-			printk(KERN_DEBUG "0x%x  :  ", (u32)(ep->fusb300->reg +
-				FUSB300_OFFSET_BUFDBG_START + i*4));
-			printk(KERN_DEBUG "    golden = 0x%x, reg = 0x%x\n",
-				golden_value, reg);
-		}
-		tmp += 4;
-	}
-
-	switch (length % 4) {
-	case 1:
-		golden_value = *tmp;
-	case 2:
-		golden_value = *tmp | *(tmp + 1) << 8;
-	case 3:
-		golden_value = *tmp | *(tmp + 1) << 8 | *(tmp + 2) << 16;
-	default:
-		break;
-
-	reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_BUFDBG_START + i*4);
-	if (reg != golden_value) {
-		printk(KERN_DEBUG "0x%x:", (u32)(ep->fusb300->reg +
-			FUSB300_OFFSET_BUFDBG_START + i*4));
-		printk(KERN_DEBUG "  golden = 0x%x, reg = 0x%x\n",
-			golden_value, reg);
-	}
-	}
-
-	printk(KERN_DEBUG "fusb300_cmp_dbg_fifo : end\n");
-	fusb300_disable_bit(ep->fusb300, FUSB300_OFFSET_GTM,
-		FUSB300_GTM_TST_FIFO_DEG);
-}
-#endif
-
 static void fusb300_rdfifo(struct fusb300_ep *ep,
 			  struct fusb300_request *req,
 			  u32 length)
-- 
1.7.4.4


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

* Re: [PATCH] usb/fusb300: remove #if 0 block
  2011-07-19 19:47               ` [PATCH] usb/fusb300: remove #if 0 block Sebastian Andrzej Siewior
@ 2011-07-26 14:52                 ` Felipe Balbi
  0 siblings, 0 replies; 19+ messages in thread
From: Felipe Balbi @ 2011-07-26 14:52 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: Wendy Yuan-Hsin Chen(??????),
	balbi, Greg Kroah-Hartman, linux-usb, linux-kernel, Joe Perches

[-- Attachment #1: Type: text/plain, Size: 464 bytes --]

On Tue, Jul 19, 2011 at 09:47:01PM +0200, Sebastian Andrzej Siewior wrote:
> The code in this block is unused and the Author is fine with removing:
> |These functions were used to debug unstable hw fifo while developing
> |fusb300.  It's much more stable now.
> |So these functions can be removed.
> 
> Cc: "Wendy Yuan-Hsin Chen" <yhchen@faraday-tech.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

applied, thanks

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

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

end of thread, other threads:[~2011-07-26 14:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-10  9:28 [PATCH 0/5] treewide: Add missing breaks in switch/case Joe Perches
2011-07-10  9:28 ` [PATCH 1/5] gpio-tps65910.c: " Joe Perches
2011-07-10 10:47   ` Grant Likely
2011-07-10  9:28 ` [PATCH 2/5] tps65910-irq: " Joe Perches
2011-07-10  9:28 ` [PATCH 3/5] ath5k: " Joe Perches
2011-07-11 15:50   ` [ath5k-devel] " Pavel Roskin
2011-07-11 21:24   ` Nick Kossifidis
2011-07-10  9:28 ` [PATCH 4/5] fusb300_udc: " Joe Perches
2011-07-11  6:39   ` Felipe Balbi
2011-07-14  8:08   ` Sebastian Andrzej Siewior
2011-07-14  8:36     ` Wendy Yuan-Hsin Chen(陳元馨)
2011-07-14 10:36       ` Sebastian Andrzej Siewior
2011-07-14 13:28         ` Wendy Yuan-Hsin Chen(陳元馨)
2011-07-18  8:36           ` Felipe Balbi
2011-07-18 12:54             ` Wendy Yuan-Hsin Chen(陳元馨)
2011-07-19 19:47               ` [PATCH] usb/fusb300: remove #if 0 block Sebastian Andrzej Siewior
2011-07-26 14:52                 ` Felipe Balbi
2011-07-10  9:28 ` [PATCH 5/5] dbri: Add missing breaks in switch/case Joe Perches
2011-07-10 14:36   ` Joe Perches

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).