Re: [PATCH 1/2] soundwire: add macro to selectively change error levels

2021-04-01 Thread Pierre-Louis Bossart
On 4/1/21 3:56 PM, Greg KH wrote: On Thu, Apr 01, 2021 at 01:43:53PM -0500, Pierre-Louis Bossart wrote: My bigger issue with this is that this macro is crazy. Why do you need debugging here at all for this type of thing? That's what ftrace is for, do not sprinkle code with "we got this

Re: [PATCH 1/2] soundwire: add macro to selectively change error levels

2021-04-01 Thread Greg KH
On Thu, Apr 01, 2021 at 01:43:53PM -0500, Pierre-Louis Bossart wrote: > > > > > My bigger issue with this is that this macro is crazy. Why do you need > > > > debugging here at all for this type of thing? That's what ftrace is > > > > for, do not sprinkle code with "we got this return value

Re: [PATCH 1/2] soundwire: add macro to selectively change error levels

2021-04-01 Thread Pierre-Louis Bossart
My bigger issue with this is that this macro is crazy. Why do you need debugging here at all for this type of thing? That's what ftrace is for, do not sprinkle code with "we got this return value from here!" all over the place like what this does. We are not sprinkling the code all over

Re: [PATCH 1/2] soundwire: add macro to selectively change error levels

2021-04-01 Thread Pierre-Louis Bossart
On 4/1/21 2:24 AM, Vinod Koul wrote: On 31-03-21, 09:13, Bard Liao wrote: From: Pierre-Louis Bossart We sometimes discard -ENODATA when reporting errors and lose all traces of issues in the console log, add a macro to add use dev_dbg() in such cases. Signed-off-by: Pierre-Louis Bossart

Re: [PATCH 1/2] soundwire: add macro to selectively change error levels

2021-04-01 Thread Greg KH
On Thu, Apr 01, 2021 at 01:07:49PM -0500, Pierre-Louis Bossart wrote: > > > > > > +#define sdw_dev_dbg_or_err(dev, is_err, fmt, ...) > > > > > \ > > > > > + do { > > > > > \ > > > > > + if (is_err)

Re: [PATCH 1/2] soundwire: add macro to selectively change error levels

2021-04-01 Thread Pierre-Louis Bossart
+#define sdw_dev_dbg_or_err(dev, is_err, fmt, ...) \ + do {\ + if (is_err) \ + dev_err(dev, fmt, __VA_ARGS__);

Re: [PATCH 1/2] soundwire: add macro to selectively change error levels

2021-04-01 Thread Greg KH
On Thu, Apr 01, 2021 at 09:30:27AM -0500, Pierre-Louis Bossart wrote: > > > On 4/1/21 2:24 AM, Vinod Koul wrote: > > On 31-03-21, 09:13, Bard Liao wrote: > > > From: Pierre-Louis Bossart > > > > > > We sometimes discard -ENODATA when reporting errors and lose all > > > traces of issues in the

Re: [PATCH 1/2] soundwire: add macro to selectively change error levels

2021-04-01 Thread Vinod Koul
On 31-03-21, 09:13, Bard Liao wrote: > From: Pierre-Louis Bossart > > We sometimes discard -ENODATA when reporting errors and lose all > traces of issues in the console log, add a macro to add use dev_dbg() > in such cases. > > Signed-off-by: Pierre-Louis Bossart > Reviewed-by: Rander Wang >

[PATCH 1/2] soundwire: add macro to selectively change error levels

2021-03-30 Thread Bard Liao
From: Pierre-Louis Bossart We sometimes discard -ENODATA when reporting errors and lose all traces of issues in the console log, add a macro to add use dev_dbg() in such cases. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard