drivers/net: fix indication of allocation

Message ID 1737147093-11172-1-git-send-email-andremue@linux.microsoft.com (mailing list archive)
State Accepted
Delegated to: Ajit Khaparde
Headers
Series drivers/net: fix indication of allocation |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS

Commit Message

Andre Muezerie Jan. 17, 2025, 8:51 p.m. UTC
When experimenting with the -std=c2x compiler option the error below
popped up:

../drivers/net/bnxt/tf_core/tf_sram_mgr.c:952:39: error: incompatible
   types when assigning to type ‘_Bool *’ from type ‘_Bool’

The code indicates that the intention was to assign false to the bool
being pointed to, not to the pointer itself.

Fixes: 37ff91c158a3 ("net/bnxt: add SRAM manager model")
Cc: stable@dpdk.org

Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
---
 drivers/net/bnxt/tf_core/tf_sram_mgr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/bnxt/tf_core/tf_sram_mgr.c b/drivers/net/bnxt/tf_core/tf_sram_mgr.c
index 87e8882fed..0dffd74cd5 100644
--- a/drivers/net/bnxt/tf_core/tf_sram_mgr.c
+++ b/drivers/net/bnxt/tf_core/tf_sram_mgr.c
@@ -949,7 +949,7 @@  int tf_sram_mgr_is_allocated(void *sram_handle,
 			    tf_sram_slice_2_str(parms->slice_size),
 			    tf_sram_bank_2_str(parms->bank_id));
 
-		parms->is_allocated = false;
+		*parms->is_allocated = false;
 		goto done;
 	}
 
@@ -964,7 +964,7 @@  int tf_sram_mgr_is_allocated(void *sram_handle,
 	if (block == NULL) {
 		TFP_DRV_LOG(ERR, "block not found in list 0x%x\n",
 			    parms->sram_offset);
-		parms->is_allocated = false;
+		*parms->is_allocated = false;
 		goto done;
 	}