From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751445AbdFEJG4 (ORCPT ); Mon, 5 Jun 2017 05:06:56 -0400 Received: from terminus.zytor.com ([65.50.211.136]:57267 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751272AbdFEJGy (ORCPT ); Mon, 5 Jun 2017 05:06:54 -0400 Date: Mon, 5 Jun 2017 02:02:19 -0700 From: tip-bot for Ben Hutchings Message-ID: Cc: hpa@zytor.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, mingo@kernel.org, sasha.levin@oracle.com, ben@decadent.org.uk, peterz@infradead.org, tglx@linutronix.de Reply-To: peterz@infradead.org, tglx@linutronix.de, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, sasha.levin@oracle.com, ben@decadent.org.uk In-Reply-To: <20170525130005.5947-4-alexander.levin@verizon.com> References: <20170525130005.5947-4-alexander.levin@verizon.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] tools/lib/lockdep: Define the ARRAY_SIZE() macro Git-Commit-ID: 108744c45fd8a51e763e976d9e5b2cc265d4a847 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 108744c45fd8a51e763e976d9e5b2cc265d4a847 Gitweb: http://git.kernel.org/tip/108744c45fd8a51e763e976d9e5b2cc265d4a847 Author: Ben Hutchings AuthorDate: Thu, 25 May 2017 12:58:34 +0000 Committer: Ingo Molnar CommitDate: Mon, 5 Jun 2017 09:28:04 +0200 tools/lib/lockdep: Define the ARRAY_SIZE() macro lockdep.c now uses ARRAY_SIZE(). Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Fixes: 75dd602a5198 ("lockdep: Fix lock_chain::base size") Link: http://lkml.kernel.org/r/20170525130005.5947-4-alexander.levin@verizon.com Signed-off-by: Ingo Molnar --- 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); \