Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1530989imj; Fri, 8 Feb 2019 03:06:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IYJN3kmwQj2pN5jbeT/gp2yNFm/uWlgqwUTNALsdf6820PMC2ch2KG6Jno29sxXPyRBm3ai X-Received: by 2002:a17:902:8497:: with SMTP id c23mr21880838plo.64.1549623987374; Fri, 08 Feb 2019 03:06:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549623987; cv=none; d=google.com; s=arc-20160816; b=eH64NL3liGiQDWiiD4DjLbRuEICIaXLsxJc+ihQgFOJ6cGbQIkJjBOcxpL1OFtHhZo hq39i0iYzBHW2zOaeTq/zbTbTOXdMGFwBsBiLY6yfKZLa1GsXZFQ1eDODxgaIEsxlIgp HU9uXYLRcjvBIwI9e0rwmsVRHel3XRtThFidp/twvYi12YkHPde+GAavBRmhQQeS9N/d 0NPjpdofF0svIuiSHmnGxk9dNmbUuNKdwJW+h3ydNI0ooJiwxrimkqyTQrY9m+036oLi FtBF8QGpfL0ufWiAf/zH0ykaQGStWDWlAKoEWs6hu6EaIg0wuBLmNAyyf7GOaQ1TQQSQ humA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=zXHJqO5kYdjQIh175jjIQKAv0+RlFrvNTrEMg/QvCfA=; b=kQiff3dq61r2ePz7Scv3TKp5uPlPt5LTHZ7iwr6ibXbLgOnyHXh409riDFMBZISNg3 swEwMvuP0hXy0Ji4ASQIPzZ8SnqaYIHgC1yyP0KPoi3ndQGwWkhtoHAUBMwspSp1Jy/E Fi9nIh+7lSiamv0VLozmEosonZW/Y6hxJYQbXSFnVatZH3FSlZHIfoMS0yRk2LCjsdeL wFfddjQUG5kiRYzX+sD3hInA/Z655ubQJQih2LStcpb+TWuRGT1L8O53Elzr4kutHLj7 ASw/CV3odkFXG0g0v+x9CNtNk90iMnU93n54mUmJuWsLSCoc/8+Qp5SG03NMXVJ6tz1M dIGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q1CkdT3G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si1752848pgq.553.2019.02.08.03.06.10; Fri, 08 Feb 2019 03:06:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q1CkdT3G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727585AbfBHLFz (ORCPT + 99 others); Fri, 8 Feb 2019 06:05:55 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:42999 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbfBHLFy (ORCPT ); Fri, 8 Feb 2019 06:05:54 -0500 Received: by mail-ot1-f68.google.com with SMTP id v23so5123632otk.9; Fri, 08 Feb 2019 03:05:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zXHJqO5kYdjQIh175jjIQKAv0+RlFrvNTrEMg/QvCfA=; b=q1CkdT3GUZ3b7Z3nwBJDE1alMUot9pL3oER2gLKbm82fHG2DwfvlGc+V4LIzcsyKXv iYUexP6/wb8/qGLE5nLDriylW2y+LLsMTAuUffB3qjNj4efdT/Z8CUqV+EP5TAtNRcJN H4Vo9hTnylDzQm30dzhiX1i+sQHG2r0mlCVvmuqPNVfJKficuN9bab6UyF45QJNduEwM Y+lVE6d8fjcAZ6WUuuqYANbJbGWMHArecOryxV44RUvVCfw+IKKVDq207M5JYjPoBCfX tngzEUzhf9j9T3x7CDOc/IsGSwgecykDcORQ9Kehqoq2ac5JrTpsNVPUsjmoD5Jy611M CMaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zXHJqO5kYdjQIh175jjIQKAv0+RlFrvNTrEMg/QvCfA=; b=RG8qV35HazEh1jzmzdJJnc6eGyIDy4ssYnEBSbm+Q8bLalPSY86QZ7KPvVk+mPXxaa nJ3nOYA+v53iEVbp95JWIMF2FkT5zTtLuluLUQuoC8fB9jFPUqzKOM9TqBArfbQFzIAE vybQc8oilG/C5hx5U9Ff6d8V01/rQrxwQzQtUkvXErGBfcuLilMmMmXhkOGQB46Caq01 IBscnywND5ubSskiwECA/OV2RlsRRZ/GdyuuvppOPEMZZQc2940XLyY8uSGx0yD29C2B q2zmzlavh9exDqwgs7GYQXK4mV6pHAk9Zz8jmt3A9miSoPRosJfMdqaTJMYtEnNrbz48 XmZA== X-Gm-Message-State: AHQUAuZMFuEQVDWTg0KQLfon3FuExYl1XB/IoLKvB7jueiKrVSJt++cZ +wTdb+k16sHMe77ToQTOS1Gk86IjuU67hcs+IppW3g== X-Received: by 2002:a9d:3bc7:: with SMTP id k65mr12612365otc.11.1549623953921; Fri, 08 Feb 2019 03:05:53 -0800 (PST) MIME-Version: 1.0 References: <20190208024110.8021-1-allen.lkml@gmail.com> <20190208083808.GB2803@osiris> In-Reply-To: <20190208083808.GB2803@osiris> From: Allen Date: Fri, 8 Feb 2019 16:35:42 +0530 Message-ID: Subject: Re: [PATCH] Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element. To: Heiko Carstens Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > diff --git a/arch/s390/tools/gen_opcode_table.c b/arch/s390/tools/gen_opcode_table.c > > index a1bc02b29c81..468b70c85f62 100644 > > --- a/arch/s390/tools/gen_opcode_table.c > > +++ b/arch/s390/tools/gen_opcode_table.c > > @@ -138,7 +138,7 @@ static struct insn_type *insn_format_to_type(char *format) > > strcpy(tmp, format); > > base_format = tmp; > > base_format = strsep(&base_format, "_"); > > - for (i = 0; i < sizeof(insn_type_table) / sizeof(insn_type_table[0]); i++) { > > + for (i = 0; i < ARRAY_SIZE(insn_type_table); i++) { > > This does not compile. > Surprising. I try it out again. Thanks. -- - Allen