Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [libsas PATCH v12 04/11] sysfs: handle 'parent deleted before child added'
Date: Fri, 23 Mar 2012 13:54:24 -0700	[thread overview]
Message-ID: <20120323205424.GA31689@kroah.com> (raw)
In-Reply-To: <1332528209.23830.4.camel@ultramagnus.opencreations.com>

On Fri, Mar 23, 2012 at 11:43:28AM -0700, Dan Williams wrote:
> On Thu, 2012-03-22 at 07:39 -0700, Greg Kroah-Hartman wrote:
> > And note, I hate pr_err(), what's wrong with printk() in this instance?
> 
> So how about an end run around the conversion to pr_err() and just make
> these proper WARN()s since we end up calling dump_stack in both cases?
> 
> Something like:
> 
> diff --git a/lib/kobject.c b/lib/kobject.c
> index e5f86c0..1bd0893 100644
> --- a/lib/kobject.c
> +++ b/lib/kobject.c
> @@ -192,15 +192,14 @@ static int kobject_add_internal(struct kobject *kobj)
>  
>  		/* be noisy on error issues */
>  		if (error == -EEXIST)
> -			pr_err("%s failed for %s with "
> -			       "-EEXIST, don't try to register things with "
> -			       "the same name in the same directory.\n",
> -			       __func__, kobject_name(kobj));
> +			WARN(1, "%s failed for %s with "
> +			     "-EEXIST, don't try to register things with "
> +			     "the same name in the same directory.\n",
> +			     __func__, kobject_name(kobj));
>  		else
> -			pr_err("%s failed for %s (error: %d parent: %s)\n",
> -			       __func__, kobject_name(kobj), error,
> -			       parent ? kobject_name(parent) : "'none'");
> -		dump_stack();
> +			WARN(1, "%s failed for %s (error: %d parent: %s)\n",
> +			     __func__, kobject_name(kobj), error,
> +			     parent ? kobject_name(parent) : "'none'");

I'm missing why this isn't the exact same thing that is currently
happening...

confused,

greg k-h

  reply	other threads:[~2012-03-23 20:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22  6:31 [libsas PATCH v12 00/11] libsas eh, discovery, suspend, and fixes Dan Williams
2012-03-22  6:31 ` [libsas PATCH v12 01/11] libsas: cleanup spurious calls to scsi_schedule_eh Dan Williams
2012-03-22  6:32 ` [libsas PATCH v12 02/11] libsas: trim sas_task of slow path infrastructure Dan Williams
2012-03-22  6:32 ` [libsas PATCH v12 03/11] libata: reset once Dan Williams
2012-03-22  6:32 ` [libsas PATCH v12 04/11] sysfs: handle 'parent deleted before child added' Dan Williams
2012-03-22 14:39   ` Greg Kroah-Hartman
2012-03-22 16:27     ` Williams, Dan J
2012-03-22 22:51       ` Stefan Richter
2012-03-22 23:11         ` Williams, Dan J
2012-03-22 23:26         ` Stefan Richter
2012-03-23 18:43     ` Dan Williams
2012-03-23 20:54       ` Greg Kroah-Hartman [this message]
2012-03-23 21:15         ` Williams, Dan J
2012-03-22 14:47   ` James Bottomley
2012-03-22 16:34     ` Williams, Dan J
2012-03-22  6:32 ` [libsas PATCH v12 05/11] scsi_transport_sas: fix delete vs scan race Dan Williams
2012-03-22  6:32 ` [libsas PATCH v12 06/11] libsas: unify domain_device sas_rphy lifetimes Dan Williams
2012-03-22  6:32 ` [libsas PATCH v12 07/11] libsas: fix false positive 'device attached' conditions Dan Williams
2012-03-22  6:32 ` [libsas PATCH v12 08/11] libsas: fix ata_eh clobbering ex_phys via smp_ata_check_ready Dan Williams
2012-03-22  6:32 ` [libsas PATCH v12 09/11] libsas, libata: fix start of life for a sas ata_port Dan Williams
2012-03-22  6:32 ` [libsas PATCH v12 10/11] scsi, sd: limit the scope of the async probe domain Dan Williams
2012-03-22 14:20   ` Alan Stern
2012-03-22 19:09     ` Williams, Dan J
2012-03-22  6:32 ` [libsas PATCH v12 11/11] libsas: suspend / resume support Dan Williams

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=20120323205424.GA31689@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=linux-ide@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