Re: [PATCH v3 2/4] soundwire: Provide build stubs for common functions

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

 



On Thu, Nov 24, 2022 at 10:21:32AM +0530, Vinod Koul wrote:
> On 21-11-22, 14:14, Charles Keepax wrote:
> > Provide stub functions when CONFIG_SOUNDWIRE is not set for functions
> > that are quite likely to be used from common code on devices supporting
> > multiple control buses.
> > 
> > Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
> > Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
> > ---
> > +static inline int sdw_stream_add_slave(struct sdw_slave *slave,
> > +				       struct sdw_stream_config *stream_config,
> > +				       struct sdw_port_config *port_config,
> > +				       unsigned int num_ports,
> > +				       struct sdw_stream_runtime *stream)
> > +{
> > +	return 0;
> 
> Should this and other here not return error...? Indicating sdw is not
> available..? Silently ignoring may not be very helpful in debugging
> 

Yeah I was a little unsure which way to go on that, in the end I
opted for returning zero as it was more likely code would get
optimised out. But I am happy to switch to returning an error, it
would as you say making debugging misconfigurations easier.
-ENOSYS seems kinda reasonable I think.

Thanks,
Charles



[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