serial: 8250_ni: use kzalloc_obj() for allocation
PATCH 1/1 serial: 8250_ni: use kzalloc_obj() for allocation
Replace kzalloc() with the preferred kzalloc_obj() helper to address a checkpatch warning.
Signed-off-by Pete Connor <[email protected]>
--- drivers/tty/serial/8250/8250_ni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/8250/8250_ni.c +1 -1
@@ -285,7 +285,7 @@ static int ni16550_probe(struct platform_device *pdev)bool rs232_property;int ret; - uart =kzalloc (sizeof (*uart),GFP_KERNEL ); + uart =kzalloc_obj (*uart,GFP_KERNEL );if (!uart)return -ENOMEM ;
Signature · 1 line
2.47.3
Chaitanya Vadrevu
maintainerQuoted 13 lines
Replace
kzalloc()with the preferredkzalloc_obj()helper to address a checkpatch warning.Signed-off-by Pete Connor <[email protected]>--- drivers/tty/serial/8250/8250_ni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/tty/serial/8250/8250_ni.c +0
-0
drivers/tty/serial/8250/8250_ni.c static int ni16550_probe(struct platform_device *pdev) · line 288
Quoted 5 lines
drivers/tty/serial/8250/8250_ni.c +1
-1@@ -285,7 +285,7 @@ static int ni16550_probe(struct platform_device *pdev)bool rs232_property;int ret; - uart =kzalloc (sizeof (*uart),GFP_KERNEL ); + uart =kzalloc_obj (*uart,GFP_KERNEL );
tty-next doesn't yet have the commit that defines kzalloc_obj so this fails to build. Will have to wait until tty-next has kzalloc_obj.
drivers/tty/serial/8250/8250_ni.c static int ni16550_probe(struct platform_device *pdev) · line 290
Quoted 2 lines
drivers/tty/serial/8250/8250_ni.c +0
-0if (!uart)return -ENOMEM ;
Regards,
Chaitanya
Greg Kroah-Hartman
maintainerQuoted 4 lines · Pete Connor
Replace
kzalloc()with the preferredkzalloc_obj()helper to address a checkpatch warning.Signed-off-by Pete Connor <[email protected]>
Something went wrong with your indentation here :(