linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Gerb Stralko" <gerb.stralko@gmail.com>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi: remove CDROM not ready printk
Date: Thu, 29 May 2008 10:35:08 -0400	[thread overview]
Message-ID: <75b57c110805290735i493eca0fp882f4a38901a416c@mail.gmail.com> (raw)
In-Reply-To: <1212069932.3428.1.camel@localhost.localdomain>

On Thu, May 29, 2008 at 10:05 AM, James Bottomley
<James.Bottomley@hansenpartnership.com> wrote:
> On Thu, 2008-05-29 at 00:41 -0700, Andrew Morton wrote:
>> On Tue, 27 May 2008 15:02:43 -0400 (EDT) Jerry Stralko <gerb.stralko@gmail.com> wrote:
>>
>> > Hello,
>>
>> let's cc a scsi list which exists ;)
>>
>> >    This printk was spamming my dmesg and /var/log/message.  Is there a
>> > reason we have this printk?  Can we simply remove it?
>> >
>> >
>> > Signed-off-by: Jerry Stralko <gerb.stralko@gmail.com>
>> > ---
>> >
>> >
>> > diff --git a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c
>> > index ae87d08..c37fb1c 100644
>> > --- a/drivers/scsi/sr_ioctl.c
>> > +++ b/drivers/scsi/sr_ioctl.c
>> > @@ -238,8 +238,6 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc)
>> >                                     break;
>> >                             }
>> >                     }
>> > -                   if (!cgc->quiet)
>> > -                           printk(KERN_INFO "%s: CDROM not ready.  Make sure there is a disc in the drive.\n", cd->cdi.name);
>> >   #ifdef DEBUG
>> >                     scsi_print_sense_hdr("sr", &sshdr);
>> >   #endif
>>
>> The answer may be that you need to enable cgc->quiet.  If that is
>> user-enableable - I can't work out how from a quick grep.
>
> That's correct.  cgc is the data from the packet command that was sent
> in from the ioctl.  The user application is actually the one that
> decides whether you get to see the message or not.  Modern apps like hal
> set it because they take care of all state updates and notifications
> themselves.  Which is the application that's doing this (because it
> probably needs updating).
>
> James

So is that printk really needed?  Should the kernel even need to print
a message like that, esp. if user-space is handling state updates and
notifications.  Or do i need to configure hald to be quietier?   FWIW
I'm using fedora core 9 and hald version:
-bash-3.2$ /usr/sbin/hald --version
HAL package version: 0.5.11

thanks,

Jerry

  reply	other threads:[~2008-05-29 14:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.LFD.1.10.0805271502370.3985@localhost.localdomain>
2008-05-29  7:41 ` [PATCH] scsi: remove CDROM not ready printk Andrew Morton
2008-05-29 14:05   ` James Bottomley
2008-05-29 14:35     ` Gerb Stralko [this message]
2008-05-29 14:51       ` Matthew Wilcox
2008-05-29 14:55       ` James Bottomley
2008-05-29 15:04         ` Gerb Stralko
2008-05-29 15:22           ` James Bottomley
2008-06-02  0:45             ` Gerb Stralko

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=75b57c110805290735i493eca0fp882f4a38901a416c@mail.gmail.com \
    --to=gerb.stralko@gmail.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).