Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp601560lqp; Thu, 21 Mar 2024 09:57:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVXqB9BHxlxZYFkmFJvtqqjDNt5Y37ohy0oVhfQUd3+Dld8IdgLFJ76+pBuDPHoiippqwRTHepJNPnu2iNLATW8isX/1c1hv4D6hJGitQ== X-Google-Smtp-Source: AGHT+IFceFVORsKfmNkLuHAwfZRvkh9lEJH2CzrF9ebMGiUCqA53wmA+sy2SKbyeHA0A+curWNnC X-Received: by 2002:a05:6808:1523:b0:3c3:87c0:7369 with SMTP id u35-20020a056808152300b003c387c07369mr14126429oiw.7.1711040247905; Thu, 21 Mar 2024 09:57:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711040247; cv=pass; d=google.com; s=arc-20160816; b=uOmTXzXkzluUJs148QB/uMXLTBp3tNzGyT9n682yiPGt2akIspqTPxixOrd8Zq4bpl hcQRn1IZnE6SnJ6a/BhQOvRX1LDJaedEEukBjlGzPDTYuxvXA8F2pGJldwZnECQ1VY4Y OlbOy2HcGHEXj0Fubse9xm4mHos/ejnqWAfHv+avaKBOVLayd++FcYatxoZ9kTy8uh95 jkcSBrScCerCI5fTMWhsGhR2O0tfC547y4BpArsyiuW40dwkXnPDsGJ2dPmUx2kc3fBm CAa/jnrPe4c/B0s1YfpIE9tEv1uNz8Mklp1Q/AlQGm+icbxeU/+9OKLXEkktxgx4jGgO q73A== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=r2m1IFOo39rYh7Yqg1o38OZbzAZc486wtJtHt6GKQN8=; fh=brpjwxOwI0fXFKs1/nTftrzAkABRsmQeA8j4LIXACBY=; b=sptqZbwniXeSYO1hU60Lt6jOQVdKXvdhW5Tl2pmD12yr8WFqcxwxbehp3k4RbDQKIS ySk7x12RNO1lvh2KrROVaedjNb/WPGHg72IPSPObqcXbkbGuWyi56bS3gxkppiGNVja6 3JAw6aDJzyvSb5OowXFN+JdIpUHYkc0vQbMoE74zpHjUeODGVUS2jLKol/LSuRdh98Lw A99q7weNIi6RqBx2zkUdJI2XX6ycIexRIS1SqXDe28ZWBD3mgkeojWd5QSxy+27Rp4Uk On3rewloBAERL+lK9aTya/6Ii1R3twHNlVVE6h+3KtiswXWKjI89cxdubjhJpGRbFXFT mFDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ispras.ru header.s=default header.b="e/IoVVTm"; arc=pass (i=1 spf=pass spfdomain=ispras.ru dkim=pass dkdomain=ispras.ru dmarc=pass fromdomain=ispras.ru); spf=pass (google.com: domain of linux-kernel+bounces-110408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g11-20020ac8580b000000b00430b72a1328si106373qtg.128.2024.03.21.09.57.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 09:57:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-110408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ispras.ru header.s=default header.b="e/IoVVTm"; arc=pass (i=1 spf=pass spfdomain=ispras.ru dkim=pass dkdomain=ispras.ru dmarc=pass fromdomain=ispras.ru); spf=pass (google.com: domain of linux-kernel+bounces-110408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ispras.ru 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E82D71C2339B for ; Thu, 21 Mar 2024 16:56:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 38F58135A7E; Thu, 21 Mar 2024 16:47:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b="e/IoVVTm" Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28BC5135A44 for ; Thu, 21 Mar 2024 16:47:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.149.199.84 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711039667; cv=none; b=GxQ7HBkME02e/abU3rT7oD/5LDBB3sDFydGnvFNtrhT9x8i4bgK2Epjl5zaK5enuHmX5RxqkbvNIXCr1vD52r+j8DdefZu3C4PzOPMNQ3pSOrbdbof4+ADH9Gh8EOSXIq2WBd1PvvTrbdh64Xk6cfdzB/Oydy7MXkwVS7XVfWrc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711039667; c=relaxed/simple; bh=/D5CQh4Eg1MhDFUZ7iYEj/DbReP3vFnJJrBiJS67l3g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jk17+6X9Hq8P/kxPB2lVf7tIjKL9ObNgsnXN7vfyTQSXDEm+XWbN7YRNX5C+tFE9ZN1XIEXzjub1YFvu2F7lVon/uixrIpP8EK22BkOJibG/WbOFoMNI07IyW9APpvPs+oYgA03/N8E53H+otKVe/UO4nBAaz3rdOYGqifb8B3Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru; spf=pass smtp.mailfrom=ispras.ru; dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b=e/IoVVTm; arc=none smtp.client-ip=83.149.199.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ispras.ru Received: from tundra.lovozera (unknown [83.149.199.65]) by mail.ispras.ru (Postfix) with ESMTPSA id CB3A74076740; Thu, 21 Mar 2024 16:47:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru CB3A74076740 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru; s=default; t=1711039655; bh=r2m1IFOo39rYh7Yqg1o38OZbzAZc486wtJtHt6GKQN8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e/IoVVTmJcjYmoIvO2d8hMVtfnMzisXAIkALho404ABalv/p1MYVojBoqBYofIZCU 6OsYZtHgKk26MxAe/VkoFI4rcAY0B0UlTSUPWs+cXZH6nAR7QgVRbtwhpxKZrB1rmh IVgkNjmcazOJjWGj9olJPuX826H8+xk551pjtIgE= From: Mikhail Kobuk To: Miquel Raynal Cc: Mikhail Kobuk , Vinod Koul , Kishon Vijay Abraham I , =?UTF-8?q?Marek=20Beh=C3=BAn?= , =?UTF-8?q?Pali=20Roh=C3=A1r?= , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org, Alexey Khoroshilov Subject: [PATCH 2/2] phy: marvell: a3700-comphy: Fix hardcoded array size Date: Thu, 21 Mar 2024 19:47:31 +0300 Message-ID: <20240321164734.49273-2-m.kobuk@ispras.ru> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321164734.49273-1-m.kobuk@ispras.ru> References: <20240321164734.49273-1-m.kobuk@ispras.ru> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Replace hardcoded 'gbe_phy_init' array size by explicit one. Fixes: 934337080c6c ("phy: marvell: phy-mvebu-a3700-comphy: Add native kernel implementation") Signed-off-by: Mikhail Kobuk --- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/marvell/phy-mvebu-a3700-comphy.c b/drivers/phy/marvell/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_comphy_lane *lane, u16 val; fix_idx = 0; - for (addr = 0; addr < 512; addr++) { + for (addr = 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 -- 2.44.0