Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2088937lqa; Tue, 30 Apr 2024 07:57:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWyj9IXmFP1iX22ji+f53yneRfGwuUIJdeecL+HEIj25ax7Wezub35Baz3oLPVnGijV3I0rynOR/38+CeNnWhX5n2eNfIyk2M/GtO6JDw== X-Google-Smtp-Source: AGHT+IF+jgMiUAA8K2b/u0l8TXuOVruekQYP/AyidZv91T+Kt0HPQQVOlsm9YKRqQk10haMjtHf5 X-Received: by 2002:a17:906:7cc:b0:a53:ed1b:f3ba with SMTP id m12-20020a17090607cc00b00a53ed1bf3bamr11666603ejc.28.1714489024520; Tue, 30 Apr 2024 07:57:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714489024; cv=pass; d=google.com; s=arc-20160816; b=tWSnjcoYNjJd4ybA2XIuplA0e71ugU7l091WM6SDw8H81VsexuUnFCq0MJ4JryucdK M2+rmbyF3k9OTi+asXEXBFsFizm8BL8H523hkgLAhnzdlFkGNfC5oGEnwYg7845QFil8 OoUdBkxk5h/HhXmF1zzFEyacsc9RfUg0bEx8VlVf5tAEGrKkWDXTUd/DmtBHs950NiLr befq6AUZlTd5pLxkJ2A0BCmRCCyX0W2QLAxraAqQwryBgggVQvUNWgpM7tdbq4O3YN4Z UTTA3IOosx8lrBZKgttf2RUfRI5SUp/beNRJahq7rVL/Ms21X3u+X518i+P3ggk0smyT uqUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=behfvdX5O1C9NBFzi3qyaidfrxMcIWxMEykEbVnyUew=; fh=BukwbKPZ9hTwLo3VvRaLMkaEKf2O9sqBcvFQb/md00Y=; b=LEFqgfm0L7jaGdTAi9JqRLDs1jkAcaOHwS/DoCbMHoc70Ki5o408FdvTiC1K+DW7HS s0hPLSCsoBCST0X8np/XnpMLXJGulNnMvyGpCKYEzA33RanhRxsuXoe6t34zjiA1iNDi R37CANaDQlhyfHsytFvf9s76utCC4nCsoo+ToTZD7pEjl1g6jzKjbWZieOnNIhO7Iumi Q7px7p66VZZ/e1sNl01bqL51VQqSOeriL3ius/PuTCq10psnHctqya1/QdqzqIDtMt+y 5VeY1M6bpXbLNs7zjl00yC0UesYNiGbX7nIpIlo0k0WfUs0i81lNQXfRonAQpUwpukuI TLog==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g0SMqvqg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-164207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164207-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b15-20020a170906708f00b00a51e004de3dsi15648719ejk.568.2024.04.30.07.57.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:57:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g0SMqvqg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-164207-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164207-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 47A321F229E1 for ; Tue, 30 Apr 2024 14:56:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E2487710F; Tue, 30 Apr 2024 14:56:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="g0SMqvqg" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 33678152798; Tue, 30 Apr 2024 14:56:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714489009; cv=none; b=eMGG93a+TZtvDK6NrNKgL//mBrkNFew+sALcZHxhXY4nAaW1EBsoF3zRHjb0e+WV4Wxtj3i0T0UloReR/kgnxfTvcuSY+Sdq/9xYkNYQk7jAkQLGfYW/Cz9+IRLrm+Ur73iZyouGPpEi13KYe3LM0dWA35vssAl5S2+uKfoucpE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714489009; c=relaxed/simple; bh=TjXlwvXIGxgY7FadCv6wm6DhT0gofgknxCj4A+6vdXQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Vl83rVpK9c/KKakHLOJYydOYv7GmJyTvRZ0DiPkqQy8uDRDAxcP04snD4758K2I6PNcktFFODI/c+mZy5J6s3YxiIkwQ7FFIGYWqGGu6LHXV7VvS7crGKsOIk9MA4hTw6s2J0PJ2pSlGAPcV6ELT7bAP7hNPaRg02OtNFPzTzLE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=g0SMqvqg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3761C4AF1B; Tue, 30 Apr 2024 14:56:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714489009; bh=TjXlwvXIGxgY7FadCv6wm6DhT0gofgknxCj4A+6vdXQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g0SMqvqgU1WU5wiygjLar9m1vuDPUR9BYpi0KNcaC0nloEmd6qc+jM+Jp9uCZIIey djKjd5rpFCmi+ocyvIueE33j3i7+NL0AKdoPZaBPh3HpO4IJ5yYXPcNk4ImglHbljh LPwFP2qY9fOuK3ZOAv/polEQANeDAlE03Hqatt9XSEKPH4W9PaUxyXng8pyQcAXp5v orKHqV89qe0IkrwoRobewPGwhA50Ehfrcl7Y1VHNtJNJP8fA2O0EEauN8m+HEBbTXW ximwoePlNsfEnA6T3SYw13VsltN7blQ88UeTRAgUycJGEc5R3sis61XkJmnwTcpxkg XSSVgZ1up0zqQ== Date: Tue, 30 Apr 2024 23:56:46 +0900 From: Mark Brown To: Krzysztof Kozlowski Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ASoC: use inline function for type safety in snd_soc_substream_to_rtd() Message-ID: References: <20240430140938.328088-1-krzysztof.kozlowski@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8pV+PWcSobNbNF3R" Content-Disposition: inline In-Reply-To: <20240430140938.328088-1-krzysztof.kozlowski@linaro.org> X-Cookie: lisp, v.: --8pV+PWcSobNbNF3R Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 30, 2024 at 04:09:38PM +0200, Krzysztof Kozlowski wrote: > -#define snd_soc_substream_to_rtd(substream) \ > - (struct snd_soc_pcm_runtime *)snd_pcm_substream_chip(substream) > + > +static inline struct snd_soc_pcm_runtime * > +snd_soc_substream_to_rtd(const struct snd_pcm_substream *substream) > +{ > + return substream->private_data; > +} This is not an obvious direct substitution, we've skipped the snd_pcm_subsystem_chip() (which is also a macro, but that just suggests it could do with it's own cleanup) and the commit log didn't mention it. --8pV+PWcSobNbNF3R Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmYxBq4ACgkQJNaLcl1U h9Ca7gf/T8ZFoUJmdU+447+36hbeeKvmRjKe/W64VoRyOxKcdgIc4vr9a3P+jkFO XDOo4DRaC4ODF3piEsAJpT1SiNUxBIOzTD3+t7uv4O0QRQ90SxTPVQLb4dxIRqiP 3QCsgePEYGspRHxlUJkMwPuq/i6bdjX6KiT2jX9MVmLAEfYLzfrc4cjlZtrtmjPS Nzikju+66l21nQXBFToT4npXQxS9balCz9ruOM+iwSwcKC2trEyYJVnjK1tS6Uhd 6j8JdCPmItOu4ERgVSmBQCuKzjKtJyj1ie7k8alpPzBjbXM5my6/W9uWr81GOhaz Vq6V0tNBMk2Nose52DHSpiVUIjAPqg== =pItM -----END PGP SIGNATURE----- --8pV+PWcSobNbNF3R--