Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp953415lqp; Fri, 22 Mar 2024 00:27:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVRCIjNwv1x2N2Cmq6576A1DD+6lIGx1f9m0515jY9J2+zDPyYAd0zbnYmx46YWncRTPIpdJLQZP7wUxfnldPKjUI141t0xk1uY1OqUQg== X-Google-Smtp-Source: AGHT+IGbUNvcpJKPBYhR9VWotSIox5tRnlC57ZjRj8uk5ugl80WZRNxVWUrTF7liLXHq3qxHYzv8 X-Received: by 2002:a05:6a20:1b15:b0:1a3:8d1a:6bca with SMTP id ch21-20020a056a201b1500b001a38d1a6bcamr1697953pzb.1.1711092425106; Fri, 22 Mar 2024 00:27:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711092425; cv=pass; d=google.com; s=arc-20160816; b=iMvgkr6ztJVOXUwqTJQbVrAMaEJrPO+oKzUQbwPU8CAVtJ88nnLrvHEyh/OcWy4Blc Bd5l/Jpr9XswRBnGRl3wJf/ZoM7SLGoBclaDCiQE5+VKOPSBiOpik8kLXsG/015CbTt6 qDbz7fMqUsK12DsgPK0vjKo9pFUalSbJWfz7vzYqUkl1gJvyr8spYcsP4yrkIIZ3XPKO T1GG7y++jjRNa6ZqecJzomHmHRd9WW/k2FXLoz2oz04Gzux4P9Jz43jPM2vo4eSPwlbC oYGciwUC1Mt9FLpnXVjFmJtwMuET1+KoDfQIYgQCE8EK3Ic1Xe2MszzJ0qJGQ9vNUlVV nolw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=lQmTusbOmMSSaBgpQThp7ZrEL7/j9/5tVlOksabCb8Q=; fh=cJZmZljdVBshPtZtpNvYPFQ0cQzxnlYd3tPCV/pptVk=; b=vYHHGsnAmUAra7LVx657+illQKICKoiq6ne6R76DsgTP3zhJL2d3Nj1jSaXfXevqKH /JKWuARSoogq4fhYgbY2Z6i5yrz1ZtfVIvyQWuFdGxEGeXzz/EiuT41tbfitMn8JGYsb 950A5beUFFN1+rHwB3oyjxo8/nfXHWM9lRnjTMB/hMhu8UFOydY4qE+q5JT6HSP2KOld dj8SjmlHB3Vd/cBdKRxMlVMdtcBf0xtKLLBS2RQgf412Ba12veIvmeAECr4Q977J0lCI jgONGWUtFUHxYsrUgRaYH2wlVCA07T1VpP9fCE+LG4aLpzwKdfPXD4jsoquSwEkMClq0 V4EQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=L1eE+UHY; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-111060-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111060-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e62-20020a17090a6fc400b0029c73d82d48si1461479pjk.57.2024.03.22.00.27.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 00:27:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111060-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=L1eE+UHY; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-111060-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111060-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C0F28283C89 for ; Fri, 22 Mar 2024 07:27:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B464C125C4; Fri, 22 Mar 2024 07:26:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="L1eE+UHY" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 626B1101E3 for ; Fri, 22 Mar 2024 07:26:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711092418; cv=none; b=foc+HY662N4zGmq4LYcuo+l8fFnZeD5luEUtph5nzXV44oJmw3He4tPHsmUJYAhSoIiMeDw3WQg9E+51boJKv4U/J2ctMkKAF0syIFTxMoETdGW6QEXAxIn+UuB+E5eSWAKAMrAh/ksxLHBR6IsSikIkBnQJWCArzSNU7hLMGNk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711092418; c=relaxed/simple; bh=f1MZe03oX4WFNKsFlfCt/ESOoXp43Si1Hmggvi3r3Ms=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WTb7jDGVPUXU6n1OPqyHOJ4EzUajbvWaZqcqgtsqzvJec03PV80/nkjQE6URIuiMWipkRpqnObM8d3X0KpIYK4ztWn/rrMAHYRvKAHmV9ePk4AszDfrICZIP/Umimm4bBS/8eqtIgP/c8ZSeX3ko8PV03nkZ8UKf5u871socCks= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=L1eE+UHY; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 4FEE4240006; Fri, 22 Mar 2024 07:26:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1711092408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lQmTusbOmMSSaBgpQThp7ZrEL7/j9/5tVlOksabCb8Q=; b=L1eE+UHYcFgfKp4UM/EZy1mC62JIry3PzwRfcrdzi8oR5i6fprdcPe/L0xltrb6+jzRUL7 j1tal/LT/rXn+AOAsubzJ5VBexbovqrD3vwqXeDReAPO0r4Vd1pYiUTHxybYduQeuqMaf0 Ep34Tx8uCwYA4t+InzIZCYGP7S0w/qxLfdhlEpUFbryEajFnCIdm/nYZT1L+ohZjHwjVuj eEzmriTN3eIV7DbfgVDMwGa1OTUzYSk32MqvZEf6idF4F4WftzSEoyROjBx6qqpm6b0ibv quJXJk0WGynqzQvNjC8bHKZvTX692+XbjJaC1A7+I9PLYfkqZBnIM9KYM69vaw== Date: Fri, 22 Mar 2024 08:26:45 +0100 From: Miquel Raynal To: Mikhail Kobuk Cc: Vinod Koul , Kishon Vijay Abraham I , Marek =?UTF-8?B?QmVow7pu?= , Pali =?UTF-8?B?Um9ow6Fy?= , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org, Alexey Khoroshilov Subject: Re: [PATCH 2/2] phy: marvell: a3700-comphy: Fix hardcoded array size Message-ID: <20240322082645.6c1d43b5@xps-13> In-Reply-To: <20240321164734.49273-2-m.kobuk@ispras.ru> References: <20240321164734.49273-1-m.kobuk@ispras.ru> <20240321164734.49273-2-m.kobuk@ispras.ru> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com Hi Mikhail, m.kobuk@ispras.ru wrote on Thu, 21 Mar 2024 19:47:31 +0300: > Replace hardcoded 'gbe_phy_init' array size by explicit one. >=20 > Fixes: 934337080c6c ("phy: marvell: phy-mvebu-a3700-comphy: Add native ke= rnel implementation") > Signed-off-by: Mikhail Kobuk > --- > drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/phy/marvell/phy-mvebu-a3700-comphy.c b/drivers/phy/m= arvell/phy-mvebu-a3700-comphy.c > index 41162d7228c9..15bf10710de0 100644 > --- a/drivers/phy/marvell/phy-mvebu-a3700-comphy.c > +++ b/drivers/phy/marvell/phy-mvebu-a3700-comphy.c > @@ -603,7 +603,7 @@ static void comphy_gbe_phy_init(struct mvebu_a3700_co= mphy_lane *lane, > u16 val; > =20 > fix_idx =3D 0; > - for (addr =3D 0; addr < 512; addr++) { > + for (addr =3D 0; addr < ARRAY_SIZE(gbe_phy_init); addr++) { > /* > * All PHY register values are defined in full for 3.125Gbps > * SERDES speed. The values required for 1.25 Gbps are almost 512 is also used where gbe_phy_init is defined, so maybe it would be worthe defining this size once and then use the definition in both places. Thanks, Miqu=C3=A8l