Commit 826bd77a authored by Théo Lebrun's avatar Théo Lebrun Committed by Greg Kroah-Hartman
Browse files

tty: serial: amba-pl011: fix miscellaneous checkpatch warnings



Fix the following messages from checkpatch:

    $ ./scripts/checkpatch.pl --strict --file \
        drivers/tty/serial/amba-pl011.c

    ERROR: do not initialise statics to false
    WARNING: Possible unnecessary 'out of memory' message
    WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
    WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then
             dev_info(dev, ... then pr_info(...  to
    CHECK: Prefer using the BIT macro

Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarThéo Lebrun <theo.lebrun@bootlin.com>
Link: https://lore.kernel.org/r/20231207-mbly-uart-v6-6-e384afa5e78c@bootlin.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 28a7ec8c
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@
#define AMBA_ISR_PASS_LIMIT	256

#define UART_DR_ERROR		(UART011_DR_OE | UART011_DR_BE | UART011_DR_PE | UART011_DR_FE)
#define UART_DUMMY_DR_RX	(1 << 16)
#define UART_DUMMY_DR_RX	BIT(16)

enum {
	REG_DR,
@@ -1109,7 +1109,6 @@ static void pl011_dma_startup(struct uart_amba_port *uap)

	uap->dmatx.buf = kmalloc(PL011_DMA_BUFFER_SIZE, GFP_KERNEL | __GFP_DMA);
	if (!uap->dmatx.buf) {
		dev_err(uap->port.dev, "no memory for DMA TX buffer\n");
		uap->port.fifosize = uap->fifosize;
		return;
	}
@@ -2528,7 +2527,7 @@ static void qdf2400_e44_putc(struct uart_port *port, unsigned char c)
		cpu_relax();
}

static void qdf2400_e44_early_write(struct console *con, const char *s, unsigned n)
static void qdf2400_e44_early_write(struct console *con, const char *s, unsigned int n)
{
	struct earlycon_device *dev = con->data;

@@ -2547,7 +2546,7 @@ static void pl011_putc(struct uart_port *port, unsigned char c)
		cpu_relax();
}

static void pl011_early_write(struct console *con, const char *s, unsigned n)
static void pl011_early_write(struct console *con, const char *s, unsigned int n)
{
	struct earlycon_device *dev = con->data;

@@ -2653,8 +2652,8 @@ static struct uart_driver amba_reg = {
static int pl011_probe_dt_alias(int index, struct device *dev)
{
	struct device_node *np;
	static bool seen_dev_with_alias = false;
	static bool seen_dev_without_alias = false;
	static bool seen_dev_with_alias;
	static bool seen_dev_without_alias;
	int ret = index;

	if (!IS_ENABLED(CONFIG_OF))
@@ -2995,7 +2994,7 @@ static struct amba_driver pl011_driver = {

static int __init pl011_init(void)
{
	printk(KERN_INFO "Serial: AMBA PL011 UART driver\n");
	pr_info("Serial: AMBA PL011 UART driver\n");

	if (platform_driver_register(&arm_sbsa_uart_platform_driver))
		pr_warn("could not register SBSA UART platform driver\n");