public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Joe Perches <joe@perches.com>, h@sudip-PC
Cc: Raymond Yau <superquad.vortex2@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [alsa-devel] [PATCH v2 2/2] ALSA: au88x0: pr_* replaced with dev_*
Date: Sat, 11 Oct 2014 17:03:49 +0530	[thread overview]
Message-ID: <20141011113349.GA9962@sudip-PC> (raw)
In-Reply-To: <1413024491.16385.10.camel@joe-AO725>

On Sat, Oct 11, 2014 at 03:48:11AM -0700, Joe Perches wrote:
> On Sat, 2014-10-11 at 14:39 +0530, Sudip Mukherjee wrote:
> > On Sat, Oct 11, 2014 at 03:20:56PM +0800, Raymond Yau wrote:
> > > >
<snip>
> > > > ---
> > > >
> > > 
> > > >  static int vortex_core_init(vortex_t *vortex)
> > > >  {
> > > >
> > > > -       pr_info( "Vortex: init.... ");
> > > > +       dev_info(vortex->card->dev, "init.... ");
> > > 
> > > Is it possible to add linefeed  since "done/n" won't appear in the same
> > > line with init nor shutdown?
> > > 
> > should we add linefeed ?
> > as of now it will print init.... then it will print done as the init is complete.
> > so dmesg will show us:
> > 
> > init....done.
> > 
> > same for shutdown.
> > but if we give linefeed , then it will become : 
> > 
> > init....
> > done.
> > 
> > the meaning will be lost. and many user might just wonder what is done ? 
> []
> > > > @@ -2738,7 +2744,7 @@ static int vortex_core_init(vortex_t *vortex)
> > > >  static int vortex_core_shutdown(vortex_t * vortex)
> > > >  {
> > > >
> > > > -       pr_info( "Vortex: shutdown...");
> > > > +       dev_info(vortex->card->dev, "shutdown...");
> > > >  #ifndef CHIP_AU8820
> > > >         vortex_eq_free(vortex);
> > > >         vortex_Vort3D_disable(vortex);
> > > > @@ -2760,7 +2766,7 @@ static int vortex_core_shutdown(vortex_t * vortex)
> > > >         msleep(5);
> > > >         hwwrite(vortex->mmio, VORTEX_IRQ_SOURCE, 0xffff);
> > > >
> > > > -       pr_info( "done.\n");
> > > > +       dev_info(vortex->card->dev, "done.\n");
> > > >         return 0;
> > > >  }
> 
> It's actually on 2 lines before your patch.
> 
> 	pr_info("a");
> 	pr_info("b\n");
> 
> already emits 2 separate lines.
> 
> 	pr_info("a");
> 	pr_cont("b\n");
> 
> emits a single line "ab"
> (unless some other thread emits something in-between)
> 
> pr_cont or a bare printk can be used after a dev_info
> without a newline to avoid unwanted newlines.

i think i was not thinking while writing the previous mail.
pr_info("a");
pr_info("b\n");
should print as "ab" , considering no other threads prints in between.
but after converting it to dev_info it will become :
"dev: adev: b".
and for our "init.... done" , it will become 
"au88x0: init.... au88x0: done."  ( i have ommited the driver name)

can't we do some thing like :
dev_info(vortex->card->dev, "init.... started\n");
dev_info(vortex->card->dev, "init....done\n");
then even if some other thread prints , then we will not loose the reference.

thanks
sudip

  reply	other threads:[~2014-10-11 11:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-10  8:36 [PATCH v2 1/2] ALSA: au88x0: added reference of vortex_t Sudip Mukherjee
2014-10-10  8:36 ` [PATCH v2 2/2] ALSA: au88x0: pr_* replaced with dev_* Sudip Mukherjee
     [not found]   ` <CAN8ccibSw_85wdnxbNSKfjXQ-7Lg3C6_5fhKQJJi5xMi8pMabA@mail.gmail.com>
2014-10-11  9:09     ` [alsa-devel] " Sudip Mukherjee
2014-10-11 10:48       ` Joe Perches
2014-10-11 11:33         ` Sudip Mukherjee [this message]
2014-10-11 15:32           ` Joe Perches
     [not found]             ` <CADVatmPiWEm9wBENVVytUqCOV_Yv9HojmHYJGDAmyGpwhcCU8A@mail.gmail.com>
2014-10-11 18:22               ` Joe Perches
2014-10-11 18:25             ` Sudip Mukherjee
     [not found]               ` <CAN8cciZXLfWC-vsYq0r64Uw6D0t2z8LFVcF_i31OQg5BO7+uZQ@mail.gmail.com>
2014-10-16 13:45                 ` Takashi Iwai
2014-10-17  3:32                   ` Sudip Mukherjee

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=20141011113349.GA9962@sudip-PC \
    --to=sudipm.mukherjee@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=h@sudip-PC \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=superquad.vortex2@gmail.com \
    --cc=tiwai@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox