[PATCH v9 1/2] staging: axis-fifo: use u32 for fifo depth flags

Gustavo Piaz da Silva posted 2 patches 1 month, 1 week ago
[PATCH v9 1/2] staging: axis-fifo: use u32 for fifo depth flags
Posted by Gustavo Piaz da Silva 1 month, 1 week ago
Update has_rx_fifo and has_tx_fifo types from int to u32 in struct
axis_fifo.

The of_property_read_u32() function expects a pointer to u32. Although
the current code works correctly with int, using u32 aligns the data
structure with the Device Tree API and prevents potential
type-mismatch issues.

Signed-off-by: Gustavo Piaz da Silva <gustavopiazdasilva2102@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
---
Changes in v9:
 - Rebased on top of staging-next branch to resolve conflicts 
   with recent structure changes (pointed out by Ovidiu Panait).

Changes in v7:
 - Rewrote Patch 1 description for better clarity and acknowledged 
   that the original code works.

Changes in v5:
 - Added missing newline at the end of axis-fifo.c file.

 drivers/staging/axis-fifo/axis-fifo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index aa90b27197cf..e54bc4c1d40f 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -71,8 +71,8 @@ struct axis_fifo {
 
 	unsigned int rx_fifo_depth;
 	unsigned int tx_fifo_depth;
-	int has_rx_fifo;
-	int has_tx_fifo;
+	u32 has_rx_fifo;
+	u32 has_tx_fifo;
 
 	wait_queue_head_t read_queue;
 	struct mutex read_lock; /* lock for reading */
-- 
2.53.0