mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
spi: loopback-test: fix up const pointer issue in rx_ranges_cmp()
When a list head is a const pointer, the list entry for that head also must remain a const pointer, otherwise we are just "throwing it away" for no good reason. Fix this up by properly marking these structures as const. Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/2025052213-semifinal-sublevel-d631@gregkh Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2712a7d362
commit
e7f3d11567
|
|
@ -494,8 +494,8 @@ struct rx_ranges {
|
|||
static int rx_ranges_cmp(void *priv, const struct list_head *a,
|
||||
const struct list_head *b)
|
||||
{
|
||||
struct rx_ranges *rx_a = list_entry(a, struct rx_ranges, list);
|
||||
struct rx_ranges *rx_b = list_entry(b, struct rx_ranges, list);
|
||||
const struct rx_ranges *rx_a = list_entry(a, struct rx_ranges, list);
|
||||
const struct rx_ranges *rx_b = list_entry(b, struct rx_ranges, list);
|
||||
|
||||
if (rx_a->start > rx_b->start)
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user