Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4570999rwe; Tue, 30 Aug 2022 12:35:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR6VkwNdDf6fDwi9/F+BU8PL/HmTT4TarFqEaCsUn9io8DmZTsYUQ73TNySNt29fG+nTBM7y X-Received: by 2002:a17:90b:4b86:b0:1f7:6fbf:116 with SMTP id lr6-20020a17090b4b8600b001f76fbf0116mr24654204pjb.56.1661888100843; Tue, 30 Aug 2022 12:35:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661888100; cv=none; d=google.com; s=arc-20160816; b=CZYMmyxfgyaXJfyL7bUw8gyy7wP4omevYRFjG6886WZCWl1lK2273NnIL/BbPIvacJ RXHk+JUeW+gF2knMe33GRq7KcjBCdkibsn+rWQA/9WNcS9XK7pPkUboamloXjkuY4RUq zgIgGHujYSWXyCcshsX4EFKJEcT0PGHw3xDrBiaTHaC0AiVDfdl4gX1EK1kxjYtohJJo pDPtKUWZWd2wW/2MyLUCQt+bfbEEHCewEK+guHBLFZOehYxZoHCkVyx02o3Vjr+mRdCE KvPZxSrwEtWZkVHrIejD5i+8wqnHyLoCIu3nuASTHKBoWVLlRejxqjrHujMJYq14HgNr HMVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dUAtUowfndtQUTld7zE3vvVQEMIwQJ09YELan4asaoM=; b=yiOnNYV3UyzM2HSPA/7NYSPwMVbJKC0rK8UZrUOa80F9O1WngNwI3xAo5JjyqvBrT1 CNmS2fWzD4njjfCxK+b0P0WqgH/IIlYn1+xVwd7LBAhYXVPyHgapYlkCgVyM4+DPACTa PlPay3KIvWw3MXedmAybFvowbMG8uN2tmpnBf2Yf6KGb35TUvCyPZfg6gyFGq0hcPZ2z LA0uJesNvJrF4rnTd1utTTRVirZX7Ur39b1x8NwW31btYcP5OMjX3P5XwwyRKAxQGHbd 7EbSrePYS/EVet8zrr2kv7LPojv6hMZUx27/k7FZ0iLuAGG/3WKTLl0J2EyajCNfeygZ uN1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=OytGhpZi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h15-20020a170902f54f00b0016bf8021664si13611117plf.203.2022.08.30.12.34.47; Tue, 30 Aug 2022 12:35:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=OytGhpZi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231124AbiH3TWb (ORCPT + 99 others); Tue, 30 Aug 2022 15:22:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230330AbiH3TW3 (ORCPT ); Tue, 30 Aug 2022 15:22:29 -0400 Received: from smtp-fw-80006.amazon.com (smtp-fw-80006.amazon.com [99.78.197.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BA4279A41; Tue, 30 Aug 2022 12:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1661887349; x=1693423349; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dUAtUowfndtQUTld7zE3vvVQEMIwQJ09YELan4asaoM=; b=OytGhpZiE1ELjuy+aqrYQlFM8S7u5AaLmmtaXCmbcZe/ypaJYyvN0atz Ymn5IxZzMQ4qQR8Jm7MdoFZdSXAFZbS4lf7aGLPtvac27T4dydtgsFSj5 xZkjWhYMvIGvkKfdAc+rVUiXrzfYsMMdxWwMEt+Qi/q6zcHFGqD51gu2W 4=; X-IronPort-AV: E=Sophos;i="5.93,275,1654560000"; d="scan'208";a="124960444" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-pdx-2a-6a4112b2.us-west-2.amazon.com) ([10.25.36.210]) by smtp-border-fw-80006.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 19:22:17 +0000 Received: from EX13D37EUA002.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2a-6a4112b2.us-west-2.amazon.com (Postfix) with ESMTPS id 76EE84C014E; Tue, 30 Aug 2022 19:22:16 +0000 (UTC) Received: from EX13MTAUEB002.ant.amazon.com (10.43.60.12) by EX13D37EUA002.ant.amazon.com (10.43.165.200) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Tue, 30 Aug 2022 19:22:15 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by mail-relay.amazon.com (10.43.60.234) with Microsoft SMTP Server id 15.0.1497.38 via Frontend Transport; Tue, 30 Aug 2022 19:22:13 +0000 Received: by dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (Postfix, from userid 14301484) id 60EB84D48; Tue, 30 Aug 2022 19:22:12 +0000 (UTC) From: Eliav Farber To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [PATCH v3 03/19] hwmon: (mr75203) update pvt->v_num to the actual number of used sensors Date: Tue, 30 Aug 2022 19:21:56 +0000 Message-ID: <20220830192212.28570-4-farbere@amazon.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220830192212.28570-1-farbere@amazon.com> References: <20220830192212.28570-1-farbere@amazon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This issue is relevant when "intel,vm-map" is set in device-tree, and defines a lower number of VMs than actually supported. This change is needed for all places that use pvt->v_num later on in the code. Signed-off-by: Eliav Farber --- drivers/hwmon/mr75203.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hwmon/mr75203.c b/drivers/hwmon/mr75203.c index 0e29877a1a9c..f89f7bb5d698 100644 --- a/drivers/hwmon/mr75203.c +++ b/drivers/hwmon/mr75203.c @@ -605,6 +605,7 @@ static int mr75203_probe(struct platform_device *pdev) break; vm_num = i; + pvt->v_num = i; } in_config = devm_kcalloc(dev, vm_num + 1, -- 2.37.1