Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1834700rdb; Thu, 7 Dec 2023 09:57:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IFN33+NBV7C6eWYtMmaJWeNdPIVdhluZu7JySHpd4RGHi98Os06veQGe7zpZ0fsA+d8hFaj X-Received: by 2002:a17:902:ab0b:b0:1d1:e319:80ba with SMTP id ik11-20020a170902ab0b00b001d1e31980bamr1450707plb.20.1701971827575; Thu, 07 Dec 2023 09:57:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701971827; cv=none; d=google.com; s=arc-20160816; b=gdSf5IDWWw4gQjvYc1Ot8U2i94XDc0cVr58eQYDoeteC8V/b+4enWv5CJA6t4rZ8+i S9wCE1ZHbD2RAyvAlPGt8LHjYQAfT9dlsvJRWCYhz1sxFcLx5mjEIRRwQsYExfr2yX0m eBql3bzUYbZGLSd59en7ggsJb1JCvieTMlqmnraTSusIbRanB9dqdPzApIebsduK6yQw cZFf66Q0P3yUj8ArhBGjXowSQ/mmN5QmElSsjATvdXYuEGRv+rdWTwNEMbHoMr0YYlso ooGHdt0KOQmdW4cgroAhI9o3ybxQh4TCsstEDuVladCxUuzei4L5aHq+BxUdCPPCdXQw 4iow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=EKaWxXFnkFdNP4OwlA33WSSIB/Rv3B+W2fl3gWTPZ5A=; fh=AHZzcI0NKFNU1WuuS/FWF2LprSMGsTAGL8gmMiTfjNU=; b=RZ1HjKUIEwF26PIthOtH5kJmGgs67HBIJE9zS0KN00fMzfqeWwEJQ9Z0GtH8jsHgf1 E7YEhlur18/Vg0jpn+DFyZpqt2gBy6EHABlnu4zqeNIJmP4fNbje876qfh7h5W8pwOFg ZydsFTmPNGkz+yTKyt439tl6ft5aaHbk2Npxad4sTb6X9wkgK0vbdHT929vRdUCM8eDX neKaRNeAa42m3CKxPJs2NRv9170lJhmBOIvSKywS0XMx7FuJLE2uEwlrpgR4/wQe3id2 95GbOb0//3V7hUG0YwFrN0QgNF0AfD7qv2/64OKjMfc6S0ZNLuUAIo/RamoDrNvMex0K mdXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=crW83ABl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id w13-20020a170902a70d00b001d0824216a3si105607plq.432.2023.12.07.09.57.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 09:57:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=crW83ABl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id EB82A83AE42C; Thu, 7 Dec 2023 09:57:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443615AbjLGR4o (ORCPT + 99 others); Thu, 7 Dec 2023 12:56:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443588AbjLGR43 (ORCPT ); Thu, 7 Dec 2023 12:56:29 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2927170C; Thu, 7 Dec 2023 09:56:34 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 24D60E000A; Thu, 7 Dec 2023 17:56:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1701971793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EKaWxXFnkFdNP4OwlA33WSSIB/Rv3B+W2fl3gWTPZ5A=; b=crW83ABl0f6g1T10RMg5J9yHykIal3UgNmDFhlUnJjsKyuvTL5bZhiTZ8KcwhbwF1W0ls1 LbpKRStZqDYCyGKEIL8jJhGc9hovZcBGTActNJvvj3hUhTEKgDTCohDlAlJW8l5V0kEbPJ zTWyrz4GzshIdduUDInX5NjYqxmfGazA07TEUns86Q/SUoP8wjH2cTSyP30EhASr70zZT3 mtELkdvknyP9r3Tz2RQyowW2hlHjw+sVH6s7GFV85DBnYlYEihWOJ/0bXaugpUyEqToYPD IYGCUrFeCA3w/urqgszca30w04tSl4yz5ElIobGLSZXRxn9JBOvh9OrRwd5Hhw== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Thu, 07 Dec 2023 18:56:11 +0100 Subject: [PATCH v6 6/8] tty: serial: amba-pl011: fix miscellaneous checkpatch warnings MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20231207-mbly-uart-v6-6-e384afa5e78c@bootlin.com> References: <20231207-mbly-uart-v6-0-e384afa5e78c@bootlin.com> In-Reply-To: <20231207-mbly-uart-v6-0-e384afa5e78c@bootlin.com> To: Russell King , Greg Kroah-Hartman , Jiri Slaby Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Linus Walleij , =?utf-8?q?Gr=C3=A9gory_Clement?= , Alexandre Belloni , Thomas Petazzoni , Vladimir Kondratiev , Tawfik Bayouk , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.12.4 X-GND-Sasl: theo.lebrun@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 07 Dec 2023 09:57:05 -0800 (PST) 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: Linus Walleij Signed-off-by: Théo Lebrun --- drivers/tty/serial/amba-pl011.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 3c657bac2359..d141af8f8a5f 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -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)) @@ -2996,7 +2995,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"); -- 2.43.0