lkml.org 
[lkml]   [2022]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/4] soundwire: Provide build stubs for common functions
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@linux.intel.com>
> > Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
> > ---
> > +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

\
 
 \ /
  Last update: 2022-11-24 10:23    [W:0.302 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site