i2c: mt65xx: drop of_match_ptr for ID table
Subsystems (7)
PATCH 1/5 i2c: mt65xx: drop of_match_ptr for ID table
The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/i2c/busses/i2c-mt65xx.c:514:34: error: ‘mtk_i2c_of_match’ defined but not used [-Werror=unused-const-variable=]
--- drivers/i2c/busses/i2c-mt65xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-mt65xx.c +1 -1
@@ -1546,7 +1546,7 @@ static struct platform_driver mtk_i2c_driver = { .driver = { .name = I2C_DRV_NAME, .pm = &mtk_i2c_pm, - .of_match_table = of_match_ptr(mtk_i2c_of_match), + .of_match_table = mtk_i2c_of_match, }, };
Signature · 1 line
2.34.1
PATCH 2/5 i2c: owl: drop of_match_ptr for ID table
The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/i2c/busses/i2c-owl.c:510:34: error: ‘owl_i2c_of_match’ defined but not used [-Werror=unused-const-variable=]
--- drivers/i2c/busses/i2c-owl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-owl.c +1 -1
@@ -519,7 +519,7 @@ static struct platform_driver owl_i2c_driver = { .probe = owl_i2c_probe, .driver = { .name = "owl-i2c", - .of_match_table = of_match_ptr(owl_i2c_of_match), + .of_match_table = owl_i2c_of_match, .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, };
Signature · 1 line
2.34.1
Re: [PATCH 2/5] i2c: owl: drop of_match_ptr for ID table
Quoted 8 lines · Krzysztof Kozlowski
The driver can match only via the DT table so the table should be always used and the
of_match_ptrdoes not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/i2c/busses/i2c-owl.c:510:34: error: ‘owl_i2c_of_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>
Quoted 20 lines
--- drivers/i2c/busses/i2c-owl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-owl.c +1
-2@@ -519,7 +519,7 @@ static struct platform_driver owl_i2c_driver = { .probe = owl_i2c_probe, .driver = { .name = "owl-i2c", - .of_match_table = of_match_ptr(owl_i2c_of_match), + .of_match_table = owl_i2c_of_match, .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; --2.34.1
Wolfram Sang
AppliedRe: [PATCH 2/5] i2c: owl: drop of_match_ptr for ID table
In reply to Krzysztof KozlowskiQuoted 7 lines · Krzysztof Kozlowski
The driver can match only via the DT table so the table should be always used and the
of_match_ptrdoes not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/i2c/busses/i2c-owl.c:510:34: error: ‘owl_i2c_of_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>
Applied to for-next, thanks!
PATCH 3/5 i2c: xiic: hide OF related data for COMPILE_TEST
In reply to Krzysztof KozlowskiThe driver can be compile tested with !CONFIG_OF making certain data unused:
drivers/i2c/busses/i2c-xiic.c:1202:39: error: ‘xiic_2_00’ defined but not used [-Werror=unused-const-variable=]
--- drivers/i2c/busses/i2c-xiic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-xiic.c +1 -1
@@ -1199,11 +1199,11 @@ static const struct i2c_adapter xiic_adapter = { .algo = &xiic_algorithm, }; +#if defined(CONFIG_OF )static const struct xiic_version_data xiic_2_00 = { .quirks =DYNAMIC_MODE_READ_BROKEN_BIT , }; -#if defined(CONFIG_OF )static const struct of_device_id xiic_of_match[] = { { .compatible ="xlnx,xps-iic-2.00.a" , .data = &xiic_2_00 }, { .compatible = "xlnx,axi-iic-2.1", },
Signature · 1 line
2.34.1
Re: [PATCH 3/5] i2c: xiic: hide OF related data for COMPILE_TEST
Quoted 7 lines · Krzysztof Kozlowski
The driver can be compile tested with !CONFIG_OF making certain data unused:
drivers/i2c/busses/i2c-xiic.c:1202:39: error: ‘xiic_2_00’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>
Quoted 24 lines
--- drivers/i2c/busses/i2c-xiic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-xiic.c +1
-2@@ -1199,11 +1199,11 @@ static const struct i2c_adapter xiic_adapter = { .algo = &xiic_algorithm, }; +#if defined(CONFIG_OF )static const struct xiic_version_data xiic_2_00 = { .quirks =DYNAMIC_MODE_READ_BROKEN_BIT , }; -#if defined(CONFIG_OF)static const struct of_device_id xiic_of_match[] = { { .compatible ="xlnx,xps-iic-2.00.a" , .data = &xiic_2_00 }, { .compatible = "xlnx,axi-iic-2.1", }, --2.34.1
Wolfram Sang
AppliedRe: [PATCH 3/5] i2c: xiic: hide OF related data for COMPILE_TEST
In reply to Krzysztof KozlowskiQuoted 6 lines · Krzysztof Kozlowski
The driver can be compile tested with !CONFIG_OF making certain data unused:
drivers/i2c/busses/i2c-xiic.c:1202:39: error: ‘xiic_2_00’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>
Applied to for-next, thanks!
PATCH 4/5 i2c: cros-ec-tunnel: Mark ACPI and OF related data as maybe unused
In reply to Krzysztof KozlowskiThe driver can be compile tested with !CONFIG_OF or !CONFIG_ACPI making certain data unused:
drivers/i2c/busses/i2c-cros-ec-tunnel.c:295:34: error: ‘cros_ec_i2c_of_match’ defined but not used [-Werror=unused-const-variable=]
--- drivers/i2c/busses/i2c-cros-ec-tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-cros-ec-tunnel.c +2 -2
@@ -292,13 +292,13 @@ static int ec_i2c_remove(struct platform_device *dev)return 0 ; } -static const struct of_device_id cros_ec_i2c_of_match[] = { +static const struct of_device_id cros_ec_i2c_of_match[]__maybe_unused = { { .compatible ="google,cros-ec-i2c-tunnel" }, {}, };MODULE_DEVICE_TABLE (of, cros_ec_i2c_of_match); -static const struct acpi_device_id cros_ec_i2c_tunnel_acpi_id[] = { +static const struct acpi_device_id cros_ec_i2c_tunnel_acpi_id[]__maybe_unused = { {"GOOG0012" ,0 }, { } };
Signature · 1 line
2.34.1
Re: [PATCH 4/5] i2c: cros-ec-tunnel: Mark ACPI and OF related data as maybe unused
Quoted 7 lines · Krzysztof Kozlowski
The driver can be compile tested with !CONFIG_OF or !CONFIG_ACPI making certain data unused:
drivers/i2c/busses/i2c-cros-ec-tunnel.c:295:34: error: ‘cros_ec_i2c_of_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>
Quoted 27 lines
--- drivers/i2c/busses/i2c-cros-ec-tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/i2c/busses/i2c-cros-ec-tunnel.c +2
-3@@ -292,13 +292,13 @@ static int ec_i2c_remove(struct platform_device *dev)return 0 ; } -static const struct of_device_id cros_ec_i2c_of_match[] = { +static const struct of_device_id cros_ec_i2c_of_match[]__maybe_unused = { { .compatible ="google,cros-ec-i2c-tunnel" }, {}, };MODULE_DEVICE_TABLE (of, cros_ec_i2c_of_match); -static const struct acpi_device_id cros_ec_i2c_tunnel_acpi_id[] = { +static const struct acpi_device_id cros_ec_i2c_tunnel_acpi_id[]__maybe_unused = { {"GOOG0012" ,0 }, { } }; --2.34.1
Wolfram Sang
AppliedRe: [PATCH 4/5] i2c: cros-ec-tunnel: Mark ACPI and OF related data as maybe unused
In reply to Krzysztof KozlowskiQuoted 6 lines · Krzysztof Kozlowski
The driver can be compile tested with !CONFIG_OF or !CONFIG_ACPI making certain data unused:
drivers/i2c/busses/i2c-cros-ec-tunnel.c:295:34: error: ‘cros_ec_i2c_of_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>
Applied to for-next, thanks!
PATCH 5/5 i2c: synquacer: mark OF related data as maybe unused
In reply to Krzysztof KozlowskiThe driver can be compile tested with !CONFIG_OF making certain data unused:
drivers/i2c/busses/i2c-synquacer.c:632:34: error: ‘synquacer_i2c_dt_ids’ defined but not used [-Werror=unused-const-variable=]
--- drivers/i2c/busses/i2c-synquacer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-synquacer.c +1 -1
@@ -629,7 +629,7 @@ static int synquacer_i2c_remove(struct platform_device *pdev)return 0 ; }; -static const struct of_device_id synquacer_i2c_dt_ids[] = { +static const struct of_device_id synquacer_i2c_dt_ids[]__maybe_unused = { { .compatible ="socionext,synquacer-i2c" }, {/* sentinel */ } };
Signature · 1 line
2.34.1
Re: [PATCH 5/5] i2c: synquacer: mark OF related data as maybe unused
Quoted 7 lines · Krzysztof Kozlowski
The driver can be compile tested with !CONFIG_OF making certain data unused:
drivers/i2c/busses/i2c-synquacer.c:632:34: error: ‘synquacer_i2c_dt_ids’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>
Quoted 20 lines
--- drivers/i2c/busses/i2c-synquacer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-synquacer.c +1
-2@@ -629,7 +629,7 @@ static int synquacer_i2c_remove(struct platform_device *pdev)return 0 ; }; -static const struct of_device_id synquacer_i2c_dt_ids[] = { +static const struct of_device_id synquacer_i2c_dt_ids[]__maybe_unused = { { .compatible ="socionext,synquacer-i2c" }, {/* sentinel */ } }; --2.34.1
Wolfram Sang
AppliedRe: [PATCH 5/5] i2c: synquacer: mark OF related data as maybe unused
In reply to Krzysztof KozlowskiQuoted 6 lines · Krzysztof Kozlowski
The driver can be compile tested with !CONFIG_OF making certain data unused:
drivers/i2c/busses/i2c-synquacer.c:632:34: error: ‘synquacer_i2c_dt_ids’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>
Applied to for-next, thanks!
Quoted 8 lines · Krzysztof Kozlowski
The driver can match only via the DT table so the table should be always used and the
of_match_ptrdoes not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/i2c/busses/i2c-mt65xx.c:514:34: error: ‘mtk_i2c_of_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>
Quoted 20 lines
--- drivers/i2c/busses/i2c-mt65xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-mt65xx.c +1
-2@@ -1546,7 +1546,7 @@ static struct platform_driver mtk_i2c_driver = { .driver = { .name = I2C_DRV_NAME, .pm = &mtk_i2c_pm, - .of_match_table = of_match_ptr(mtk_i2c_of_match), + .of_match_table = mtk_i2c_of_match, }, }; --2.34.1
Il 11/03/23 12:16, Krzysztof Kozlowski ha scritto:
Quoted 7 lines
The driver can match only via the DT table so the table should be always used and the
of_match_ptrdoes not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/i2c/busses/i2c-mt65xx.c:514:34: error: ‘mtk_i2c_of_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>
Wolfram Sang
AppliedQuoted 7 lines · Krzysztof Kozlowski
The driver can match only via the DT table so the table should be always used and the
of_match_ptrdoes not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/i2c/busses/i2c-mt65xx.c:514:34: error: ‘mtk_i2c_of_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>
Applied to for-next, thanks!