DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] igb_uio: fix build on Linux 5.3 for implicit fall through
@ 2019-07-29 12:32 Ferruh Yigit
  2019-07-29 20:01 ` Thomas Monjalon
  2019-09-24 18:25 ` Luca Boccassi
  0 siblings, 2 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-07-29 12:32 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon, stable

build error:
.../dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:
   In function ‘igbuio_pci_enable_interrupts’:
   .../dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:230:6:
   error: this statement may fall through
   [-Werror=implicit-fallthrough=]
  230 |   if (pci_alloc_irq_vectors(udev->pdev, 1, 1, ....
.../dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:240:2:
   note: here
  240 |  case RTE_INTR_MODE_MSI:
      |  ^~~~

The build error is caused by Linux kernel commit in 5.3 that enables the
"-Wimplicit-fallthrough=3" gcc flag.
Commit a035d552a93b ("Makefile: Globally enable fall-through warning")

To fix the error, either a gcc attribute can be provided [1] or a code
comment with some defined syntax need to be provided [2], since there is
already comments, updated them slightly to match the required syntax to
fix the build error.

[1]
"__attribute__ ((fallthrough));"

[2]
[ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?
fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)?

Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 kernel/linux/igb_uio/igb_uio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c
index 3cf394bdf..039f5a5f6 100644
--- a/kernel/linux/igb_uio/igb_uio.c
+++ b/kernel/linux/igb_uio/igb_uio.c
@@ -236,7 +236,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev)
 		}
 #endif
 
-	/* fall back to MSI */
+	/* falls through - to MSI */
 	case RTE_INTR_MODE_MSI:
 #ifndef HAVE_ALLOC_IRQ_VECTORS
 		if (pci_enable_msi(udev->pdev) == 0) {
@@ -255,7 +255,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev)
 			break;
 		}
 #endif
-	/* fall back to INTX */
+	/* falls through - to INTX */
 	case RTE_INTR_MODE_LEGACY:
 		if (pci_intx_mask_supported(udev->pdev)) {
 			dev_dbg(&udev->pdev->dev, "using INTX");
@@ -265,7 +265,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev)
 			break;
 		}
 		dev_notice(&udev->pdev->dev, "PCI INTX mask not supported\n");
-	/* fall back to no IRQ */
+	/* falls through - to no IRQ */
 	case RTE_INTR_MODE_NONE:
 		udev->mode = RTE_INTR_MODE_NONE;
 		udev->info.irq = UIO_IRQ_NONE;
-- 
2.21.0


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

* Re: [dpdk-dev] [PATCH] igb_uio: fix build on Linux 5.3 for implicit fall through
  2019-07-29 12:32 [dpdk-dev] [PATCH] igb_uio: fix build on Linux 5.3 for implicit fall through Ferruh Yigit
@ 2019-07-29 20:01 ` Thomas Monjalon
  2019-09-24 18:25 ` Luca Boccassi
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2019-07-29 20:01 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, stable

