summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/xarray.py
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-22 13:47:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-29 12:14:07 +0300
commitb07985df703bfd8bfc10d345f8dd87546bbfdd2f (patch)
tree6797566765840be97dd1bcf55b5c01a96773bd4d /scripts/gdb/linux/xarray.py
parent3d4fe1fb9739bae778032896084bc770e3325dc1 (diff)
downloadlinux-b07985df703bfd8bfc10d345f8dd87546bbfdd2f.tar.xz
spi: use container_of_cont() for to_spi_device()
[ Upstream commit 1007ae0d464ceb55a3740634790521d3543aaab9 ] Some places in the spi core pass in a const pointer to a device and the default container_of() casts that away, which is not a good idea. Preserve the proper const attribute by using container_of_const() for to_spi_device() instead, which is what it was designed for. Note, this removes the NULL check for a device pointer in the call, but no one was ever checking for that return value, and a device pointer should never be NULL overall anyway, so this should be a safe change. Cc: Mark Brown <broonie@kernel.org> Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type take a const *") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/2025052230-fidgeting-stooge-66f5@gregkh Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/xarray.py')
0 files changed, 0 insertions, 0 deletions