Re: [PATCH -next] phy: ti: j721e-wiz: Add missing include linux/slab.h

2021-04-11 Thread Vinod Koul
On 08-04-21, 09:28, Shixin Liu wrote:
> 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
> 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

-- 
~Vinod


[PATCH -next] phy: ti: j721e-wiz: Add missing include linux/slab.h

2021-04-07 Thread 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
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

Fixes: 040cbe768731 ("phy: ti: j721e-wiz: Model the internal clocks without 
device tree input")
Reported-by: Hulk Robot 
Signed-off-by: Shixin Liu 
---
 drivers/phy/ti/phy-j721e-wiz.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c
index 2b354680a272..ab28fb2e01db 100644
--- a/drivers/phy/ti/phy-j721e-wiz.c
+++ b/drivers/phy/ti/phy-j721e-wiz.c
@@ -8,6 +8,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
-- 
2.25.1