[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150403182822.GC1298@katana>
Date: Fri, 3 Apr 2015 20:28:23 +0200
From: Wolfram Sang <wsa@...-dreams.de>
To: Nickolaus Woodruff <nickolauswoodruff@...il.com>
Cc: linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/i2c/i2c-core.c: Fix sparse warning
> - u8 addr = (msg->addr << 1) | !!(msg->flags & I2C_M_RD);
> + u8 addr = (msg->addr << 1) | ((msg->flags & I2C_M_RD) != 0);
I prefer !! as an idiom for "bit to bool".
Thanks,
Wolfram
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists