Skip to content

Commit 2899bc8

Browse files
Nava kishore ManneMichal Simek
authored andcommitted
fpga: zynqmp: Fix incorrect variables type
Some variables with incorrect type were passed to eemi_ops API(fpga_read). This API is expecting an "u32 *" but the formal parameter that was passes was of type "int *". Fixed the issue by changing the variable types from "int" to "u32". Addresses-Coverity: "incompatible_param" Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
1 parent aac8be7 commit 2899bc8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎drivers/fpga/zynqmp-fpga.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ static int zynqmp_fpga_read_cfgreg(struct fpga_manager *mgr,
280280
struct seq_file *s)
281281
{
282282
const struct zynqmp_eemi_ops *eemi_ops = zynqmp_pm_get_eemi_ops();
283-
int ret = 0, val;
283+
int ret = 0;
284+
u32 val;
284285
unsigned int *buf;
285286
dma_addr_t dma_addr = 0;
286287
struct zynqmp_configreg *p = cfgreg;
@@ -313,7 +314,8 @@ static int zynqmp_fpga_read_cfgdata(struct fpga_manager *mgr,
313314
{
314315
const struct zynqmp_eemi_ops *eemi_ops = zynqmp_pm_get_eemi_ops();
315316
struct zynqmp_fpga_priv *priv;
316-
int ret, data_offset;
317+
int ret;
318+
u32 data_offset;
317319
unsigned int *buf;
318320
dma_addr_t dma_addr = 0;
319321
size_t size;

0 commit comments

Comments
 (0)