public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: arizona: Remove pointless switch case
@ 2016-07-22 15:58 Charles Keepax
  2016-07-23 17:41 ` Bernd Petrovitsch
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Keepax @ 2016-07-22 15:58 UTC (permalink / raw)
  To: lee.jones; +Cc: patches, linux-kernel

There is no point in having an explicit case that does nothing but falls
through to the default, simply remove the redundant case.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 drivers/mfd/arizona-irq.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c
index 5e18d3c..e54aa55 100644
--- a/drivers/mfd/arizona-irq.c
+++ b/drivers/mfd/arizona-irq.c
@@ -286,8 +286,6 @@ int arizona_irq_init(struct arizona *arizona)
 		case IRQF_TRIGGER_RISING:
 		case IRQF_TRIGGER_FALLING:
 			break;
-
-		case IRQ_TYPE_NONE:
 		default:
 			/* Device default */
 			arizona->pdata.irq_flags = IRQF_TRIGGER_LOW;
-- 
2.1.4

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

* Re: [PATCH] mfd: arizona: Remove pointless switch case
  2016-07-22 15:58 [PATCH] mfd: arizona: Remove pointless switch case Charles Keepax
@ 2016-07-23 17:41 ` Bernd Petrovitsch
  2016-08-08  8:09   ` Charles Keepax
  0 siblings, 1 reply; 3+ messages in thread
From: Bernd Petrovitsch @ 2016-07-23 17:41 UTC (permalink / raw)
  To: Charles Keepax, lee.jones; +Cc: patches, linux-kernel

Hi all!

On Fri, 2016-07-22 at 16:58 +0100, Charles Keepax wrote:
[...]
>  		case IRQF_TRIGGER_RISING:
>  		case IRQF_TRIGGER_FALLING:
>  			break;
> -
> -		case IRQ_TYPE_NONE:
>  		default:

Don't know about the kernels coding rule in that case but personally, I
use that style to explicit list all enum/#define values so that it is
obvious that none was forgotten.
For the compiler output, it shouldn't matter anyways ...

MfG,
	Bernd
-- 
mobile: +43 664 4416156              http://www.sysprog.at/
    Linux Software Development, Consulting and Services

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

* Re: [PATCH] mfd: arizona: Remove pointless switch case
  2016-07-23 17:41 ` Bernd Petrovitsch
@ 2016-08-08  8:09   ` Charles Keepax
  0 siblings, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2016-08-08  8:09 UTC (permalink / raw)
  To: Bernd Petrovitsch; +Cc: lee.jones, patches, linux-kernel

On Sat, Jul 23, 2016 at 07:41:13PM +0200, Bernd Petrovitsch wrote:
> Hi all!
> 
> On Fri, 2016-07-22 at 16:58 +0100, Charles Keepax wrote:
> [...]
> >  		case IRQF_TRIGGER_RISING:
> >  		case IRQF_TRIGGER_FALLING:
> >  			break;
> > -
> > -		case IRQ_TYPE_NONE:
> >  		default:
> 
> Don't know about the kernels coding rule in that case but personally, I
> use that style to explicit list all enum/#define values so that it is
> obvious that none was forgotten.
> For the compiler output, it shouldn't matter anyways ...
> 

I don't have any objection to dropping the patch as you say will
generate the same output either way.

Thanks,
Charles

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

end of thread, other threads:[~2016-08-08  8:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-22 15:58 [PATCH] mfd: arizona: Remove pointless switch case Charles Keepax
2016-07-23 17:41 ` Bernd Petrovitsch
2016-08-08  8:09   ` Charles Keepax

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox