lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121006215416.5fdbb6ef@endymion.delvare>
Date:	Sat, 6 Oct 2012 21:54:16 +0200
From:	Jean Delvare <khali@...ux-fr.org>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	"benjamin.tissoires" <benjamin.tissoires@...il.com>,
	Jiri Kosina <jkosina@...e.cz>,
	Stephane Chatty <chatty@...c.fr>, fabien.andre@...il.com,
	scott.liu@....com.tw, Ben Dooks <ben-linux@...ff.org>,
	Wolfram Sang <w.sang@...gutronix.de>,
	linux-i2c@...r.kernel.org, linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] i2c-hid: introduce HID over i2c specification 
 implementation

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