Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp832816ybh; Wed, 18 Mar 2020 09:57:20 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsldMqtZ2UQy2YB3PtXF4O6bFoaB9nd67X4XJTNZrZT1BYKQw78xmSQHZ5y+gMyb+hMOD/4 X-Received: by 2002:a05:6830:22c3:: with SMTP id q3mr4543943otc.212.1584550640273; Wed, 18 Mar 2020 09:57:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584550640; cv=none; d=google.com; s=arc-20160816; b=M4/8zqxdd0w6P3rXic0U2XLg41Glhuc4/X5c+JYdYiCjHBuT2pap69TaU32Wx8XmmA A1WS9NgVeCWv7pkIW3rJKYvRLLM4llwJwHhgqRqZawsTFeB6hMfw4OhLT02zmD4/8Tq+ v0JJM6+VrmMTCl5HtaDdsCOuF8oqCdxC5/Heo+Rn7EOyYI0Z1Kzrt56nmDZk65M9J1Pp K2ds/idTaKb7vq8NpEMSlwYtMDtKPRpQMvXf1owbLTdiYnmoz8B94Ehyjc3fYKkk32ea 46lu2z+i1i5lZ2SHNoJB0nDhc1kfFHgwnaHEW/m8yGSCU2+hyjaJidPQ9w4dkB+9c7XQ 0yDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:user-agent :in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:dkim-signature; bh=3Jc/bXiJRIl3wxf5p4mBvrf14i7J/lOHjYGp0b9ahJk=; b=CfZeV3SScjQAGVE+6rssnURnpKz+frbHPlPpF/liBpIejywXhN1OXa8hMsHr7jD2mq URtqUjK3/7TgENxZblLcJjpY2htnszvtxB+BilBG+kRGP9edjNjnSc/dLfX8GkB2GcoT c1HEGwfD48owhbUIaGY2GbAIgXJOXmenckclWH5mOfjQw/bUJVcqM3B7aHiphgjS7zIR xhqlvOBm4fCu5vJ2XkK2lpIJkWTl77xhI+wdUxu0k+qn8GYYU2qPNVUj9KBs1fwDK0sT 4CnX6Y/cT99jo3dtgelBjrTRrn1lut2Nvl4jOZRUGsJkNtZTHODV8ulb3QvQfRdYQnEj cRiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=dK0+c9bo; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a64si3740612oif.256.2020.03.18.09.57.06; Wed, 18 Mar 2020 09:57:20 -0700 (PDT) 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=@gmx.net header.s=badeba3b8450 header.b=dK0+c9bo; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727092AbgCRQ4a (ORCPT + 99 others); Wed, 18 Mar 2020 12:56:30 -0400 Received: from mout.gmx.net ([212.227.15.19]:55351 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726506AbgCRQ4a (ORCPT ); Wed, 18 Mar 2020 12:56:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1584550581; bh=0MdBDKZz6fAY+TxmYNydSRzfwOCiMYDTnxPndAe+j4Q=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=dK0+c9bodfi/UD+GXonEXV/+EuPu/xlrqke8n6qddhPLbMyAalxXfPmDwh8jbHSEf cue9GD8VPgefO7Vgffi1C7TP6KQgX+fq2jrc5acJQQX7E46k+EUtTKSNO3H+I1joZe Y4XWR6f8s5LbHExDIVshXz1TCm6f7dAeLD0JxLFc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from ubuntu ([83.52.229.196]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MN5eR-1iyKBs0Smr-00J5i8; Wed, 18 Mar 2020 17:56:21 +0100 Date: Wed, 18 Mar 2020 17:55:52 +0100 From: Oscar Carter To: Dan Carpenter Cc: Greg Kroah-Hartman , Forest Bond , devel@driverdev.osuosl.org, Malcolm Priestley , linux-kernel@vger.kernel.org, Gabriela Bittencourt , Colin Ian King , Oscar Carter Subject: Re: [PATCH] staging: vt6656: Use ARRAY_SIZE instead of hardcoded size Message-ID: <20200318165551.GA3082@ubuntu> References: <20200314164754.8531-1-oscar.carter@gmx.com> <20200317104506.GA4650@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200317104506.GA4650@kadam> User-Agent: Mutt/1.10.1 (2018-07-13) X-Provags-ID: V03:K1:8++pG89+OeDxgjT4Ibi/oYjl/3FVbtlFRCbf4uoQNXTO+XfK1E5 yfGqKA7GGA+WaQrsr73Zu8WuLeRJezvcZXnc1DAzqsFYVjtUVXL8+47Mi7ljvG3fRmCRXPO Tt8HrqjROp+LjLR1++C3pLWS7PzeEjgBjTKfcx7VG7POBzkD295JATuKLD1pvhAYF5ybQdZ lZZ+m7lPavTWxinXgY3Xg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ZP2cT0rRTB8=:rgGD80Q77COxrZbszR8WG0 7J3dZ5fgjwZbmIiQS2yh8b4cW2Vu5tA+03HpV5G66t3pfc4XDQYH0ANHYXRUROqneuLOx5PqE 1nhAqI+MnnStIhBYRFQ68Eqpsfg1tqkpVh8hXUPxVwCQomqzmlVwxYoDzRWjRdaLxqnWlFmaQ bkgBoIYYk7nOPlCrpB5CBC1VW3VTMhgfYviLnYnuyhaUhvSlIG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Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 17, 2020 at 01:45:06PM +0300, Dan Carpenter wrote: > On Sat, Mar 14, 2020 at 05:47:54PM +0100, Oscar Carter wrote: > > Use ARRAY_SIZE to replace the hardcoded size so we will never have a > > mismatch. > > > > Signed-off-by: Oscar Carter > > --- > > drivers/staging/vt6656/main_usb.c | 8 +++++--- > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt665= 6/main_usb.c > > index 5e48b3ddb94c..4370941ffc04 100644 > > --- a/drivers/staging/vt6656/main_usb.c > > +++ b/drivers/staging/vt6656/main_usb.c > > @@ -23,6 +23,7 @@ > > > > #include > > #include > > +#include > > #include "device.h" > > #include "card.h" > > #include "baseband.h" > > @@ -116,6 +117,7 @@ static int vnt_init_registers(struct vnt_private *= priv) > > int ii; > > u8 tmp; > > u8 calib_tx_iq =3D 0, calib_tx_dc =3D 0, calib_rx_iq =3D 0; > > + const int n_cck_pwr_tbl =3D ARRAY_SIZE(priv->cck_pwr_tbl); > > Please use ARRAY_SIZE(priv->cck_pwr_tbl) everywhere instead of > introducing this new variable. > Ok, I create a new version of the patch and I resend it. > regards, > dan carpenter > thanks, oscar carter