From patchwork Mon Jun 26 09:11:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 112809 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7348729vqr; Mon, 26 Jun 2023 02:21:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Tip1oO0S3IhlaLavGkFNkGSZctxDHsRTUZ2b6HrXhodJ50fJg9Avq8w+DeQjgM7C+odaV X-Received: by 2002:a05:6a20:6a1e:b0:119:5af7:7cef with SMTP id p30-20020a056a206a1e00b001195af77cefmr21018059pzk.56.1687771282391; Mon, 26 Jun 2023 02:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687771282; cv=none; d=google.com; s=arc-20160816; b=UdMKm4tc7tA169OMwsIOKf+fTBlcsnw9b7xeyXxO2EdGQR4/7ofoMLXABA3mcFPrdR MKmecU/AcZkqEhqGArCb9/+MifYt6E/KkR44KHAW8GSkY5aZ8CMo14rw1VQIKCIlTqnL p1l4ULL9EEXlxcNshPb2WrWTtl7d8/Nq7D1iES0xiRfjgPyBwmkUT7VAuAk4AyLyzM9v OMmQtA/mqEh/Q2GlCN9BSxdxZbf8dtU8FJLygWTpfs3w8r/6S2IaUb4Ow1WVZpxhjLOv bzilrxuCrLf92EoKEL9hRjqIgLzzFO2FO1nc7vr1EPOQqbPrsVMIR843HlBxPO62PrWX S9Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=FU1rRT5rRxL9pM8a+1rMbZNJKqtiIhbKRAc/m62/7RQ=; fh=zqLt1N1hdzn3CS2/Ho82qXeaiyluP5WRbPkiO5/VNXI=; b=z7a2NxDPUCdhi9kNeOqF586J5ePSwGaddbx+FjHatVFC6ZP94+CnBW9KRDV/Ot4DMR jAm2Mcn8vFcBN41cbluVesV7x4yMLQ/mXOl7ERVHgTOgTUL/xo86mvF794C2mIhc4hxY APszTWQdglAfbwoXTppWAT2/7Q3CbboO6kkjELofR54RgVAR4iqkyuHcAz7GYoLERdhv W0+mmhcCzPPjxCf+tIHQaEIZy+d4piqwnuVHjzI57FvenyiBdLRzHNjBKmsEwcbApSFh aV7xR2z/v+DP9M3DrznkHs+f9mWn79i2MR9581iTT79eI45zxeKJ31k+3/pVEuQC4v2V wkgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Gvo5i9Fk; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z22-20020a056a001d9600b0066a44ce266dsi4420551pfw.39.2023.06.26.02.21.10; Mon, 26 Jun 2023 02:21:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Gvo5i9Fk; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230290AbjFZJOK (ORCPT + 99 others); Mon, 26 Jun 2023 05:14:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbjFZJNL (ORCPT ); Mon, 26 Jun 2023 05:13:11 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 396EBDD; Mon, 26 Jun 2023 02:11:40 -0700 (PDT) Date: Mon, 26 Jun 2023 09:11:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1687770698; h=from:from:sender:sender:reply-to: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=FU1rRT5rRxL9pM8a+1rMbZNJKqtiIhbKRAc/m62/7RQ=; b=Gvo5i9Fk9+OdF/voFqD5zQC8rpUGq618/N/fMBccDd4PsTQ5EsicvYzYxBNOLqM3hm2Tqd 2cdp90KDoqpm54Kii3w5dyAg1qcE7be2kBcpiBENtfLiU1HT4R4hK+GT8qljdU4s/a4Iyp YithflBxmJqTfwZlP+/io3OGMqBQ8mR/Fi6wBa0peXH7aqJOx3x7qtDD9KNOCpDwbBqE/a O8PPgmbQaNU5ZFbhWvydAijtOkoFKrMOJ20Cnw5mn8mE5U9uqygLqxRGPKlTgx4thej1Vg nf2ZuKspqriTeRDgg5tJyyJvPCww6ywZeD6YwQVeyg8ylsB9uTwzOjKZ/2Fd+w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1687770698; h=from:from:sender:sender:reply-to: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=FU1rRT5rRxL9pM8a+1rMbZNJKqtiIhbKRAc/m62/7RQ=; b=YBAFNA0fCNH74x45Xgi0eLoWd5pMJ7Tu98NdhePwv1sOn0MzQeIsjIvSDqntkQNoU/mSIP 3u8YoDgBEGRxJqCA== From: tip-bot2 for Uwe =?utf-8?q?Kleine-K=C3=B6nig?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/drivers/imx-gpt: Use only a single name for functions Cc: u.kleine-koenig@pengutronix.de, Daniel Lezcano , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230328091514.874724-1-u.kleine-koenig@pengutronix.de> References: <20230328091514.874724-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Message-ID: <168777069819.404.8166787255260497760.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761602862325636200?= X-GMAIL-MSGID: =?utf-8?q?1769756459727468620?= The following commit has been merged into the timers/core branch of tip: Commit-ID: 95aded1b1c409fb2e902c6bd455068700ac38878 Gitweb: https://git.kernel.org/tip/95aded1b1c409fb2e902c6bd455068700ac38878 Author: Uwe Kleine-König AuthorDate: Tue, 28 Mar 2023 11:15:14 +02:00 Committer: Daniel Lezcano CommitterDate: Mon, 19 Jun 2023 17:31:56 +02:00 clocksource/drivers/imx-gpt: Use only a single name for functions When looking at the data structs defining the different behaviours of the GPT blocks in different SoCs it's not helpful that the same functions are used with different names. So drop the cpp defines and use the original names. This commit was generated using: perl -i -e 'my %m; while (<>) { if (/^#define (imx[a-zA-Z0-6_]*)\s(imx[a-zA-Z0-6_]*)/) {$m{$1} = $2; } else { foreach my $f (keys %m) {s/$f/$m{$f}/; } print; } }' drivers/clocksource/timer-imx-gpt.c This patch has no effect on the generated code. Signed-off-by: Uwe Kleine-König Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230328091514.874724-1-u.kleine-koenig@pengutronix.de --- drivers/clocksource/timer-imx-gpt.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/clocksource/timer-imx-gpt.c b/drivers/clocksource/timer-imx-gpt.c index ca3e4cb..83cefff 100644 --- a/drivers/clocksource/timer-imx-gpt.c +++ b/drivers/clocksource/timer-imx-gpt.c @@ -93,13 +93,11 @@ static void imx1_gpt_irq_disable(struct imx_timer *imxtm) tmp = readl_relaxed(imxtm->base + MXC_TCTL); writel_relaxed(tmp & ~MX1_2_TCTL_IRQEN, imxtm->base + MXC_TCTL); } -#define imx21_gpt_irq_disable imx1_gpt_irq_disable static void imx31_gpt_irq_disable(struct imx_timer *imxtm) { writel_relaxed(0, imxtm->base + V2_IR); } -#define imx6dl_gpt_irq_disable imx31_gpt_irq_disable static void imx1_gpt_irq_enable(struct imx_timer *imxtm) { @@ -108,13 +106,11 @@ static void imx1_gpt_irq_enable(struct imx_timer *imxtm) tmp = readl_relaxed(imxtm->base + MXC_TCTL); writel_relaxed(tmp | MX1_2_TCTL_IRQEN, imxtm->base + MXC_TCTL); } -#define imx21_gpt_irq_enable imx1_gpt_irq_enable static void imx31_gpt_irq_enable(struct imx_timer *imxtm) { writel_relaxed(1<<0, imxtm->base + V2_IR); } -#define imx6dl_gpt_irq_enable imx31_gpt_irq_enable static void imx1_gpt_irq_acknowledge(struct imx_timer *imxtm) { @@ -131,7 +127,6 @@ static void imx31_gpt_irq_acknowledge(struct imx_timer *imxtm) { writel_relaxed(V2_TSTAT_OF1, imxtm->base + V2_TSTAT); } -#define imx6dl_gpt_irq_acknowledge imx31_gpt_irq_acknowledge static void __iomem *sched_clock_reg; @@ -296,7 +291,6 @@ static void imx1_gpt_setup_tctl(struct imx_timer *imxtm) tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN; writel_relaxed(tctl_val, imxtm->base + MXC_TCTL); } -#define imx21_gpt_setup_tctl imx1_gpt_setup_tctl static void imx31_gpt_setup_tctl(struct imx_timer *imxtm) { @@ -343,10 +337,10 @@ static const struct imx_gpt_data imx21_gpt_data = { .reg_tstat = MX1_2_TSTAT, .reg_tcn = MX1_2_TCN, .reg_tcmp = MX1_2_TCMP, - .gpt_irq_enable = imx21_gpt_irq_enable, - .gpt_irq_disable = imx21_gpt_irq_disable, + .gpt_irq_enable = imx1_gpt_irq_enable, + .gpt_irq_disable = imx1_gpt_irq_disable, .gpt_irq_acknowledge = imx21_gpt_irq_acknowledge, - .gpt_setup_tctl = imx21_gpt_setup_tctl, + .gpt_setup_tctl = imx1_gpt_setup_tctl, .set_next_event = mx1_2_set_next_event, }; @@ -365,9 +359,9 @@ static const struct imx_gpt_data imx6dl_gpt_data = { .reg_tstat = V2_TSTAT, .reg_tcn = V2_TCN, .reg_tcmp = V2_TCMP, - .gpt_irq_enable = imx6dl_gpt_irq_enable, - .gpt_irq_disable = imx6dl_gpt_irq_disable, - .gpt_irq_acknowledge = imx6dl_gpt_irq_acknowledge, + .gpt_irq_enable = imx31_gpt_irq_enable, + .gpt_irq_disable = imx31_gpt_irq_disable, + .gpt_irq_acknowledge = imx31_gpt_irq_acknowledge, .gpt_setup_tctl = imx6dl_gpt_setup_tctl, .set_next_event = v2_set_next_event, };