From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA62ECAC587 for ; Sun, 14 Sep 2025 20:33:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:References:In-Reply-To: Message-Id:Cc:To:From:Date:MIME-Version:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Rg3lBi6mpLDQcLdvlwECzPG6dHwZ9G3gk9QDIePm7YU=; b=3IOERHzm8mTS0Pei6Tb67HJlb9 IG6UdRwaPYQs9Mabenzta/gT2RIrqw/U33+ct/8kMR4FQt2VB95yYlXPagrnZIBAlhky2PAEGvIlC u8H39xdt02jjDFkjHEhNgsddeDj28YRicLEW5VXpNcBZXW8yhxi/y+fCA9uGSWZShLf8z/GRWpI/E t8n+7vwiwa/AuSRcVJCAhO+fmQpfKNUEB3wCAIWqN//hsDE4hNWuy6mIclgl1cfVt+ASACZxjZRhh 51nQkbeb2bZ3KaOWwqAUMO9vevRXqC9MqfT+LMqTCmFHUo2+iYb1JIhGlEI1sw1RArEMcnETWtqeU aHPEAwuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uxtPa-000000029k6-2CbR; Sun, 14 Sep 2025 20:33:26 +0000 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1ukL84-00000002eUv-1gUs for linux-i3c@lists.infradead.org; Fri, 08 Aug 2025 11:19:22 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 4509214000B9; Fri, 8 Aug 2025 07:19:17 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-05.internal (MEProxy); Fri, 08 Aug 2025 07:19:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1754651957; x=1754738357; bh=kXnaAaU+jsKKyacddE7SAVJoi6NjE3zSqJlFeFvTb4k=; b= LNYvvmMBTbBeWybL2Kw3FSzKsPy4pv7dV+0OPrALMLQ5L6iMSA3+lRgwslnixhax g5eKgbkpqRrXO+Zj14F7Mlp8Q/oHT1a74HIQO6LUuowcyoNKYb6KjCj3r/NDO7qT e7lZKYFPFzVoengOrfm2pba3TmMQtu62iJTN/e3i+iA5L5fwK+SafzQPKrV1OacK z0w8NSN7F2x1V1GtVc/nKvslXjbFneYrItx9oH39GrBoE3hfB5fOZb9z4uE30q/4 zyFgzoEzkA4pyBRONSkSocWarJeAcd7xAL1WunzeiJuMYGALSq4TpFPtIWBshVED Mv0kXNuSusgbGPxPJGdRoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1754651957; x= 1754738357; bh=kXnaAaU+jsKKyacddE7SAVJoi6NjE3zSqJlFeFvTb4k=; b=A fRLLUePzBr/jPMssVbEwp0dBTQYQ1tculYdxIbN6YKZ36tPwK09We8z+SB9zrKLU wTRJHVKNG3iH9ZNR0fm2Dk7h+qrd+0eYpPffK6JczCxpXDGu9q2g2xkqG1TrW0/n kw5/P5E5QCp5RpNRuoRsFBB/n/fSa0xpTO+cphBiwMow3oZ35vZ48mszXkiFsC4b 2Zxnml0aVz8oA58gcrEbfShtV67vntn7bFkpl6Jv12k7COGJI0nDtjj32TMGWaMF GWVOlSjN4zdCR8jT+pedsZfNL+jv85LCv3b+uvNkVaUtqJsePruRpedtuEESIuX/ KJEZG3c8u458aY0Lp6wOA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduvdefieejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrnhgu uceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrthhtvg hrnhephfdthfdvtdefhedukeetgefggffhjeeggeetfefggfevudegudevledvkefhvdei necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghrnh gusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohepuddtpdhmohguvgepshhmthhpohhu thdprhgtphhtthhopehjohhrghgvrdhmrghrqhhuvghssegrnhgrlhhoghdrtghomhdprh gtphhtthhopegrlhgvgigrnhgurhgvrdgsvghllhhonhhisegsohhothhlihhnrdgtohhm pdhrtghpthhtoheplhhkphesihhnthgvlhdrtghomhdprhgtphhtthhopehgvggvrhhtse hlihhnuhigqdhmieekkhdrohhrghdprhgtphhtthhopehlihhnuhigqdhifegtsehlihhs thhsrdhinhhfrhgruggvrggurdhorhhgpdhrtghpthhtohepfhhrrghnkhdrlhhisehngi hprdgtohhmpdhrtghpthhtohepfihsrgdorhgvnhgvshgrshesshgrnhhgqdgvnhhgihhn vggvrhhinhhgrdgtohhmpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrh drkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrhgvnhgvshgrshdqshho tgesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 6D27E700065; Fri, 8 Aug 2025 07:19:16 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 X-ThreadId: T0d336f21a661302d Date: Fri, 08 Aug 2025 13:18:46 +0200 From: "Arnd Bergmann" To: "Geert Uytterhoeven" , "Alexandre Belloni" Cc: "Wolfram Sang" , Linux-Renesas , linux-kernel@vger.kernel.org, "kernel test robot" , "Frank Li" , "Jorge Marques" , "linux-i3c@lists.infradead.org" , sparclinux Message-Id: In-Reply-To: References: <20250807043456.1624-2-wsa+renesas@sang-engineering.com> <2025080720214218750df5@mail.local> Subject: Re: [PATCH] i3c: remove 'const' from FIFO helpers X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250808_041921_024685_3C1698D2 X-CRM114-Status: GOOD ( 17.51 ) X-Mailman-Approved-At: Sun, 14 Sep 2025 13:33:23 -0700 X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org On Fri, Aug 8, 2025, at 11:43, Geert Uytterhoeven wrote: > On Fri, 8 Aug 2025 at 01:09, Alexandre Belloni wrote: >> On 07/08/2025 06:31:24+0200, Wolfram Sang wrote: >> > >> > I still wonder why SPARC discards the const but since nobody seems to be >> > commenting on that, I guess the fastest way to get the build error out >> > of Linus' tree is to adapt the usage in I3C. >> >> My plan was to let sparc people handle their mess, there is no reason >> const should be discarded. > > Fully agreed. > > Note that it is not just the const keyword that is missing from the > SPARC implementation, but also the volatile keyword. The last time this came up, I actually tried doing a patch to remove the 'volatile' keywords from all asm/io.h on all architectures, and from all drivers that currently pass it, as I don't think it has any effect other than avoid build warnings for some prehistoric drivers. On a related note, I'm fairly sure the i3c_readl_fifo() function is not portable and breaks on most big-endian platforms: The readsl() implementation on big-endian targets usually skips the implied byteswap from readl() since it is writing a bytestream, but then the final readl() is defined as reading a four-byte little-endian word, which tends to require an explicit swap on big-endian targets. (there are some exceptions where the PCI host bridge adds an extra byteswap, or where the CPU swaps everything on 32-bit boundaries, rather than the unit of the access). I think using readsl(addr, &tmp, 1); instead of the final readl() should be portable here. Same for the writel() of course. Arnd -- linux-i3c mailing list linux-i3c@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-i3c