From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from pandora.arm.linux.org.uk (pandora.arm.linux.org.uk [IPv6:2001:4d48:ad52:3201:214:fdff:fe10:1be6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 988081A04E1 for ; Mon, 12 Jan 2015 23:08:41 +1100 (AEDT) Date: Mon, 12 Jan 2015 12:08:14 +0000 From: Russell King - ARM Linux To: Wolfram Sang Subject: Re: [RFC 02/11] i2c: add quirk checks to core Message-ID: <20150112120814.GE12302@n2100.arm.linux.org.uk> References: <1420824103-24169-1-git-send-email-wsa@the-dreams.de> <1420824103-24169-3-git-send-email-wsa@the-dreams.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1420824103-24169-3-git-send-email-wsa@the-dreams.de> Sender: Russell King - ARM Linux Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Ludovic Desroches , linux-i2c@vger.kernel.org, Yingjoe Chen , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, Jan 09, 2015 at 06:21:32PM +0100, Wolfram Sang wrote: > +static int i2c_quirk_error(struct i2c_adapter *adap, struct i2c_msg *msg, char *err_msg) > +{ > + dev_err(&adap->dev, "quirk: %s (addr 0x%04x, size %u)\n", err_msg, msg->addr, msg->len); > + return -EOPNOTSUPP; > +} So, what happens if I open an I2C adapter, find a message which causes i2c_quirk_error() to be called, and then spin repeatedly calling that... Shouldn't there be some rate limiting to this? -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.