On 21.02.2023 10:45:41, Yang Li wrote: > Use of_property_present() instead of of_get_property/of_find_property() > in places where we just need to test presence of a property. > > Signed-off-by: Yang Li <yang.lee@xxxxxxxxxxxxxxxxx> NAK! Besides the things Pavan Chebbi says, this is not even compile: | drivers/net/can/mscan/mpc5xxx_can.c: In function ‘mpc5xxx_can_probe’: | drivers/net/can/mscan/mpc5xxx_can.c:318:22: error: implicit declaration of function ‘of_property_present’; did you mean ‘fwnode_property_present’? [-Werror=implicit-function-declaration] | 318 | clock_name = of_property_present(np, "fsl,mscan-clock-source"); | | ^~~~~~~~~~~~~~~~~~~ | | fwnode_property_present | drivers/net/can/mscan/mpc5xxx_can.c:318:20: error: assignment to ‘const char *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion] | 318 | clock_name = of_property_present(np, "fsl,mscan-clock-source"); | | ^ | cc1: all warnings being treated as errors Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: PGP signature