From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre-Louis Bossart Subject: Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component Date: Thu, 24 Jan 2019 13:07:17 -0600 Message-ID: <976ec85a-7b21-6c58-90cc-a3d104f9505a@linux.intel.com> References: <20190115000610.GM11073@sirena.org.uk> <796a856c-a9a6-022d-da63-947279090198@linux.intel.com> <20190115211137.rhdyjadu7fppp3p4@lenny.lan> <044d59ba-094e-727d-14a9-6ebfc54cbbf4@linux.intel.com> <44029078-2749-5a3b-7b03-f38461bf268f@linux.intel.com> <20190124184412.GH5641@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190124184412.GH5641@sirena.org.uk> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Mark Brown Cc: rohkumar@qti.qualcomm.com, alsa-devel@alsa-project.org, bgoswami@codeaurora.org, vinod.koul@linaro.org, lgirdwood@gmail.com, Curtis Malainey , plai@codeaurora.org, linux-kernel@vger.kernel.org, Ajit Pandey , tiwai@suse.com, Liam Girdwood , Matthias Reichl , Rohit kumar , asishb@codeaurora.org, srinivas.kandagatla@linaro.org, Curtis Malainey , Dylan Reid List-Id: alsa-devel@alsa-project.org >> changes are legitimate. To move forward, maybe it's not worth spending too >> much time on a grand unification of string theory, there are simpler >> solutions: the Intel machine drivers already do get the platform driver name >> as an platform_data argument, so we could modify the dailinks platform names >> before even registering the card. I tested with the attached > Yes, that would be much better - it's vastly more idiomatic. The > general idea is that a machine driver should know what it's expecting to > find before it starts probing. Thanks for the feedback, will send a formal patch with the helper and machine driver changes after I test more with the legacy drivers. Do you have a preference for one patch that deals with multiple machines drivers in one shot, or individual patches? The latter are nicer for backports (e.g. for Chrome), the former nicer for maintainers... The goal of reusing machine drivers as is isn't really achievable anyways, it looks like we are going to have additional changes, e.g. if we want to avoid the calls to snd_pcm_suspend as suggested by Takashi, we'll have to add a reference to snd_soc_pm_ops that's only used for SOF, the Atom/SST driver does things in different ways mostly due to historical reasons. -Pierre