All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@systec-electronic.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH 1/1] ASoC: core: Do not print an actual error when deferring probe
Date: Wed, 18 May 2016 17:50:50 +0200	[thread overview]
Message-ID: <1574831.WL8kGhHEjA@ws-stein> (raw)
In-Reply-To: <20160518152820.GN8104@sirena.org.uk>

On Wednesday 18 May 2016 16:28:20, Mark Brown wrote:
> On Wed, May 18, 2016 at 05:18:41PM +0200, Alexander Stein wrote:
> > Well, it's debatable if using dev_err() and then returning EPROBE_DEFER is
> > correct either. IMHO if there is an actual error, an error code has to be
> > returned and not "well, can't continue now, probe me again later".
> > At first glance those EPROBE_DEFER are correct as other dependent drivers
> > may be probed later, so printing an error in that case seems wrong to me.
> Half the point with probe deferral is that it's transparent to anything
> that isn't actually resolving a resource - if we have to add custom code
> in to everywhere were we need to print an error in a probe path that's
> not great either.  We also don't want to silently ignore probe deferral
> all the time since then it becomes very hard to diagnose why something
> is not instantiating.

I came up with this because on one of our boards there are lots of probe 
deferals, mainly caused by i2c gpio expanders and audio. Anyway, in order to 
reduce boot time I silence the boot console using 'quiet' on command line. 
Nevertheless It's quite useless to have several error (!) messages during boot 
just caused by probe deferral. Here is one bootup. It's from an old vendor 
kernel, but you get the idea.

> Starting kernel ...
>
> [    5.490931] i2c i2c-0: of_i2c: modalias failure on
> /soc/i2c@2180000/cyusb3314@60 init started: BusyBox v1.22.0 (2015-10-13
> 14:03:10 CEST)
> starting pid 122, tty '/dev/console': '/etc/init.d/rcS'
> [    6.533391] vf610-sgtl5000 sound.9: ASoC: CPU DAI (null) not registered
> [    6.571234] vf610-sgtl5000 sound.9: ASoC: CPU DAI (null) not registered
> [    6.586243] vf610-sgtl5000 sound.9: ASoC: CPU DAI (null) not registered
> [    6.598094] vf610-sgtl5000 sound.9: ASoC: CPU DAI (null) not registered
> starting pid 238, tty '/dev/console': '/sbin/getty -L 115200 ttyS0 vt102'
> 
> ecucore login:

My first idea was to use dev_dbg() but that actualy remove that message at 
all, unless dynamic debug is used, so I went with dev_notice. It's still 
there, but does not clobber quiet boot log, nor some sophisticated kernel log 
parser as journalctl which prints errors in red color.

Best regards,
Alexander

  reply	other threads:[~2016-05-18 15:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 13:41 [PATCH 1/1] ASoC: core: Do not print an actual error when deferring probe Alexander Stein
2016-05-18 14:25 ` Ricard Wanderlof
2016-05-18 15:08 ` Mark Brown
2016-05-18 15:18   ` Alexander Stein
2016-05-18 15:28     ` Mark Brown
2016-05-18 15:50       ` Alexander Stein [this message]
2016-05-18 16:21         ` Mark Brown
2016-05-18 16:57           ` Takashi Iwai
2016-05-18 17:20             ` Mark Brown
2016-05-18 19:33               ` Takashi Iwai
2016-05-19  6:28                 ` Alexander Stein
2016-05-19  6:53                   ` Takashi Iwai
2016-05-19 10:34                     ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1574831.WL8kGhHEjA@ws-stein \
    --to=alexander.stein@systec-electronic.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.