Message ID | 20250415075230.16235-1-johan+linaro@kernel.org |
---|---|
State | New |
Headers | show |
Series | i2c: omap: fix deprecated of_property_read_bool() use | expand |
On 4/15/2025 1:22 PM, Johan Hovold wrote: > Using of_property_read_bool() for non-boolean properties is deprecated > and results in a warning during runtime since commit c141ecc3cecd ("of: > Warn when of_property_read_bool() is used on non-boolean properties"). > > Fixes: b6ef830c60b6 ("i2c: omap: Add support for setting mux") > Cc: Jayesh Choudhary <j-choudhary@ti.com> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org> > --- > drivers/i2c/busses/i2c-omap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c > index 16afb9ca19bb..876791d20ed5 100644 > --- a/drivers/i2c/busses/i2c-omap.c > +++ b/drivers/i2c/busses/i2c-omap.c > @@ -1454,7 +1454,7 @@ omap_i2c_probe(struct platform_device *pdev) > (1000 * omap->speed / 8); > } > > - if (of_property_read_bool(node, "mux-states")) { > + if (of_property_present(node, "mux-states")) { > struct mux_state *mux_state; > > mux_state = devm_mux_state_get(&pdev->dev, NULL); Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
Hi Johan, On Tue, Apr 15, 2025 at 09:52:30AM +0200, Johan Hovold wrote: > Using of_property_read_bool() for non-boolean properties is deprecated > and results in a warning during runtime since commit c141ecc3cecd ("of: > Warn when of_property_read_bool() is used on non-boolean properties"). > > Fixes: b6ef830c60b6 ("i2c: omap: Add support for setting mux") > Cc: Jayesh Choudhary <j-choudhary@ti.com> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Thanks for your patch! I'm going to drop the Fixes tag, as this isn't really a bug fix but rather a warning suppression during boot time. Thanks, Andi
On Thu, Apr 17, 2025 at 11:41:51PM +0200, Andi Shyti wrote: > On Tue, Apr 15, 2025 at 09:52:30AM +0200, Johan Hovold wrote: > > Using of_property_read_bool() for non-boolean properties is deprecated > > and results in a warning during runtime since commit c141ecc3cecd ("of: > > Warn when of_property_read_bool() is used on non-boolean properties"). > > > > Fixes: b6ef830c60b6 ("i2c: omap: Add support for setting mux") > > Cc: Jayesh Choudhary <j-choudhary@ti.com> > > Signed-off-by: Johan Hovold <johan+linaro@kernel.org> > > Thanks for your patch! I'm going to drop the Fixes tag, as this > isn't really a bug fix but rather a warning suppression during > boot time. Thanks, but I think you should have kept the Fixes tag and merged this for 6.15 (i2c-host-fixes) since this is a new warning in 6.15-rc1 (and that does warrant a Fixes tag). Perhaps I should have highlighted that better. If the offending patch had been posted or merged before such uses started generating warnings in 6.14-rc1 then that would have been a different matter. Johan
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 16afb9ca19bb..876791d20ed5 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -1454,7 +1454,7 @@ omap_i2c_probe(struct platform_device *pdev) (1000 * omap->speed / 8); } - if (of_property_read_bool(node, "mux-states")) { + if (of_property_present(node, "mux-states")) { struct mux_state *mux_state; mux_state = devm_mux_state_get(&pdev->dev, NULL);
Using of_property_read_bool() for non-boolean properties is deprecated and results in a warning during runtime since commit c141ecc3cecd ("of: Warn when of_property_read_bool() is used on non-boolean properties"). Fixes: b6ef830c60b6 ("i2c: omap: Add support for setting mux") Cc: Jayesh Choudhary <j-choudhary@ti.com> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> --- drivers/i2c/busses/i2c-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)