From patchwork Tue Dec 19 17:18:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugo Villeneuve X-Patchwork-Id: 181145 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2099487dyi; Tue, 19 Dec 2023 09:30:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEL84be18/Vj40mIi09w7K7ksKrXbzJFccx47AiYw1IwXj403DcuGhLT6C3V41vAOiahw3U X-Received: by 2002:a17:906:140f:b0:a23:6d5a:7dcb with SMTP id p15-20020a170906140f00b00a236d5a7dcbmr1251051ejc.75.1703007057427; Tue, 19 Dec 2023 09:30:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703007057; cv=none; d=google.com; s=arc-20160816; b=wJwvnvoIskt7oW3+PqE9uA9pQTNROLALspx/pZIv1ixMXhAAkI5Bj1EogeFTMMOP0k qmc5n2ByERGRgUWmj6k0uGN+kQ0uGuPLNnwnvuZ1SRrMTB+aOqOww6N9jSH1Ywjg3S+t QUt0wTJ521MOoEXKaOjOM9kwwsD64+sADTsWLonxoYvG0RdHOtPke3wNmI04OYTiDRYq 8oj7gq3uCU+obLGTSf1/2z6Fs1hL3rkqGOFPkC4UoeJHn0/aLj3R4ymHNSaQF7mhzT9l UwmfMpWaOnLxumJDcrs2B1pqgwWuPjycY8cJ2omRYikdLD2ueMblSLTH7z4/8uu1hrjS zZSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:cc:to:from:dkim-signature; bh=teRiT/PcWy7VJ9V99NNQOeeSZvzVxy17hbE3C1wRPvE=; fh=XmY8az1z5a+LjrZQ1DQahIeB3Uro2SuOHb+6mIYcxXo=; b=J2mgBOH+lrKmDdyGf+fEtVlGZw9ZSUqIZwvYB8LSn20lAJPUBlxkGMo4WwKSVqswDK L4WVivE08uDsXFEu/BLYULiRMjbGlCmD1Ax67JAug+0bXRWzis1XOl0TNWmGCPOnAzOO aPpjEL0Y61IYNVGuqBuSP8Fh06q0iGKfag7FTL5Za/A5dyESYV4lshJNXIvXs8rvi9CA 7Dt7WvDjoumnthA7Pby7caAiiToIvuoaqYYH2lGDbq+UiIIGw7e7c2WjUNPLnuE7hCjF WSgxaxohBK1fi6NFOZwHQbT4YC5XppjJxXjT/NnsejVSpSaDyWyTzIMOmQWyX1qqp5vU BMFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b=ci4Gmm1s; spf=pass (google.com: domain of linux-kernel+bounces-5680-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5680-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p14-20020a1709061b4e00b00a2353a3f72csi2172876ejg.1009.2023.12.19.09.30.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:30:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5680-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b=ci4Gmm1s; spf=pass (google.com: domain of linux-kernel+bounces-5680-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5680-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A45C21F2524F for ; Tue, 19 Dec 2023 17:24:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69A083FE3D; Tue, 19 Dec 2023 17:19:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.b="ci4Gmm1s" X-Original-To: linux-kernel@vger.kernel.org Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 495363715D; Tue, 19 Dec 2023 17:19:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hugovil.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hugovil.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Cc:To :From:subject:date:message-id:reply-to; bh=teRiT/PcWy7VJ9V99NNQOeeSZvzVxy17hbE3C1wRPvE=; b=ci4Gmm1sWAzaQsm3++CMVL9fPO qVSxhUubXDTMj40TZTnvWxCo1AQ+a8BENEENLsZwFioUVOjjpnFCbM2ARQ2XxRuBzw4d+wYzsHbVY KQylOUUYeM5GO/sBX33tzfHkNFwoypobk+AEUvTtq2gtU4wMpuSnJybSLWjMQPPQjU0w=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:40128 helo=pettiford.lan) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1rFdkS-0007Ao-Pm; Tue, 19 Dec 2023 12:19:17 -0500 From: Hugo Villeneuve To: gregkh@linuxfoundation.org, jirislaby@kernel.org, jringle@gridpoint.com, kubakici@wp.pl, phil@raspberrypi.org, bo.svangard@embeddedart.se Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, hugo@hugovil.com, Hugo Villeneuve , Andy Shevchenko Date: Tue, 19 Dec 2023 12:18:54 -0500 Message-Id: <20231219171903.3530985-11-hugo@hugovil.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231219171903.3530985-1-hugo@hugovil.com> References: <20231219171903.3530985-1-hugo@hugovil.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SA-Exim-Connect-IP: 70.80.174.168 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Level: X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -0.0 T_SCC_BODY_TEXT_LINE No description available. Subject: [PATCH 10/18] serial: sc16is7xx: use HZ_PER_MHZ macro to improve readability X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785732328697946410 X-GMAIL-MSGID: 1785732328697946410 From: Hugo Villeneuve Improves code readability by making it more obvious that it is a MHz value. Suggested-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve --- drivers/tty/serial/sc16is7xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 29844e2eefc5..7d5eec2d0e94 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #define SC16IS7XX_NAME "sc16is7xx" @@ -1741,7 +1742,7 @@ static int sc16is7xx_spi_probe(struct spi_device *spi) spi->bits_per_word = 8; /* only supports mode 0 on SC16IS762 */ spi->mode = spi->mode ? : SPI_MODE_0; - spi->max_speed_hz = spi->max_speed_hz ? : 15000000; + spi->max_speed_hz = spi->max_speed_hz ? : 15 * HZ_PER_MHZ; ret = spi_setup(spi); if (ret) return ret;