29/07/2019 14:32, Ferruh Yigit:
> build error:
> .../dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:
>    In function ‘igbuio_pci_enable_interrupts’:
>    .../dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:230:6:
>    error: this statement may fall through
>    [-Werror=implicit-fallthrough=]
>   230 |   if (pci_alloc_irq_vectors(udev->pdev, 1, 1, ....
> .../dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:240:2:
>    note: here
>   240 |  case RTE_INTR_MODE_MSI:
>       |  ^~~~
> 
> The build error is caused by Linux kernel commit in 5.3 that enables the
> "-Wimplicit-fallthrough=3" gcc flag.
> Commit a035d552a93b ("Makefile: Globally enable fall-through warning")
> 
> To fix the error, either a gcc attribute can be provided [1] or a code
> comment with some defined syntax need to be provided [2], since there is
> already comments, updated them slightly to match the required syntax to
> fix the build error.
> 
> [1]
> "__attribute__ ((fallthrough));"
> 
> [2]
> [ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?
> fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)?
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks




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

* Re: [dpdk-dev] [PATCH] igb_uio: fix build on Linux 5.3 for implicit fall through
  2019-07-29 12:32 [dpdk-dev] [PATCH] igb_uio: fix build on Linux 5.3 for implicit fall through Ferruh Yigit
  2019-07-29 20:01 ` Thomas Monjalon
@ 2019-09-24 18:25 ` Luca Boccassi
  2019-09-26  7:56   ` Ferruh Yigit
  1 sibling, 1 reply; 4+ messages in thread
From: Luca Boccassi @ 2019-09-24 18:25 UTC (permalink / raw)
  To: Ferruh Yigit, dev; +Cc: stable

On Mon, 2019-07-29 at 13:32 +0100, Ferruh Yigit wrote:
> build error:
> .../dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:
>    In function ‘igbuio_pci_enable_interrupts’:
>    .../dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:230:6:
>    error: this statement may fall through
>    [-Werror=implicit-fallthrough=]
>   230 |   if (pci_alloc_irq_vectors(udev->pdev, 1, 1, ....
> .../dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:240:2:
>    note: here
>   240 |  case RTE_INTR_MODE_MSI:
>       |  ^~~~
> 
> The build error is caused by Linux kernel commit in 5.3 that enables
> the
> "-Wimplicit-fallthrough=3" gcc flag.
> Commit a035d552a93b ("Makefile: Globally enable fall-through
> warning")
> 
> To fix the error, either a gcc attribute can be provided [1] or a
> code
> comment with some defined syntax need to be provided [2], since there
> is
> already comments, updated them slightly to match the required syntax
> to
> fix the build error.
> 
> [1]
> "__attribute__ ((fallthrough));"
> 
> [2]
> [ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?
> fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)?
> 
> Cc: 
> stable@dpdk.org
> 
> 
> Signed-off-by: Ferruh Yigit <
> ferruh.yigit@intel.com
> >
> ---
>  kernel/linux/igb_uio/igb_uio.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Ferruh I'm including this in 17.11.7 since it fixes the build on a
number of new distros and it seems simple enough as it just updates the
comment for the compiler's benefit.

Let me know if there are any objections.

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-dev] [PATCH] igb_uio: fix build on Linux 5.3 for implicit fall through
  2019-09-24 18:25 ` Luca Boccassi
@ 2019-09-26  7:56   ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-09-26  7:56 UTC (permalink / raw)
  To: Luca Boccassi, dev; +Cc: stable

On 9/24/2019 7:25 PM, Luca Boccassi wrote:
> On Mon, 2019-07-29 at 13:32 +0100, Ferruh Yigit wrote:
>> build error:
>> .../dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:
>>    In function ‘igbuio_pci_enable_interrupts’:
>>    .../dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:230:6:
>>    error: this statement may fall through
>>    [-Werror=implicit-fallthrough=]
>>   230 |   if (pci_alloc_irq_vectors(udev->pdev, 1, 1, ....
>> .../dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:240:2:
>>    note: here
>>   240 |  case RTE_INTR_MODE_MSI:
>>       |  ^~~~
>>
>> The build error is caused by Linux kernel commit in 5.3 that enables
>> the
>> "-Wimplicit-fallthrough=3" gcc flag.
>> Commit a035d552a93b ("Makefile: Globally enable fall-through
>> warning")
>>
>> To fix the error, either a gcc attribute can be provided [1] or a
>> code
>> comment with some defined syntax need to be provided [2], since there
>> is
>> already comments, updated them slightly to match the required syntax
>> to
>> fix the build error.
>>
>> [1]
>> "__attribute__ ((fallthrough));"
>>
>> [2]
>> [ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?
>> fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)?
>>
>> Cc: 
>> stable@dpdk.org
>>
>>
>> Signed-off-by: Ferruh Yigit <
>> ferruh.yigit@intel.com
>>>
>> ---
>>  kernel/linux/igb_uio/igb_uio.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> Ferruh I'm including this in 17.11.7 since it fixes the build on a
> number of new distros and it seems simple enough as it just updates the
> comment for the compiler's benefit.
> 
> Let me know if there are any objections.
> 

+1 to include it, as you said it is simple, thanks.

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

end of thread, other threads:[~2019-09-26  7:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-29 12:32 [dpdk-dev] [PATCH] igb_uio: fix build on Linux 5.3 for implicit fall through Ferruh Yigit
2019-07-29 20:01 ` Thomas Monjalon
2019-09-24 18:25 ` Luca Boccassi
2019-09-26  7:56   ` Ferruh Yigit

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