2019-04-18 06:23:25

by Sugaya Taichi

[permalink] [raw]
Subject: [PATCH] serial: Fix using plain integer instead of Null pointer

Fix build warning that using plain integer as Null pointer.
This is reported by kbuild test robot.

Fixes: ba44dc043004 ("serial: Add Milbeaut serial control")
Signed-off-by: Sugaya Taichi <[email protected]>
---
drivers/tty/serial/milbeaut_usio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/milbeaut_usio.c b/drivers/tty/serial/milbeaut_usio.c
index d303b7d..4a10604 100644
--- a/drivers/tty/serial/milbeaut_usio.c
+++ b/drivers/tty/serial/milbeaut_usio.c
@@ -500,7 +500,7 @@ static int __init mlb_usio_early_console_setup(struct earlycon_device *device,

static int mlb_usio_probe(struct platform_device *pdev)
{
- struct clk *clk = devm_clk_get(&pdev->dev, 0);
+ struct clk *clk = devm_clk_get(&pdev->dev, NULL);
struct uart_port *port;
struct resource *res;
int index = 0;
--
1.9.1


2019-04-18 06:47:52

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] serial: Fix using plain integer instead of Null pointer

On Thu, Apr 18, 2019 at 03:21:25PM +0900, Sugaya Taichi wrote:
> Fix build warning that using plain integer as Null pointer.
> This is reported by kbuild test robot.
>
> Fixes: ba44dc043004 ("serial: Add Milbeaut serial control")
> Signed-off-by: Sugaya Taichi <[email protected]>
> ---
> drivers/tty/serial/milbeaut_usio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Using a "Reported-by:" tag is usually a good idea. I'll add it when I
apply the patch, but for next time can you please add it?

thanks,

greg k-h

2019-04-18 07:12:18

by Sugaya Taichi

[permalink] [raw]
Subject: Re: [PATCH] serial: Fix using plain integer instead of Null pointer

Hi,

On 2019/04/18 15:40, Greg Kroah-Hartman wrote:
> On Thu, Apr 18, 2019 at 03:21:25PM +0900, Sugaya Taichi wrote:
>> Fix build warning that using plain integer as Null pointer.
>> This is reported by kbuild test robot.
>>
>> Fixes: ba44dc043004 ("serial: Add Milbeaut serial control")
>> Signed-off-by: Sugaya Taichi <[email protected]>
>> ---
>> drivers/tty/serial/milbeaut_usio.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Using a "Reported-by:" tag is usually a good idea. I'll add it when I
> apply the patch, but for next time can you please add it?
>

Yes, of course!
I will add the tag in the next chance.

Thanks a lot!
Sugaya Taichi

> thanks,
>
> greg k-h
>