Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

coccinelle: of_table: handle SPI device ID tables

'struct spi_device_id' tables also need to be NULL terminated.

Link: https://lkml.kernel.org/r/20250911193354.56262-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Julia Lawall <julia.lawall@inria.fr>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Palix <nicolas.palix@imag.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Krzysztof Kozlowski and committed by
Andrew Morton
347b5645 04ae01a8

+7 -7
+7 -7
scripts/coccinelle/misc/of_table.cocci
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 - /// Make sure (of/i2c/platform)_device_id tables are NULL terminated 2 + /// Make sure (of/i2c/platform/spi)_device_id tables are NULL terminated 3 3 // 4 4 // Keywords: of_table i2c_table platform_table 5 5 // Confidence: Medium ··· 15 15 expression E; 16 16 @@ 17 17 ( 18 - struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = { 18 + struct \(of_device_id \| i2c_device_id \| platform_device_id \| spi_device_id\) arr[] = { 19 19 ..., 20 20 { 21 21 .var = E, 22 22 * } 23 23 }; 24 24 | 25 - struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = { 25 + struct \(of_device_id \| i2c_device_id \| platform_device_id \| spi_device_id\) arr[] = { 26 26 ..., 27 27 * { ..., E, ... }, 28 28 }; ··· 33 33 expression E; 34 34 @@ 35 35 ( 36 - struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = { 36 + struct \(of_device_id \| i2c_device_id \| platform_device_id \| spi_device_id\) arr[] = { 37 37 ..., 38 38 { 39 39 .var = E, ··· 42 42 + { } 43 43 }; 44 44 | 45 - struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = { 45 + struct \(of_device_id \| i2c_device_id \| platform_device_id \| spi_device_id\) arr[] = { 46 46 ..., 47 47 { ..., E, ... }, 48 48 + { }, ··· 55 55 expression E; 56 56 @@ 57 57 ( 58 - struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = { 58 + struct \(of_device_id \| i2c_device_id \| platform_device_id \| spi_device_id\) arr[] = { 59 59 ..., 60 60 { 61 61 .var = E, ··· 63 63 @p1 64 64 }; 65 65 | 66 - struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = { 66 + struct \(of_device_id \| i2c_device_id \| platform_device_id \| spi_device_id\) arr[] = { 67 67 ..., 68 68 { ..., E, ... } 69 69 @p1