Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp332075rdb; Thu, 30 Nov 2023 06:08:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaHd3+NH3QiKV803wCQ7FMLHXC4DKUxCvskpiwxmPnzM4y/TVBZbr9cHXgNI/JjWoeKmAm X-Received: by 2002:a6b:d813:0:b0:7a6:7bbe:5aa0 with SMTP id y19-20020a6bd813000000b007a67bbe5aa0mr17675177iob.0.1701353327652; Thu, 30 Nov 2023 06:08:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701353327; cv=none; d=google.com; s=arc-20160816; b=FQpv4+skk2whYUvc0KZPdYOaTE1gfl44IzUD7hzMIQncLrVDmICh3sLGHUZLlL+moT n3RfFvBunixQyfBwBwRcVTv3AAq7LXJDu/wofyKe/eGzu69AyOO/e3c4+SZFR1JWUuO5 2AHl+6mQYJlro0z9xMj+KllM5QgP0QAw3IG8mQIoquXxUChYEQ889L+n3wHcGuvsWf3b Lj1J9O2GVLTE5CblV+DCxzbch/0BwNqp3e3O5tJCLy7VIXgoDLg1KYIWm+BJEHDMUdw5 3YIZkdo1TY+Yu2XTQe2XeG8buC+p178RMEQl9fo+X+M7hwuEwmSjtIXPZrDGs72uvLoP OudA== 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 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id y16-20020a656c10000000b005bd5a60d73csi1469717pgu.708.2023.11.30.06.08.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 06:08:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; 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 2620:137:e000::3:8 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 03F6380C7742; Thu, 30 Nov 2023 06:08:32 -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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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?Th=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:32 -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 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