From patchwork Thu Nov 30 14:07:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Patchwork-Id: 171924 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp411806vqy; Thu, 30 Nov 2023 06:08:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IFJ3KLWKrx6kuE4NLEgMnBGKWGKwg7gnT4wuAMuG2VcY/esLQkm6+jEVBrS36LVbaXLoZin X-Received: by 2002:a05:6871:729c:b0:1fa:1eb7:9cae with SMTP id mm28-20020a056871729c00b001fa1eb79caemr22223896oac.23.1701353305707; Thu, 30 Nov 2023 06:08:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701353305; cv=none; d=google.com; s=arc-20160816; b=ogVHuY2K1Lo/EuAwPuVEwUe5MPtyKsGUIpN68X+96FGAix09/u4shFcxxQmt1xQccv WOSo9hyBzbbqMfsjtvx/43IbrDHRLaJ0KZ+as4rCl2z+nsOEzVftcpAGFyRVSMUtJDBC zK92JvlZ5utAoIGepM3GBU5RsWfKBuD0SIzXBFmgccXd0tU+mkr757IopjJxohhzw1KX yEfIYRAhKBXYGiuKTurmbYcsAomhjzMEdsajFN134960h7KWesM6SJAMEhISNzXOkmh/ V46WyXZShBmz7H8Ezqp55wzKsxwsVMxDBC8gWGkLh+58q7yXK6A+3F/f6Hik0Lyhho0w gB6Q== 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=xpzdCa8ytD7X29uBioQ7jY/NXgh5rnjsDhzeyzSU0ro=; fh=AHZzcI0NKFNU1WuuS/FWF2LprSMGsTAGL8gmMiTfjNU=; b=EhOn0/7kYsFkQeOxKeg7woweVVPuc+6oKdNzeBTBx41NU25FR0Qw6jrkrIzu3XrEnt HiuQMMNhDbi0Q5G/NCDW5ZgL7P6UaIUh1EjEkKa8n+yHdgtUUplO+BjT3WN597HE9q3Q STOUNWWkcZlMK5Kjq5grZk6rrfi/2gi0Y3ibdLoKA4wkLbQLlp9kwLDEM/M5MYEd3MaK 1mqvL0dQao+62PtI5eu5y/CoIF/z5Z/ksqtVi6fqVNGoJ8aZPGwLwhIp34XBAibne4/4 y2wqAnJPmQyMPbdyLZ2dBFCx2QMljpnXBx+c1l+7noHM3gNUpLhwe44sAKr3gwhwCLkB el5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=BttBXVRJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id jd4-20020a0568702a4400b001fa14f474e3si445983oab.179.2023.11.30.06.08.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 06:08:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=BttBXVRJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 85C9D80C7753; Thu, 30 Nov 2023 06:08:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345906AbjK3OHp (ORCPT + 99 others); Thu, 30 Nov 2023 09:07:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345816AbjK3OHc (ORCPT ); Thu, 30 Nov 2023 09:07:32 -0500 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DF081B3; Thu, 30 Nov 2023 06:07:38 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id E2B794000F; Thu, 30 Nov 2023 14:07:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1701353257; 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=xpzdCa8ytD7X29uBioQ7jY/NXgh5rnjsDhzeyzSU0ro=; b=BttBXVRJVyDD4HnPCP4cuUeYUnJf3K/nK1fgXQ/ll1+s1Z4F7D1CTD37h/cFUlK9iAbYC3 xhqNmUO63l6dxwKL/Pcy/RO5XL95xNWFwx8h6wDI1nH5Hygnw8Z2RLhJCVb04Az5tc2Emb K/WJ1mnap3oT4yR/ctGMZgFdjYWmKi0Q+Alx5tUbNipesOAIrR0npfLnTk6cGqNH9cxoYh 3qdxSOUpVVfx+GEGoM1zrlhMoZmuyVVD/jPy8OwKlnaaRFdkWxPsIHTi74GuZ7sIo6uQIX P3l9JRf+uKhEHHcKBDiDkZovcUzfNmO659yoJ02vpT8j2pgzAJrCDs8d4JymdA== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Thu, 30 Nov 2023 15:07:19 +0100 Subject: [PATCH v5 7/9] tty: serial: amba-pl011: fix miscellaneous checkpatch warnings MIME-Version: 1.0 Message-Id: <20231130-mbly-uart-v5-7-6566703a04b5@bootlin.com> References: <20231130-mbly-uart-v5-0-6566703a04b5@bootlin.com> In-Reply-To: <20231130-mbly-uart-v5-0-6566703a04b5@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?T?= =?utf-8?q?h=C3=A9o_Lebrun?= X-Mailer: b4 0.12.3 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 fry.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 (fry.vger.email [0.0.0.0]); Thu, 30 Nov 2023 06:08:17 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783998243792628943 X-GMAIL-MSGID: 1783998243792628943 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 Signed-off-by: Théo Lebrun Reviewed-by: Linus Walleij --- 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");