From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [iproute PATCH v4] Use ARRAY_SIZE macro everywhere Date: Wed, 29 Jun 2016 09:18:48 -0700 Message-ID: <20160629091848.23bb780c@xeon-e3> References: <20160327104236.0c71be5d@xeon-e3> <5694d6b0cd854ac98abeddf04c9c32c2@HQ1WP-EXMB11.corp.brocade.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" To: Phil Sutter Return-path: Received: from mx0a-000f0801.pphosted.com ([67.231.144.122]:56337 "EHLO mx0a-000f0801.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbcF2QSm (ORCPT ); Wed, 29 Jun 2016 12:18:42 -0400 In-Reply-To: <5694d6b0cd854ac98abeddf04c9c32c2@HQ1WP-EXMB11.corp.brocade.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 28 Jun 2016 16:42:15 +0000 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 Applied