[2/4] raw/dpaa2: fix build with gcc 11

Message ID 20200921133830.1575872-2-ferruh.yigit@intel.com (mailing list archive)
State Rejected, archived
Delegated to: David Marchand
Headers
Series [1/4] net/qede: fix build with gcc 11 |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Ferruh Yigit Sept. 21, 2020, 1:38 p.m. UTC
  Error observed with gcc 11 under development
gcc (GCC) 11.0.0 20200920 (experimental)

build error:
../drivers/raw/dpaa2_qdma/dpaa2_qdma.c: In function ‘rte_qdma_reset’:
../drivers/raw/dpaa2_qdma/dpaa2_qdma.c:454:17:
	warning: this ‘if’ clause does not guard...
	[-Wmisleading-indentation]
  454 |         if (qdma_vqs[i].in_use && (qdma_vqs[i].num_enqueues !=
      |         ^~
../drivers/raw/dpaa2_qdma/dpaa2_qdma.c:457:25:
	note: ...this statement, but the latter is misleadingly indented
	as if it were guarded by the ‘if’
  457 |                         return -EBUSY;
      |                         ^~~~~~

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

David Marchand Oct. 8, 2020, 10:40 a.m. UTC | #1
On Thu, Oct 8, 2020 at 11:08 AM Nipun Gupta <nipun.gupta@nxp.com> wrote:
>
> Hi David,
>
> https://patchwork.dpdk.org/patch/76983/ - this patch have same changes?
> Please check and let me know what shall be done.

Ok, I'll mark Ferruh patch as rejected.
Thank you.
  
Ferruh Yigit Oct. 8, 2020, 11:29 a.m. UTC | #2
On 10/8/2020 11:40 AM, David Marchand wrote:
> On Thu, Oct 8, 2020 at 11:08 AM Nipun Gupta <nipun.gupta@nxp.com> wrote:
>>
>> Hi David,
>>
>> https://patchwork.dpdk.org/patch/76983/ - this patch have same changes?
>> Please check and let me know what shall be done.
> 
> Ok, I'll mark Ferruh patch as rejected.
 >

Yes looks like fixing same thing, good for me.
  

Patch

diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
index 0b9c4e3d7..2cba71c63 100644
--- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
+++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
@@ -452,9 +452,10 @@  rte_qdma_reset(void)
 	/* In case there are pending jobs on any VQ, return -EBUSY */
 	for (i = 0; i < qdma_dev.max_vqs; i++) {
 		if (qdma_vqs[i].in_use && (qdma_vqs[i].num_enqueues !=
-		    qdma_vqs[i].num_dequeues))
+			    qdma_vqs[i].num_dequeues)) {
 			DPAA2_QDMA_ERR("Jobs are still pending on VQ: %d", i);
 			return -EBUSY;
+		}
 	}
 
 	/* Reset HW queues */