1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/soc/fsl/dpio
Arnd Bergmann 72ebb41b88 soc: fsl: dpio: fix kcalloc() argument order
A previous bugfix added a call to kcalloc(), which starting in gcc-14
causes a harmless warning about the argument order:

drivers/soc/fsl/dpio/dpio-service.c: In function 'dpaa2_io_service_enqueue_multiple_desc_fq':
drivers/soc/fsl/dpio/dpio-service.c:526:29: error: 'kcalloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  526 |         ed = kcalloc(sizeof(struct qbman_eq_desc), 32, GFP_KERNEL);
      |                             ^~~~~~
drivers/soc/fsl/dpio/dpio-service.c:526:29: note: earlier argument should specify number of elements, later size of each element

Since the two are only multiplied, the order does not change the
behavior, so just fix it now to shut up the compiler warning.

Dmity independently came up with the same fix.

Fixes: 5c4a5999b2 ("soc: fsl: dpio: avoid stack usage warning")
Reported-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-03-13 17:17:32 +01:00
..
dpio-cmd.h soc: fsl: dpio: extract the QBMAN clock frequency from the attributes 2021-10-15 14:32:40 +01:00
dpio-driver.c bus: fsl-mc: Make remove function return void 2023-05-30 18:58:43 -05:00
dpio-service.c soc: fsl: dpio: fix kcalloc() argument order 2024-03-13 17:17:32 +01:00
dpio.c soc: fsl: dpio: extract the QBMAN clock frequency from the attributes 2021-10-15 14:32:40 +01:00
dpio.h soc: fsl: dpio: extract the QBMAN clock frequency from the attributes 2021-10-15 14:32:40 +01:00
Makefile staging: fsl-mc: Move DPIO from staging to drivers/soc/fsl 2018-07-24 16:18:55 -05:00
qbman-portal.c soc: fsl: dpio: read the consumer index from the cache inhibited area 2022-02-09 13:15:35 +00:00
qbman-portal.h soc: fsl: dpio: add Net DIM integration 2021-10-15 14:32:41 +01:00