[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140911165638.GE1840@saruman.home>
Date: Thu, 11 Sep 2014 11:56:38 -0500
From: Felipe Balbi <balbi@...com>
To: Michal Nazarewicz <mina86@...a86.com>
CC: Felipe Balbi <balbi@...com>,
Dan Carpenter <dan.carpenter@...cle.com>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCHv2] usb: f_fs: replace BUG in dead-code with less serious
WARN_ON
On Thu, Sep 11, 2014 at 06:52:49PM +0200, Michal Nazarewicz wrote:
> Even though the BUG() in __ffs_event_add is a dead-code, it is still
> better to warn rather then crash the system if that code ever gets
> executed.
>
> Reported-by: Felipe Balbi <balbi@...com>
> Signed-off-by: Michal Nazarewicz <mina86@...a86.com>
> ---
> drivers/usb/gadget/function/f_fs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> On Wed, Sep 10 2014, Felipe Balbi <balbi@...com> wrote:
> > WARN(1, "unknown event type %d\n", type);
> > Then you can drop pr_vdebug();
>
> True, but the printk call will stay in the binary whereas pr_vdebug is not
not a big deal. I'd rather get a message all the time this triggers.
> included in non-debug builds. Furthermore, WARN() does not use pr_fmt.
not a big deal either, we will get a stack dump and can easily figure
out where that comes from.
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists