phy: ti: j721e-wiz: Add missing include linux/slab.h
PATCH 1/1 phy: ti: j721e-wiz: Add missing include linux/slab.h
When compiling with CONFIG_PHY_J721E_WIZ, Hulk Robot reported:
drivers/phy/ti/phy-j721e-wiz.c: In function ‘wiz_mux_clk_register’:drivers/phy/ti/phy-j721e-wiz.c:659:17: error: implicit declaration of function ‘kzalloc’; did you mean ‘vzalloc’? [-Werror=implicit-function-declaration]
659 | parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL);
| ^~~~~~~
| vzallocdrivers/phy/ti/phy-j721e-wiz.c:659:15: warning: assignment to ‘const char **’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
659 | parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL);
| ^drivers/phy/ti/phy-j721e-wiz.c:697:2: error: implicit declaration of function ‘kfree’; did you mean ‘vfree’? [-Werror=implicit-function-declaration]
697 | kfree(parent_names);
| ^~~~~
| vfre--- drivers/phy/ti/phy-j721e-wiz.c | 1 + 1 file changed, 1 insertion(+)
drivers/phy/ti/phy-j721e-wiz.c +1 -0
@@ -8,6 +8,7 @@#include <dt-bindings/phy/phy.h> #include <dt-bindings/phy/phy-ti.h> +#include <linux/slab.h> #include <linux/clk.h> #include <linux/clk-provider.h> #include <linux/gpio.h>
Signature · 1 line
2.25.1
Quoted 7 lines · Shixin Liu
When compiling with
CONFIG_PHY_J721E_WIZ, Hulk Robot reported:
drivers/phy/ti/phy-j721e-wiz.c: In function ‘wiz_mux_clk_register’:drivers/phy/ti/phy-j721e-wiz.c:659:17: error: implicit declaration of function ‘kzalloc’; did you mean ‘vzalloc’? [-Werror=implicit-function-declaration]659 | parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL); | ^~~~~~~ | vzalloc
Quoted 7 lines
drivers/phy/ti/phy-j721e-wiz.c:659:15: warning: assignment to ‘const char **’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
659 |parent_names=kzalloc((sizeof(char *) * num_parents), GFP_KERNEL);
| ^drivers/phy/ti/phy-j721e-wiz.c:697:2: error: implicit declaration of function ‘kfree’; did you mean ‘vfree’? [-Werror=implicit-function-declaration]697 | kfree(parent_names); | ^~~~~ | vfre
Applied, thanks
Signature · 1 line
~Vinod