lkml.org 
[lkml]   [2023]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 07/11] ASoC: SOF: core: Skip firmware test for undefined fw_name
From
On 12/14/23 13:35, Péter Ujfalusi wrote:
>
>
> On 14/12/2023 13:29, Cristian Ciocaltea wrote:
>>> diff --git a/sound/soc/sof/fw-file-profile.c b/sound/soc/sof/fw-file-profile.c
>>> index 138a1ca2c4a8..7b91c9551ada 100644
>>> --- a/sound/soc/sof/fw-file-profile.c
>>> +++ b/sound/soc/sof/fw-file-profile.c
>>> @@ -89,6 +89,15 @@ static int sof_test_topology_file(struct device *dev,
>>> return ret;
>>> }
>>>
>>> +static bool sof_platform_uses_generic_loader(struct snd_sof_dev *sdev)
>>> +{
>>> + if (sdev->pdata->desc->ops->load_firmware == snd_sof_load_firmware_raw ||
>>> + sdev->pdata->desc->ops->load_firmware == snd_sof_load_firmware_memcpy)
>>> + return true;
>>> +
>>> + return false;
>>> +}
>>
>> I would drop the conditional and simply return.
>
> What do you mean? We need to check if the platform is using either type
> of the generic load_firmware helper (the _memcpy is calling the _raw to
> load the file).

I mean to simply replace the if statement with:

static bool sof_platform_uses_generic_loader(struct snd_sof_dev *sdev)
{
return (sdev->pdata->desc->ops->load_firmware == snd_sof_load_firmware_raw ||
sdev->pdata->desc->ops->load_firmware == snd_sof_load_firmware_memcpy);
}

\
 
 \ /
  Last update: 2023-12-14 12:42    [W:0.155 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site