From patchwork Tue Nov 7 19:06:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 741934 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1793768wrr; Tue, 7 Nov 2023 11:06:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtlBdimYaywP2sXgwP9BfjVhdN0NNB7KS6CYTAqC6KTtibZriePtc5jHtp5Et9N5I+rupO X-Received: by 2002:a17:906:d14c:b0:9be:4bb0:64f with SMTP id br12-20020a170906d14c00b009be4bb0064fmr14087606ejb.54.1699384016670; Tue, 07 Nov 2023 11:06:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699384016; cv=none; d=google.com; s=arc-20160816; b=uVZBbvV1/0U/dKdI5IvOr098zEZMYt5271wOm0HSE5BGyw3nYI47DibVLu62RM28Q0 +6aTzjRr3k85kS7q+MJTrHMFpoBncu2+0CHtZRW+u3w/KfNwrBBIWnW8JezzYZOlA0nV VAsq7uGEfA2sRT2cLYboyR37U/kVUn/HeJMnwBjiYib3jY4JCJebU8cCZjlP5q8ixOLA 9WqXPZJcZfxml/FnHeQ82+hRmbqm2PQ0e1MdY1scHjscjWH09GGALDg6a94q1KpW0VnS 56Bkx+sPMvfxAHOzrEfIrc/VtPb2EPSHlzM6yqfsQ8I9ea+LRpMO2Gd20qfnX9z4/CS7 urkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=M/pKtokJ16QvLgTtzXCD1ooraExBNQXaxs+a4bK0Yss=; fh=V8mDuKiLPNtyICTEK9bwK0gdoM7g2D1lZIysD2SFi7U=; b=X7W1E9nUQP0T8yT5Ht2OpPblsCn/lD1s7kVYrxwIYjYdhpdad7qtE0wE3UGQQSOh1C BD+IpA2Nu5W83uGXQ5fDwG6A0fumqjj4Zjr/98X41w1harDg6GUKmqgiSTS8CpDumqvY k5riAwcueDwmCwZqCewk82t5ek4sWxGB6YZGdJt7G+DgxJWwbsd3KPEWWUpF8WqHDDbP lAYY0y6DiWUZC7pvveYZWErMF1Q9O0NF8OhVuNJ+ALe5NYBPYC1FEQxl1Qpek8GZ7a3+ fh3SfYUCHTbCpuMZ/oBYsM3s9yrow5IcIA3Gm17Ntnw6C6A8eCKQuXICwTCFL451h+WG mNPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OPTHyffK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id 29-20020a170906001d00b009e2c65a064bsi537370eja.443.2023.11.07.11.06.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 11:06:56 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OPTHyffK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CB527875EF; Tue, 7 Nov 2023 20:06:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="OPTHyffK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1C612875C3; Tue, 7 Nov 2023 20:06:13 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 209C387584 for ; Tue, 7 Nov 2023 20:06:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=semen.protsenko@linaro.org Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6ce2c5b2154so3855254a34.3 for ; Tue, 07 Nov 2023 11:06:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699383966; x=1699988766; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=M/pKtokJ16QvLgTtzXCD1ooraExBNQXaxs+a4bK0Yss=; b=OPTHyffKKwZwDPP+WzqNF9MAPhxNTN1bNvhzDeiv4J2gi/la/J2RpwPV+G5kYF40T8 k87pQV2hYYwuftIt2OvFGCwN/03s0mAwZwtWmyGnLcpxQC94EpowKwncm76NbjTTmnX6 WIRxPuCfcbS9doFvqU6zC4sn+oDTdiMK3XtasOLqLlSxD9A/XoCwPSfmIVfnH2SzhiWg EAMuGE4Lx+YkrOB0JplYsJ5/rKnk6vzqX+4Um4Fxm80pqOsXB4JZD7MpwzwBTpsoj4sS WmVTFTK/viVo1cHDU2qIwhOoiw8+3q3cD1+PDa+Wu04qZO2ntywcYUNnDsloOb7hmF0X 1nqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699383966; x=1699988766; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M/pKtokJ16QvLgTtzXCD1ooraExBNQXaxs+a4bK0Yss=; b=NYfRj/rxeRS/WZ/AcOYu4XzKdrCzcGLpsXrKgRuxOCkEO0m+imn3kKl4sNMznHHOG0 Pzv5sdPZmTKqw19kiyZ268JR8L5CqTx7Kmg+L+j8G6ulufHAd4usJ9/pFe2qOSIdPWf2 KQU+amVLY40LU71vvLOC/9VkSiwcepTMvkCIELsLNOJ/cOWU4X/5sjCUfqQcWJeov8YH dG+C9BZKAHr9W160Fv/KZu3wsh2q1XXpFjx5o8FKdQNN/owsizuLEAwhZGDQfMAAb+zD Ifj9WHDNLqv8Mmj8VUczptAP9QoszNE3dLVwj+OqeQhNVU5iHZ0QT8E/EnI+F65RgI/C gzQg== X-Gm-Message-State: AOJu0Yy4vc6yavhMfCqa7szze7WGlCAOlsTovtCaRkh33w88bdRlWSqP ZaE/E0OFas0vwau0MT44yh665g== X-Received: by 2002:a05:6830:7181:b0:6b9:a926:4a12 with SMTP id el1-20020a056830718100b006b9a9264a12mr42774453otb.28.1699383965659; Tue, 07 Nov 2023 11:06:05 -0800 (PST) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id bg19-20020a056830361300b006ce2ec1d000sm1665884otb.59.2023.11.07.11.06.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 11:06:05 -0800 (PST) From: Sam Protsenko To: Simon Glass , Tom Rini Cc: Mark Kettenis , u-boot@lists.denx.de Subject: [PATCH 4/4] serial: s5p: Improve coding style Date: Tue, 7 Nov 2023 13:06:01 -0600 Message-Id: <20231107190601.17151-5-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231107190601.17151-1-semen.protsenko@linaro.org> References: <20231107190601.17151-1-semen.protsenko@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Just some minor style fixes. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Simon Glass --- drivers/serial/serial_s5p.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c index 6d316ccaf31d..c24d9bca84c9 100644 --- a/drivers/serial/serial_s5p.c +++ b/drivers/serial/serial_s5p.c @@ -50,9 +50,9 @@ enum { /* Information about a serial port */ struct s5p_serial_plat { - struct s5p_uart *reg; /* address of registers in physical memory */ - u8 reg_width; /* register width */ - u8 port_id; /* uart port number */ + struct s5p_uart *reg; /* address of registers in physical memory */ + u8 reg_width; /* register width */ + u8 port_id; /* uart port number */ u8 rx_fifo_count_shift; u8 tx_fifo_count_shift; u32 rx_fifo_count_mask; @@ -65,7 +65,7 @@ struct s5p_serial_plat { * The coefficient, used to calculate the baudrate on S5P UARTs is * calculated as * C = UBRDIV * 16 + number_of_set_bits_in_UDIVSLOT - * however, section 31.6.11 of the datasheet doesn't recomment using 1 for 1, + * however, section 31.6.11 of the datasheet doesn't recommend using 1 for 1, * 3 for 2, ... (2^n - 1) for n, instead, they suggest using these constants: */ static const int udivslot[] = { @@ -251,10 +251,10 @@ static int s5p_serial_of_to_plat(struct udevice *dev) } static const struct dm_serial_ops s5p_serial_ops = { - .putc = s5p_serial_putc, - .pending = s5p_serial_pending, - .getc = s5p_serial_getc, - .setbrg = s5p_serial_setbrg, + .putc = s5p_serial_putc, + .pending = s5p_serial_pending, + .getc = s5p_serial_getc, + .setbrg = s5p_serial_setbrg, }; static const struct udevice_id s5p_serial_ids[] = { @@ -264,13 +264,13 @@ static const struct udevice_id s5p_serial_ids[] = { }; U_BOOT_DRIVER(serial_s5p) = { - .name = "serial_s5p", - .id = UCLASS_SERIAL, - .of_match = s5p_serial_ids, - .of_to_plat = s5p_serial_of_to_plat, + .name = "serial_s5p", + .id = UCLASS_SERIAL, + .of_match = s5p_serial_ids, + .of_to_plat = s5p_serial_of_to_plat, .plat_auto = sizeof(struct s5p_serial_plat), - .probe = s5p_serial_probe, - .ops = &s5p_serial_ops, + .probe = s5p_serial_probe, + .ops = &s5p_serial_ops, }; #endif @@ -298,10 +298,12 @@ static inline void _debug_uart_putc(int ch) struct s5p_uart *uart = (struct s5p_uart *)CONFIG_VAL(DEBUG_UART_BASE); #if IS_ENABLED(CONFIG_ARCH_APPLE) - while (readl(&uart->ufstat) & S5L_TX_FIFO_FULL); + while (readl(&uart->ufstat) & S5L_TX_FIFO_FULL) + ; writel(ch, &uart->utxh); #else - while (readl(&uart->ufstat) & S5P_TX_FIFO_FULL); + while (readl(&uart->ufstat) & S5P_TX_FIFO_FULL) + ; writeb(ch, &uart->utxh); #endif }