From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [iproute PATCH] Use ARRAY_SIZE macro everywhere Date: Mon, 21 Mar 2016 11:59:05 -0700 Message-ID: <20160321115905.78a2b3e1@xeon-e3> References: <1458242888-28978-1-git-send-email-phil@nwl.cc> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: To: Phil Sutter Return-path: Received: from mx0b-000f0801.pphosted.com ([67.231.152.113]:54155 "EHLO mx0b-000f0801.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755361AbcCUTrt (ORCPT ); Mon, 21 Mar 2016 15:47:49 -0400 In-Reply-To: <1458242888-28978-1-git-send-email-phil@nwl.cc> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 17 Mar 2016 20:28:08 +0100 Phil Sutter wrote: > This patch was generated by the following semantic patch (a trimmed down > version of what is shipped with Linux sources): > > @@ > type T; > T[] E; > @@ > ( > - (sizeof(E)/sizeof(*E)) > + ARRAY_SIZE(E) > | > - (sizeof(E)/sizeof(E[...])) > + ARRAY_SIZE(E) > | > - (sizeof(E)/sizeof(T)) > + ARRAY_SIZE(E) > ) > > The only manual adjustment was to include utils.h in misc/nstat.c to make > the macro known there. > > Signed-off-by: Phil Sutter I went ahead and did some checkpatch spring cleaning to code. This is no longer needed.