[alsa-devel] [PATCH] ASoC: SOF: Intel: add PCI ID for CometLake-S

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Wed Dec 18 20:01:55 CET 2019



>>>>> Then the issue I pointed above can be solved as well.
>>>>
>>>> The ifdefs are still needed in the PCI IDs tables
>>>
>>> Yes, but it halves the messes :)
>>
>> I wish it was true :-)
>>
>> In reality having buildbots play with kconfig options does help
>> identify issues at the code level, just like the namespace use helped
>> identify the .arch_ops just above did not belong here.
>> I find it's a constant battle to avoid accumulated crud in the wrong
>> places when dealing with multiple platforms, and when looking at
>> patches it's very hard (at least for me) to realize where the code
>> gets added and the implications.
> 
> But how it can be worse than ifdef...?  From the resultant code POV,
> it's same, the redundant objects are dropped automatically, while you
> can avoid a pitfall like this case to forget the counter-part ifdef,
> which could be identified at first by some randconfig tests.

In a perfect world it'd be fine.
But the reviews are not perfect and it happens that we let things go 
through.
With the _maybe_unused proposal, I would not know which objects are not 
necessary for a specific config, they would be silently removed by a 
tool. Issues reported by randconfig or 'unused variable' warnings are 
painful but at least they do provide a clear hint that something's not 
right (including in my own code).


More information about the Alsa-devel mailing list