Re: [PATCH v3 08/14] ASoC: SOF: Add DSP HW abstraction operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 11, 2018 at 03:23:12PM -0600, Pierre-Louis Bossart wrote:

> +int snd_sof_pci_update_bits_unlocked(struct snd_sof_dev *sdev, u32 offset,
> +				     u32 mask, u32 value)
> +{
> +	bool change;
> +	unsigned int old, new;
> +	u32 ret = ~0; /* explicit init to remove uninitialized use warnings */

This looks a lot like you want to write regmap_pci_config...

> +/* control */
> +static inline int snd_sof_dsp_run(struct snd_sof_dev *sdev)
> +{
> +	if (sdev->ops->run)
> +		return sdev->ops->run(sdev);
> +
> +	return 0;
> +}

Do we really want to return 0 for all these ops if they're not
implemented?  For some that seems sensible but there's others where it
seems like the caller might want to know they got ignored and an error
code like -ENOTSUPP might be better.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux