diff mbox series

[v1,4/6] i2c: designware: Mark expected switch fall-throughs

Message ID 20180725143930.58477-4-andriy.shevchenko@linux.intel.com
State Superseded
Headers show
Series [v1,1/6] i2c: core: Parse SDA hold time from firmware | expand

Commit Message

Andy Shevchenko July 25, 2018, 2:39 p.m. UTC
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

drivers/i2c/busses/i2c-designware-pcidrv.c: In function ‘mfld_setup’:
drivers/i2c/busses/i2c-designware-pcidrv.c:93:14: warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/i2c/busses/i2c-designware-pcidrv.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jarkko Nikula Aug. 1, 2018, 12:39 p.m. UTC | #1
On 07/25/2018 05:39 PM, Andy Shevchenko wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> drivers/i2c/busses/i2c-designware-pcidrv.c: In function ‘mfld_setup’:
> drivers/i2c/busses/i2c-designware-pcidrv.c:93:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>   drivers/i2c/busses/i2c-designware-pcidrv.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
> index 86e1bd0b82e9..b4997be62f03 100644
> --- a/drivers/i2c/busses/i2c-designware-pcidrv.c
> +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> @@ -105,6 +105,7 @@ static int mfld_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
>   	case 0x0817:
>   		c->bus_cfg &= ~DW_IC_CON_SPEED_MASK;
>   		c->bus_cfg |= DW_IC_CON_SPEED_STD;
> +		/* fall through */
>   	case 0x0818:
>   	case 0x0819:
>   		c->bus_num = pdev->device - 0x817 + 3;

Should this be From: Gustavo A. R. Silva <gustavo@embeddedor.com>?

I see my inbox has exactly same patch from him July 3rd and Acked-by you.
Andy Shevchenko Aug. 1, 2018, 12:50 p.m. UTC | #2
On Wed, 2018-08-01 at 15:39 +0300, Jarkko Nikula wrote:
> On 07/25/2018 05:39 PM, Andy Shevchenko wrote:
> > In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> > where we are expecting to fall through.
> > 
> > drivers/i2c/busses/i2c-designware-pcidrv.c: In function
> > ‘mfld_setup’:
> > drivers/i2c/busses/i2c-designware-pcidrv.c:93:14: warning: this
> > statement may fall through [-Wimplicit-fallthrough=]
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >   drivers/i2c/busses/i2c-designware-pcidrv.c | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c
> > b/drivers/i2c/busses/i2c-designware-pcidrv.c
> > index 86e1bd0b82e9..b4997be62f03 100644
> > --- a/drivers/i2c/busses/i2c-designware-pcidrv.c
> > +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> > @@ -105,6 +105,7 @@ static int mfld_setup(struct pci_dev *pdev,
> > struct dw_pci_controller *c)
> >   	case 0x0817:
> >   		c->bus_cfg &= ~DW_IC_CON_SPEED_MASK;
> >   		c->bus_cfg |= DW_IC_CON_SPEED_STD;
> > +		/* fall through */
> >   	case 0x0818:
> >   	case 0x0819:
> >   		c->bus_num = pdev->device - 0x817 + 3;
> 
> Should this be From: Gustavo A. R. Silva <gustavo@embeddedor.com>?
> 
> I see my inbox has exactly same patch from him July 3rd and Acked-by
> you.

Thanks for pointing this out!

I based my series on linux-next which presumably includes i2c-next, I
dunno why that patch is not there, that's why I crafted same myself
(just totally forgot about previous one).

Wolfram, can we sort things out somehow? I suppose you will have either
conflict here, or "patch already applied" kind of message. In any case,
please take the older one from Gustavo.
Wolfram Sang Aug. 8, 2018, 8:17 p.m. UTC | #3
> > Should this be From: Gustavo A. R. Silva <gustavo@embeddedor.com>?
> > 
> > I see my inbox has exactly same patch from him July 3rd and Acked-by
> > you.
> 
> Thanks for pointing this out!
> 
> I based my series on linux-next which presumably includes i2c-next, I
> dunno why that patch is not there, that's why I crafted same myself
> (just totally forgot about previous one).
> 
> Wolfram, can we sort things out somehow? I suppose you will have either
> conflict here, or "patch already applied" kind of message. In any case,
> please take the older one from Gustavo.

I didn't apply Gustavo's patch up to now because patchwork missed to
collect your ack :( And I give acked/reviewed patches preference these
days. Anyway, I know applied Gustavo's patches and, thus, dropped this
one.
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index 86e1bd0b82e9..b4997be62f03 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -105,6 +105,7 @@  static int mfld_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
 	case 0x0817:
 		c->bus_cfg &= ~DW_IC_CON_SPEED_MASK;
 		c->bus_cfg |= DW_IC_CON_SPEED_STD;
+		/* fall through */
 	case 0x0818:
 	case 0x0819:
 		c->bus_num = pdev->device - 0x817 + 3;