From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938083AbdEYM72 (ORCPT ); Thu, 25 May 2017 08:59:28 -0400 Received: from omzsmtpe03.verizonbusiness.com ([199.249.25.208]:59457 "EHLO omzsmtpe03.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765853AbdEYM7R (ORCPT ); Thu, 25 May 2017 08:59:17 -0400 X-IronPort-Anti-Spam-Filtered: false From: "Levin, Alexander (Sasha Levin)" X-IronPort-AV: E=Sophos;i="5.38,391,1491264000"; d="scan'208";a="358081861" To: "mingo@kernel.org" CC: "linux-kernel@vger.kernel.org" , "ben@decadent.org.uk" , "a.p.zijlstra@chello.nl" , "tglx@linutronix.de" Subject: [PATCH 03/21] liblockdep: Define the ARRAY_SIZE() macro Thread-Topic: [PATCH 03/21] liblockdep: Define the ARRAY_SIZE() macro Thread-Index: AQHS1VaeiaJbtnA4cESC0IL+bW6oQw== Date: Thu, 25 May 2017 12:58:34 +0000 Message-ID: <20170525130005.5947-4-alexander.levin@verizon.com> References: <20170525130005.5947-1-alexander.levin@verizon.com> In-Reply-To: <20170525130005.5947-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v4PD01BG003849 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 276c7a8b2ed1..da87bd9ad2c1 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.11.0