mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "benjamin.tissoires" <benjamin.tissoires@gmail.com>,
	Jiri Kosina <jkosina@suse.cz>, Stephane Chatty <chatty@enac.fr>,
	fabien.andre@gmail.com, scott.liu@emc.com.tw,
	Ben Dooks <ben-linux@fluff.org>,
	Wolfram Sang <w.sang@pengutronix.de>,
	linux-i2c@vger.kernel.org, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] i2c-hid: introduce HID over i2c specification  implementation
Date: Sat, 6 Oct 2012 21:54:16 +0200	[thread overview]
Message-ID: <20121006215416.5fdbb6ef@endymion.delvare> (raw)
In-Reply-To: <20121003164306.GA18529@core.coreip.homeip.net>

On Wed, 3 Oct 2012 09:43:12 -0700, Dmitry Torokhov wrote:
> On Fri, Sep 14, 2012 at 03:41:43PM +0200, benjamin.tissoires wrote:
> > +	}
> > +
> > +	do {
> > +		ret = i2c_transfer(client->adapter, msg, msg_num);
> > +		if (ret > 0)
> > +			break;
> > +		tries--;
> > +		dev_dbg(&client->dev, "retrying i2chid_command:%d (%d)\n",
> > +			command, tries);
> > +	} while (tries > 0);
> > +
> > +	if (wait && ret > 0) {
> > +		if (debug)
> > +			dev_err(&client->dev, "%s: waiting....\n", __func__);
> > +		if (!wait_event_timeout(ihid->wait,
> > +				!test_bit(I2C_HID_RESET_PENDING, &ihid->flags),
> > +				msecs_to_jiffies(5000)))
> > +			ret = -ENODATA;
> > +		if (debug)
> > +			dev_err(&client->dev, "%s: finished.\n", __func__);
> 
> Why do we have error level messages with debug? I know dev_dbg is
> compiled out if !DEBUG, but there must be a better way. Maybe define
> i2c_hid_dbg() via dev_printk() and also check debug condition there?

dev_dbg() is compiled out if !DEBUG only if CONFIG_DYNAMIC_DEBUG isn't
set. These days I think every developer want to enable this option.

-- 
Jean Delvare

  parent reply	other threads:[~2012-10-06 19:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 13:41 benjamin.tissoires
     [not found] ` < 20121006220421.47f5fd56@endymion.delvare>
2012-10-03  3:08 ` Jian-Jhong Ding
2012-10-03 15:13   ` Benjamin Tissoires
2012-10-03  6:05 ` Shubhrajyoti Datta
2012-10-03 15:33   ` Benjamin Tissoires
2012-10-03 16:14     ` Shubhrajyoti Datta
2012-10-03 16:43 ` Dmitry Torokhov
2012-10-04  9:16   ` Benjamin Tissoires
2012-10-04  9:48     ` Jiri Kosina
2012-10-06 19:54   ` Jean Delvare [this message]
2012-10-06 20:04 ` Jean Delvare
2012-10-06 20:30   ` Stéphane Chatty
2012-10-06 21:11     ` Jean Delvare
     [not found]       ` <alpine.LNX.2.00.1210 062314110.27782@pobox.suse.cz>
2012-10-06 21:18       ` Jiri Kosina
2012-10-06 21:28         ` Jiri Kosina
2012-10-06 21:39           ` Stéphane Chatty
2012-10-07 16:07             ` Benjamin Tissoires
2012-10-07 16:20               ` Stéphane Chatty
2012-10-08 14:42               ` Jiri Kosina
2012-10-06 21:27       ` Stéphane Chatty
2012-10-07  7:16         ` Jean Delvare
2012-10-07 16:00   ` Benjamin Tissoires
2012-10-07 14:28 ` Jean Delvare
2012-10-07 16:57   ` Benjamin Tissoires
2012-10-07 19:03     ` Jean Delvare
2012-10-15 20:42       ` Benjamin Tissoires

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=20121006215416.5fdbb6ef@endymion.delvare \
    --to=khali@linux-fr.org \
    --cc=ben-linux@fluff.org \
    --cc=benjamin.tissoires@gmail.com \
    --cc=chatty@enac.fr \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fabien.andre@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=scott.liu@emc.com.tw \
    --cc=w.sang@pengutronix.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

all inboxes | Powered by JetHome®