Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1284783pxf; Fri, 12 Mar 2021 06:28:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1KjtoPAUcfKKW6HDQ87BJk55N7rfMq5JRaqcodt4JtZV+GLPSLShH/4iwe+9DoFuPnXuc X-Received: by 2002:a17:906:39a:: with SMTP id b26mr8961557eja.158.1615559287819; Fri, 12 Mar 2021 06:28:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615559287; cv=none; d=google.com; s=arc-20160816; b=Lzy/keEodzrbHpO6fxL3U3dQluBxGBzSZ8MsTxmR1Qhnbsjggg0rCzsbWYLwNsuqxg xsVflpxa1owV2DQwAOyoptBQx7Senlm2MAxVhdxP4/TJ7E1lTi7v7GGQr1DOkuDKAvRo GPrwGJj2DuO1fdsOVHshAuhSgi8C5wc6iuDF5SK5iY9sVOUDaiGYa0TeMuhwviWXjnsH A6skZf3gI7CcP6EhWNIX11OywK0TWzYYn+TJn27WUFbsWBouVBropgCWt/NBHlQ6VHBu IpX3zV4joEyTmS7DIS0T2lb/Mt5ZeVleN3PpIwsOrPjMB/zImzVkOaU2xS2ilL96TNyY 3OyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=tCAMHFcOZB7XJyXUoL0TRJYRu1+XepciAJsHGjM+DhY=; b=rlhcZY0sK6kEcCGWsdOOSRmMnXHNgYpggPvKNnW/eyPJGOtvhak+30PHByJP2OPbEU eOB/9PdDuNdo+CzcbIVHjqcI0c19leYQUBCb+x1H/PDMi/w2ncGcAm7O6szQurpbpR+d lZn8qAegSmQw1c3gl5Iq2UhtLq/RJ4PjuxR4f8YMOa9AFGKAj/B+yEIwQrqRdvzlPG26 SXjzI8NvsIyNJ5WLC4vZ/6I0wJ4JOErUDHhtXMolRIluPdY7Pyis/HT9NBYgZ0H9TqP0 rTGaHIZ2tSNbbPN+hw6IaFjthfhGvpbnsJsIO/DcgqvevBm6Ou1qB9gV13m/yUE6dVur 4RBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="tO/PBxqf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si4073422ede.364.2021.03.12.06.27.44; Fri, 12 Mar 2021 06:28:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="tO/PBxqf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231664AbhCLOYV (ORCPT + 99 others); Fri, 12 Mar 2021 09:24:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:59864 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231778AbhCLOYO (ORCPT ); Fri, 12 Mar 2021 09:24:14 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3042964FAD; Fri, 12 Mar 2021 14:24:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615559053; bh=4fcxO7Smoa0cv+E1nslqtIlJSCuMHvSdEw8b0mNB4U0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tO/PBxqflYey1RZMejEfbXJSNJjstUTyAxuftBDTRRX3JQXMVyk2pIehKsK0zfqKY OaeLkntuazPfukF2+hQbv2uA6vPj5imVNwLt6XsQIsTkOP1nGN6cTqAmyIivvBjzHo JCm0IJIJAdVTV1FypyOyTGOZKI+yOr0mvw2VWO/IO8GzV/WIud7Lcr4/6iWmpIz5vY Zak5js87cfi/bL3jZRII1dDN7FPBqardF1tuwn1c/ONj7mpZkwam4M7FVvLN+YigdP HdJ276wpNszh0vxzKhA1yey7kPI8yzjB6CKdV/O5wftcq/pOpPAKIGoMsPFZt/q87R u34VCvu33P3hQ== Date: Fri, 12 Mar 2021 14:23:00 +0000 From: Mark Brown To: Daniel Baluta Cc: Daniel Baluta , Linux-ALSA , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Linux Kernel Mailing List , dl-linux-imx , Ranjani Sridharan , Pierre-Louis Bossart , "S.j. Wang" , Daniel Baluta Subject: Re: [PATCH] ASoC: core: Don't set platform name when of_node is set Message-ID: <20210312142300.GG5348@sirena.org.uk> References: <20210309082328.38388-1-daniel.baluta@oss.nxp.com> <20210309153455.GB4878@sirena.org.uk> <20210312104931.GA5348@sirena.org.uk> <20210312115748.GC5348@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JkW1gnuWHDypiMFO" Content-Disposition: inline In-Reply-To: X-Cookie: Lake Erie died for your sins. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --JkW1gnuWHDypiMFO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 12, 2021 at 02:37:30PM +0200, Daniel Baluta wrote: > On Fri, Mar 12, 2021 at 1:59 PM Mark Brown wrote: > > No, just the opposite! If there's an explict name configured why do you > > want to ignore it? > Because the initial assignment: > dai_link->platforms->name =3D component->name; > doesn't take into consideration that dai_link->platform->of_node is > also explicitly configured. But why should we take that into consideration here? > dai->link->platforms->of_node > configured and we hit this error: >=20 > soc_dai_link_sanity_check: > /* > * Platform may be specified by either name or OF node, but it > * can be left unspecified, then no components will be inserted > * in the rtdcom list > */ > if (!!platform->name =3D=3D !!platform->of_node) { > dev_err(card->dev, > "ASoC: Neither/both platform name/of_node are set for %s\n", link->na= me); > return -EINVAL; > } OK, but then does this check actually make sense? The code has been that way since the initial DT introduction since we disallow matching by both name and OF node in order to avoid confusion when building the card so I think it does but it's only with this mail that I get the information to figure out that this is something we actually check for then go find the reason why we check. --JkW1gnuWHDypiMFO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmBLeUMACgkQJNaLcl1U h9CxEwf9GYlTDgLnBKPQQLdh53qJmZp0mq31jrvlr0BU1jZT1bUP/jkJAufFi4fz 2YIwTI8K79Pj/AoMoQXJ1L2XOedZ7/AspZFanBhgUovzs+f36XfW00fum5QmG+A0 W7wLEhoJuoUxGOOJ0Z4EYRT07LFfvN23lYoNxKBb0gqO4FxnJEAe1E5+O9n39zTO yCdwDl0H5JhLp8U8SuutChBnt87l474a04Tx5GdCRZ3yAvwuvvNLZ74/68We+82F NlPAf+g2d4ojF1UqCYtgR59jPLpTmJmDtMfcgBqtskFMeCtqrM7B3Jqz8O1b8Ix9 /Pvscq3dBWICZSt7Qj9Ilh1IScjMdg== =CF3l -----END PGP SIGNATURE----- --JkW1gnuWHDypiMFO--