Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753030AbbFDKk3 (ORCPT ); Thu, 4 Jun 2015 06:40:29 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:38163 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752680AbbFDKkY (ORCPT ); Thu, 4 Jun 2015 06:40:24 -0400 X-Sasl-enc: TN0sLvuM+6j/j7Sm7KliKqlEtK4coOZQi5mCDp9Et0Jl 1433414423 From: Sergei Zviagintsev To: Greg Kroah-Hartman , Daniel Mack , David Herrmann , Djalal Harouni Cc: linux-kernel@vger.kernel.org, Sergei Zviagintsev Subject: [PATCH] kdbus: use FIELD_SIZEOF in kdbus_member_set_user macro Date: Thu, 4 Jun 2015 13:39:30 +0300 Message-Id: <1433414370-17557-3-git-send-email-sergei@s15v.net> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 880 Lines: 31 sizeof(((_t *)0)->_m) -> FIELD_SIZEOF(_t, _m) Use conventional macro according to chapter 17 of Documentation/CodingStyle. Signed-off-by: Sergei Zviagintsev --- ipc/kdbus/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipc/kdbus/util.h b/ipc/kdbus/util.h index 9fedf8ab41cd..529716669fe7 100644 --- a/ipc/kdbus/util.h +++ b/ipc/kdbus/util.h @@ -40,7 +40,7 @@ ({ \ u64 __user *_sz = \ (void __user *)((u8 __user *)(_b) + offsetof(_t, _m)); \ - copy_to_user(_sz, _s, sizeof(((_t *)0)->_m)); \ + copy_to_user(_sz, _s, FIELD_SIZEOF(_t, _m)); \ }) /** -- 1.8.3.1 -- 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/