From patchwork Wed Jul 26 15:01:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 126479 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp501731vqo; Wed, 26 Jul 2023 09:04:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlE5+SernbW+Z02J6O7UYaPTr+xW6j4lRRBjajEVZ8akt+6aGDU8WzH0mxDErNo4r/3NGhrg X-Received: by 2002:a17:902:e5ce:b0:1b8:50a9:6869 with SMTP id u14-20020a170902e5ce00b001b850a96869mr2538796plf.66.1690387480813; Wed, 26 Jul 2023 09:04:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690387480; cv=none; d=google.com; s=arc-20160816; b=JsE1O32PpyKCaIjS7CeTFZ9lVqiNJTu0wMi8j9ijngLYK4BS9uxFHnbiL47YzDMVCP D1cMdo8r8VYCmohamI4dD3EoD2lRdY9BN1mGw8WZBGvx8Cgfuixk4HHRMLwAKwDn3h+l eq/p39BC4A+L8/R4tLyBemfRV6JSqykUYOLxYWwbTHS6NfMTWGUeAKiQuo603pbWqsST cOY2dfsJYWza7aHLrU9CaCtmNInMEiZBizGg9tIA5cqHCP3vp87jU9iPh/hI9bIzgrdE QwtGJZ8GplQVN1RsGJDAl0VSmRTG+iYvy6q1UJ0aMG/WZzRsUtXsT4z+GloJDIX52AfS cisA== 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=k4qO/TUy6wABgNBN7yhJE2ec8VUbOk7nVYMc728vVBo=; fh=OtJVFpZ5Y8/ND7g8QcUIbRSFhG4LznwcYYtG4zWKevM=; b=VO0wXs/Ik5C8YkgqJnRrnWRPSHW8PGZMKAdDgV1S6VDzLk3DNeQ3tyhMrkh7zZB5B8 Bvd761pSW+NVK6cnJErB6cBylryzuob4YtQtmVmzZbVtCHu5wpIiCAABiphmbsXpxk2K Bc+LF1hzQM0D60yukLfYlSIe84l6meMLD6TS5PQUog0/R5mIcm6HzdrErVLc8mSZb9uS rGimQGQb8er+seSg9hdR/gamfdlhlB8VpdjtyqcqwiAnYyVQ8v/9u1ZA4DJaYV3LmsxO uOfJTWG+pswoD8s5qrGVNaGIv3Gl4wL7VXp6gn1CcSSwIqO6hIZ8KV+QSrftuaAuBINF NNRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=pkYFzkVf; 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 kx14-20020a170902f94e00b001ae4a01a7e0si12707201plb.236.2023.07.26.09.04.17; Wed, 26 Jul 2023 09:04:40 -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=pkYFzkVf; 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 S234603AbjGZPCu (ORCPT + 99 others); Wed, 26 Jul 2023 11:02:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234594AbjGZPCr (ORCPT ); Wed, 26 Jul 2023 11:02:47 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46C3D11B; Wed, 26 Jul 2023 08:02:41 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id A34451C0009; Wed, 26 Jul 2023 15:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1690383759; 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=k4qO/TUy6wABgNBN7yhJE2ec8VUbOk7nVYMc728vVBo=; b=pkYFzkVfI35hZJMTGZehUa3KTjMCLZbrLYwozoT0cvVEiKmdCLNs3v7KZgd+syp0mc8a2I Pcp0TkvqZZprKXJnXxwsrrhgPj84igZm+6/yO5rklD0BT4C9ecBcz9Pv9cb1EPHN0+ZTbN dnwfnQdwD3Ag+Wb9ZtTO7yskBJWOPNr+swxMRLTwdBXdItH2VceB5+IkvILSNNwxh27+di ePYOqMHKGhUUaR8zuEEoksiMGDlkdI10nPDURxs80wW9bdlEv6Xwm2gutBmNPfWWtK+hAR 8T3qhttq6kfqeV1COiaSKyqay/X57fYEp3mgxrvCvDDfybPwC4q2jt5qycAhMQ== 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 v2 01/28] soc: fsl: cpm1: tsa: Fix __iomem addresses declaration Date: Wed, 26 Jul 2023 17:01:57 +0200 Message-ID: <20230726150225.483464-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230726150225.483464-1-herve.codina@bootlin.com> References: <20230726150225.483464-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: herve.codina@bootlin.com X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,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: 1772499743048418204 X-GMAIL-MSGID: 1772499743048418204 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;