linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
To: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
Cc: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-next-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH next-20080819] drivers/usb/atm: Fix non-existing warn()
Date: Tue, 19 Aug 2008 17:47:23 -0700	[thread overview]
Message-ID: <20080820004723.GB385@kroah.com> (raw)
In-Reply-To: <s5hiqtxw8en.wl%tiwai-l3A5Bk7waGM@public.gmane.org>

On Tue, Aug 19, 2008 at 01:28:48PM +0200, Takashi Iwai wrote:
> Fix the die-hard warn() in drivers/usb/atm/usbatm.h that caused a
> build error.
> 
> Signed-off-by: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
> ---
> diff --git a/drivers/usb/atm/usbatm.h b/drivers/usb/atm/usbatm.h
> index e6887c6..714dc14 100644
> --- a/drivers/usb/atm/usbatm.h
> +++ b/drivers/usb/atm/usbatm.h
> @@ -42,7 +42,7 @@
>  #ifdef DEBUG
>  #define UDSL_ASSERT(x)	BUG_ON(!(x))
>  #else
> -#define UDSL_ASSERT(x)	do { if (!(x)) warn("failed assertion '%s' at line %d", __stringify(x), __LINE__); } while(0)
> +#define UDSL_ASSERT(x)	do { if (!(x)) pr_warning("failed assertion '%s' at line %d", __stringify(x), __LINE__); } while(0)
>  #endif

I fixed it a bit differently, using dev_warn() instead and passing the
"instance" to the macro like the other macros defined in this file.
That way any user knows exactly which device and driver caused the
driver to go boom :)

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-08-20  0:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-19  8:54 linux-next: Tree for August 19 Stephen Rothwell
2008-08-19 11:28 ` [PATCH next-20080819] drivers/usb/atm: Fix non-existing warn() Takashi Iwai
2008-08-19 20:02   ` Greg KH
     [not found]   ` <s5hiqtxw8en.wl%tiwai-l3A5Bk7waGM@public.gmane.org>
2008-08-20  0:47     ` Greg KH [this message]
     [not found]       ` <20080820004723.GB385-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2008-08-20  8:30         ` Takashi Iwai
2008-08-20  0:05 ` linux-next: Tree for August 19 (mfd/ucb) Randy Dunlap
2008-08-20  0:16   ` Andrew Morton
2008-08-20  2:25     ` KAMEZAWA Hiroyuki
2008-08-20  5:10       ` Randy.Dunlap
2008-08-20  7:49     ` Takashi Iwai
2008-08-20  7:57       ` Russell King
2008-08-20  8:00         ` Takashi Iwai
2008-08-20  8:53         ` Stephen Rothwell
2008-08-20  0:26   ` Andrew Morton
2008-08-20  4:21   ` Sam Ravnborg

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=20080820004723.GB385@kroah.com \
    --to=greg-u8xffu+wg4eavxtiumwx3w@public.gmane.org \
    --cc=gregkh-l3A5Bk7waGM@public.gmane.org \
    --cc=linux-next-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=tiwai-l3A5Bk7waGM@public.gmane.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).