From patchwork Wed Aug 9 13:27:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 133305 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2880297vqr; Wed, 9 Aug 2023 08:34:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnY7wU+hAqQHIvgPG4KbEfkQkckrO5D/JJxCFn6+nwbZYhxdv+mS3iYrlZ/I9AO6AlCMyc X-Received: by 2002:a17:902:c945:b0:1bc:3908:14d with SMTP id i5-20020a170902c94500b001bc3908014dmr18468607pla.2.1691595296508; Wed, 09 Aug 2023 08:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691595296; cv=none; d=google.com; s=arc-20160816; b=B9AoTFoXkSgEgHSTo31fj6FEIRwrQieyDeTt3LNtTdMGo1s6f3ZKxfCd88slVcaAJr 4lzOxu1ZQo1sKr4z907RCpO59BzNqGxPB4DNWdUdaRPwg2PWtnlJivqHQ04TIBsyyPz+ 6E9QKM9NO6f0sA9g5rYYAkb+cTT4FQaplvzxrOpJKm6QA1Irqm+oELrhhWUXHZaIJgKm FX7qhOrxuOP7qhS04I1Eg5C3ik9129+3csaZEStAsozMfALNGo9fHWHrb+kGi/aYhyH7 cWHMn43RE9UFGNt80L9b/WwAe00geGRUDqmu6NTA5JzUgeT3dTdnlfwy0QCTWmFnxZPk 4hOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=x+RB2ITbfqKP6mO7lXP9MlFfW3RztOHoR8uJSPHnXIA=; fh=OtJVFpZ5Y8/ND7g8QcUIbRSFhG4LznwcYYtG4zWKevM=; b=CpnJu5n/IqAcEVPrMNr0WfqgI6vBlagdmyLoEy+U83Ql3CTI51Zy2A7WEwfiENurkB a4XvBwpgBEao8Uw48aT5yJLzi8b1WENsklwSvHGyY63WwKmo3dLmn7fX0q39HPRpMn+8 F+ZaIhA5Rm3bDeZpKtcdydhMbMr+9h8ilJ48EzXgbIL3MaH8bPU5ZqzoXq8hHLFx0Aq8 zcMw2YXi4kDpUBiQ7M73tIkuiyzjpG5RJ/ErG8mF7pVSVUe3zz1dmz2kmYNGzEqWvC/6 3amZ19adRgDZFLa2448ziFq9uP8kSDTeH/cv3ghWrK1tTor0YDVCwcwiIv3EBgE4Qlcq QAsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SaCCxCFl; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kn8-20020a170903078800b001b9c1821f6bsi9606022plb.98.2023.08.09.08.34.43; Wed, 09 Aug 2023 08:34:56 -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=@bootlin.com header.s=gm1 header.b=SaCCxCFl; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232895AbjHIN2N (ORCPT + 99 others); Wed, 9 Aug 2023 09:28:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232900AbjHIN2K (ORCPT ); Wed, 9 Aug 2023 09:28:10 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43B641982; Wed, 9 Aug 2023 06:28:08 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id CCD3A40008; Wed, 9 Aug 2023 13:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1691587686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x+RB2ITbfqKP6mO7lXP9MlFfW3RztOHoR8uJSPHnXIA=; b=SaCCxCFlTH+qRZx+2aeh4OUfwsn6XERHVt+hzEeZ7mvP9Fpn6LFUgUCUd/S5RQNTfByrOo biSf5lDM7ovF7vj1vpViBnNG/NZl6hQ4MaQDu9Sd9CVw5ZzPJM1kJzx0zVBvTjRbgDjzxv DhnN94+RvCAyqN2oyjKL3BVfW/XsDsC/lTzPSHqycWXQTRb2tNgnrH/Ht9f1dOBKhL+KSF KWhmDt71yIpS4Un6VDL1R7K9T6fr7GJN/rmHMNZmJaLIYey3Q+FLhac05/A32AICpa0EOg +DPXH13BSG6ouNjS1y1oSXvfm/RcywP92RYB1K9yfqL4FQ+IwD+tdjnk0bS+5w== From: Herve Codina To: Herve Codina , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Linus Walleij , Qiang Zhao , Li Yang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Christophe Leroy , Randy Dunlap Cc: netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, Thomas Petazzoni Subject: [PATCH v3 01/28] soc: fsl: cpm1: tsa: Fix __iomem addresses declaration Date: Wed, 9 Aug 2023 15:27:28 +0200 Message-ID: <20230809132757.2470544-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230809132757.2470544-1-herve.codina@bootlin.com> References: <20230809132757.2470544-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: herve.codina@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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: INBOX X-GMAIL-THRID: 1773766229440660509 X-GMAIL-MSGID: 1773766229440660509 Running sparse (make C=1) on tsa.c raises a lot of warning such as: --- 8< --- warning: incorrect type in assignment (different address spaces) expected void *[noderef] si_regs got void [noderef] __iomem * --- 8< --- Indeed, some variable were declared 'type *__iomem var' instead of 'type __iomem *var'. Use the correct declaration to remove these warnings. Fixes: 1d4ba0b81c1c ("soc: fsl: cpm1: Add support for TSA") Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/tsa.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/soc/fsl/qe/tsa.c b/drivers/soc/fsl/qe/tsa.c index 3646153117b3..e0527b9efd05 100644 --- a/drivers/soc/fsl/qe/tsa.c +++ b/drivers/soc/fsl/qe/tsa.c @@ -98,9 +98,9 @@ #define TSA_SIRP 0x10 struct tsa_entries_area { - void *__iomem entries_start; - void *__iomem entries_next; - void *__iomem last_entry; + void __iomem *entries_start; + void __iomem *entries_next; + void __iomem *last_entry; }; struct tsa_tdm { @@ -117,8 +117,8 @@ struct tsa_tdm { struct tsa { struct device *dev; - void *__iomem si_regs; - void *__iomem si_ram; + void __iomem *si_regs; + void __iomem *si_ram; resource_size_t si_ram_sz; spinlock_t lock; int tdms; /* TSA_TDMx ORed */ @@ -135,27 +135,27 @@ static inline struct tsa *tsa_serial_get_tsa(struct tsa_serial *tsa_serial) return container_of(tsa_serial, struct tsa, serials[tsa_serial->id]); } -static inline void tsa_write32(void *__iomem addr, u32 val) +static inline void tsa_write32(void __iomem *addr, u32 val) { iowrite32be(val, addr); } -static inline void tsa_write8(void *__iomem addr, u32 val) +static inline void tsa_write8(void __iomem *addr, u32 val) { iowrite8(val, addr); } -static inline u32 tsa_read32(void *__iomem addr) +static inline u32 tsa_read32(void __iomem *addr) { return ioread32be(addr); } -static inline void tsa_clrbits32(void *__iomem addr, u32 clr) +static inline void tsa_clrbits32(void __iomem *addr, u32 clr) { tsa_write32(addr, tsa_read32(addr) & ~clr); } -static inline void tsa_clrsetbits32(void *__iomem addr, u32 clr, u32 set) +static inline void tsa_clrsetbits32(void __iomem *addr, u32 clr, u32 set) { tsa_write32(addr, (tsa_read32(addr) & ~clr) | set); } @@ -313,7 +313,7 @@ static u32 tsa_serial_id2csel(struct tsa *tsa, u32 serial_id) static int tsa_add_entry(struct tsa *tsa, struct tsa_entries_area *area, u32 count, u32 serial_id) { - void *__iomem addr; + void __iomem *addr; u32 left; u32 val; u32 cnt;