Thread (10 messages) 10 messages, 2 authors, 2013-03-08

Re: [PATCH 1/4] Input: wm97xx: Drop out of range inputs

From: Markus Pargmann <hidden>
Date: 2013-03-08 18:11:41

On Sat, Mar 09, 2013 at 01:15:49AM +0800, Mark Brown wrote:
On Fri, Mar 08, 2013 at 05:15:06PM +0100, Markus Pargmann wrote:
quoted
+		if (
+				abs_x[0] > (data.x & 0xfff)
+				|| abs_x[1] < (data.x & 0xfff)
+				|| abs_y[0] > (data.y & 0xfff)
+				|| abs_y[1] < (data.y & 0xfff)) {
+			dev_dbg(wm->dev, "Measurement out of range, dropping it\n");
+			rc = RC_AGAIN;
+			goto out;
The change is good but not a fan of the coding style here.  Otherwise

Acked-by: Mark Brown <redacted>
Thanks. I would change the style to this:

		if (abs_x[0] > (data.x & 0xfff) ||
				abs_x[1] < (data.x & 0xfff) ||
				abs_y[0] > (data.y & 0xfff) ||
				abs_y[1] < (data.y & 0xfff)) {

Regards

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help