Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2573876pxu; Mon, 7 Dec 2020 09:51:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgj7mWXX12uL/3zIgYWOZ6E6TvR9MLUBA2Kdig2XDw6RezyVmWejA2CNtn6XK/Viq04E/s X-Received: by 2002:aa7:c388:: with SMTP id k8mr4120596edq.36.1607363502507; Mon, 07 Dec 2020 09:51:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607363502; cv=none; d=google.com; s=arc-20160816; b=ugsS4MhkFCeXl7Px6HsHRxNqBBK8YWLpTAcd35n79eTUTaZqiMHuU2GimtMt7P+Zr4 Qt897CU9r8xdWBXc1bHygpQPXQHpnlcrsPe98vJneZgNqrsybWmJ+xZJE/jhUJYOZsDI onD/whHYi2IpX5wt3TarWKcQoynNtH9fKVXU6+A/hzYRBV+psdWPYprnbdUBbheQxBoG FzaJ+FbwxkjP2NP9hsJlQL3aRqUluvHP656pt9JU5ZxnfgD5+lyjqXFo6F3IlC8x5Yf9 Nd9Y+kJtXniX8Pbu3nQJksUpxy/JQpM387PSdWnN+m0qRmybMcC+iVo7XTdKpMbOZGlX 6oaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=LucxWuNl92sSNOyZYN2zlM7x9Jop/bDTI1uWBDDDaR8=; b=ryrQHONNSHqBcwCAXrkjhFHbL/BnVFMRrIby7oop6vkpRlQla8okxydgt2yU6mjLb1 so0lmyfJmYphN9q0AZh07fR9dYW71/X9wT2XFe9XK5JsrwYsBkiotCsIbPmqV47CgzTy KT3bceqxiiZuYxXqtg/K9+3Pe7F20JasLlJT51FlQVKL4MjYv+031kWvW927ZHnh/m/C xk1uZytiuE91t/jGzQzblNktJ5OEJZ7NyidVBNetNaBocbsfOhH2u483VWV6sfhCLMYv QjM/PuzyvSKgPMTC1zDDgjd0g7t/dwoPPf6tYzJqs7kt4CcbUdcACZNugVCvZwYV/DVG gklg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t19si6852126eji.402.2020.12.07.09.51.19; Mon, 07 Dec 2020 09:51:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726337AbgLGRsj (ORCPT + 99 others); Mon, 7 Dec 2020 12:48:39 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:58364 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726247AbgLGRsi (ORCPT ); Mon, 7 Dec 2020 12:48:38 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from vadimp@nvidia.com) with SMTP; 7 Dec 2020 19:47:48 +0200 Received: from r-build-lowlevel.mtr.labs.mlnx. (r-build-lowlevel.mtr.labs.mlnx [10.209.0.190]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0B7Hll1Z001902; Mon, 7 Dec 2020 19:47:48 +0200 From: Vadim Pasternak To: andy@infradead.org, hdegoede@redhat.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Vadim Pasternak Subject: [PATCH platform 1/2] platform/x86: mlx-platform: Fix item counter assignment for MSN2700, MSN24xx systems Date: Mon, 7 Dec 2020 19:47:44 +0200 Message-Id: <20201207174745.22889-2-vadimp@nvidia.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20201207174745.22889-1-vadimp@nvidia.com> References: <20201207174745.22889-1-vadimp@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix array names to match assignments for data items and data items counter in 'mlxplat_mlxcpld_default_items' structure for: .data = mlxplat_mlxcpld_default_pwr_items_data, .count = ARRAY_SIZE(mlxplat_mlxcpld_pwr), and .data = mlxplat_mlxcpld_default_fan_items_data, .count = ARRAY_SIZE(mlxplat_mlxcpld_fan), Replace: - 'mlxplat_mlxcpld_pwr' by 'mlxplat_mlxcpld_default_pwr_items_data' for ARRAY_SIZE() calculation. - 'mlxplat_mlxcpld_fan' by 'mlxplat_mlxcpld_default_fan_items_data' for ARRAY_SIZE() calculation. Fixes: c6acad68eb2d ("platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface") Signed-off-by: Vadim Pasternak --- drivers/platform/x86/mlx-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c index 6a634b72bfc2..b30ebd17f3de 100644 --- a/drivers/platform/x86/mlx-platform.c +++ b/drivers/platform/x86/mlx-platform.c @@ -456,7 +456,7 @@ static struct mlxreg_core_item mlxplat_mlxcpld_default_items[] = { .aggr_mask = MLXPLAT_CPLD_AGGR_PWR_MASK_DEF, .reg = MLXPLAT_CPLD_LPC_REG_PWR_OFFSET, .mask = MLXPLAT_CPLD_PWR_MASK, - .count = ARRAY_SIZE(mlxplat_mlxcpld_pwr), + .count = ARRAY_SIZE(mlxplat_mlxcpld_default_pwr_items_data), .inversed = 0, .health = false, }, @@ -465,7 +465,7 @@ static struct mlxreg_core_item mlxplat_mlxcpld_default_items[] = { .aggr_mask = MLXPLAT_CPLD_AGGR_FAN_MASK_DEF, .reg = MLXPLAT_CPLD_LPC_REG_FAN_OFFSET, .mask = MLXPLAT_CPLD_FAN_MASK, - .count = ARRAY_SIZE(mlxplat_mlxcpld_fan), + .count = ARRAY_SIZE(mlxplat_mlxcpld_default_fan_items_data), .inversed = 1, .health = false, }, -- 2.11.0