The struct resource end field signifies the end address not the relative offset from the start field i.e size == (end - start) + 1. Amend the .end field to specify the end address not the relative size from the offset as is currently given. Fixes cocci check: drivers/media/pci/mgb4/mgb4_regs.c:13:22-25: WARNING: Suspicious code. resource_size is maybe missing with res Link: https://lore.kernel.org/linux-media/20240429-fix-cocci-v3-1-3c4865f5a4b0@chromium.org Reviewed-by: Martin Tůma <martin.tuma@digiteqautomotive.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
mgb4_cmt.c | ||
mgb4_cmt.h | ||
mgb4_core.c | ||
mgb4_core.h | ||
mgb4_dma.c | ||
mgb4_dma.h | ||
mgb4_i2c.c | ||
mgb4_i2c.h | ||
mgb4_io.h | ||
mgb4_regs.c | ||
mgb4_regs.h | ||
mgb4_sysfs.h | ||
mgb4_sysfs_in.c | ||
mgb4_sysfs_out.c | ||
mgb4_sysfs_pci.c | ||
mgb4_trigger.c | ||
mgb4_trigger.h | ||
mgb4_vin.c | ||
mgb4_vin.h | ||
mgb4_vout.c | ||
mgb4_vout.h |