9 Jan
2019
9 Jan
'19
9:51 p.m.
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.