From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753293AbcG3DCe (ORCPT ); Fri, 29 Jul 2016 23:02:34 -0400 Received: from omzsmtpe01.verizonbusiness.com ([199.249.25.210]:44982 "EHLO omzsmtpe01.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750903AbcG3DCP convert rfc822-to-8bit (ORCPT ); Fri, 29 Jul 2016 23:02:15 -0400 X-IronPort-Anti-Spam-Filtered: false From: "Levin, Alexander" Cc: "linux-kernel@vger.kernel.org" , Ben Hutchings , "Levin, Alexander" X-IronPort-AV: E=Sophos;i="5.28,442,1464652800"; d="scan'208";a="745042762" To: "mingo@redhat.com" , "peterz@infradead.org" Date: Fri, 29 Jul 2016 23:02:13 -0400 Subject: [PATCH 3/8] liblockdep: Define the ARRAY_SIZE() macro Thread-Topic: [PATCH 3/8] liblockdep: Define the ARRAY_SIZE() macro Thread-Index: AdHqDsWDv6R14p1YT1OY86DaybSJJg== Message-ID: <1469847222-21313-4-git-send-email-alexander.levin@verizon.com> References: <1469847222-21313-1-git-send-email-alexander.levin@verizon.com> In-Reply-To: <1469847222-21313-1-git-send-email-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ben Hutchings lockdep.c now uses ARRAY_SIZE(). Fixes: 75dd602a5198 ("lockdep: Fix lock_chain::base size") Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin --- tools/lib/lockdep/uinclude/linux/kernel.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/lib/lockdep/uinclude/linux/kernel.h b/tools/lib/lockdep/uinclude/linux/kernel.h index 276c7a8..da87bd9 100644 --- a/tools/lib/lockdep/uinclude/linux/kernel.h +++ b/tools/lib/lockdep/uinclude/linux/kernel.h @@ -7,6 +7,8 @@ #include #include +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) + #ifndef container_of #define container_of(ptr, type, member) ({ \ const typeof(((type *)0)->member) * __mptr = (ptr); \ -- 2.7.4