Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752584AbbFDPY3 (ORCPT ); Thu, 4 Jun 2015 11:24:29 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:47057 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751448AbbFDPY2 (ORCPT ); Thu, 4 Jun 2015 11:24:28 -0400 X-Sasl-enc: XcyTZ6mDh+7/If65Tv2q/0TSYNp8Pg40WQ6g/n1FEXLP 1433431467 Date: Thu, 4 Jun 2015 18:24:26 +0300 From: Sergei Zviagintsev To: David Herrmann Cc: Greg Kroah-Hartman , Daniel Mack , David Herrmann , Djalal Harouni , linux-kernel , sergei@s15v.net Subject: Re: [PATCH] kdbus: fix type conversion in item macroses Message-ID: <20150604152426.GH4549@localhost.localdomain> References: <1433414370-17557-1-git-send-email-sergei@s15v.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1283 Lines: 36 Hi, On Thu, Jun 04, 2015 at 01:26:03PM +0200, David Herrmann wrote: > Hi > > On Thu, Jun 4, 2015 at 12:39 PM, Sergei Zviagintsev wrote: > > KDBUS_ITEM_NEXT and KDBUS_ITEMS_END macroses do not enclose _i argument > > into parentheses when applying the cast operator. If complex expression > > passed, e.g. > > > > KDBUS_ITEM_NEXT(condition ? a : b) > > > > then type conversion to (u8 *) will go wrong due to precedence rules. > > > > Use parentheses properly. Update documentation. > > > > Signed-off-by: Sergei Zviagintsev > > --- > > Documentation/kdbus/kdbus.item.xml | 2 +- > > ipc/kdbus/item.h | 4 ++-- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > Reviewed-by: David Herrmann It seems that I missed the same issue with KDBUS_ITEMS_SIZE (and samples/kdbus as well, but that would be another patch), so I'd better fix that and merge with updated version of http://permalink.gmane.org/gmane.linux.kernel/1969533 into single patch. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/