Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3421067rwb; Tue, 16 Aug 2022 02:42:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR5l+AQ+dfGRKR7Ktf7rpc7pKV3yp0FXr2J6GMxuC4v3Kv6n7TZF78emLJTvmuyTP7RbAavg X-Received: by 2002:a17:907:6818:b0:730:825d:7296 with SMTP id qz24-20020a170907681800b00730825d7296mr13423176ejc.21.1660642979641; Tue, 16 Aug 2022 02:42:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660642979; cv=none; d=google.com; s=arc-20160816; b=x7MzV6C0Q7DXyNWcou2ojNPrAfea0bNzsWMVA+U+rQZ6rC4dDQCuYbIyEOMUa6l6T7 O30rqjRmiqUCdjHkfvUcfK/GToddotay+mtG0ZCAwOGtIIzFApI6aMcjMTOtbdvo8teU 6AEgRRqlLTR+zOhCHVqTIqDef95xVu83okK3NdspqB/ap/A+7J9ve2pEyvv4prDEknyg otGmjPMkpWiJ9GIVKp268v+FZQC6KJ6OVKyyfLIqLZq9X0LIjL+giBPCAzY6iD6NrSbJ 9ld4/YjFQ+qkJVmfa7JJ0UkmDgTJEYR3d+4J+3FKBkRll0kF1sfIZeB35DO118/eKf1b ynKQ== 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=9K9d4IjBMmcloaT+QG5eIvNYUR3xOoTYrU9248uTcL8=; b=v/frjwGf+IM3reYFS9P8zwG+k7Bphbx/CngGrnQVPtyiHaU+ggcu4rmKO7xKmaJX2g zX0nfxdaTkTLoBuXmZX7DQPRvtacYnafBNS64yHMvPBcvA6ezUKqHdLbb+7wWuIo2dkv 2og3ENYZm1hDsQeCOmi0o4dUS4x24MZ8utoWYLDfGnmAF7SAqZwoxWZPpR9OmECE9X12 J3gXx3NWw0sOVYcFi2xipa0s04JL2TGzre8qDW649R5PtEBpTaVOlbzDGZW2pyeAsPgM Q+8xycmPTNYNN4nQEu5YjLqQs+CB3UbtzK/CG4qQxrFGWnFuaSxufOwdhedzr7vtSd3A MqXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=RL1BBWbh; 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 qb40-20020a1709077ea800b0072b1b099d55si8716357ejc.268.2022.08.16.02.42.32; Tue, 16 Aug 2022 02:42:59 -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=RL1BBWbh; 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 S233593AbiHPJlP (ORCPT + 99 others); Tue, 16 Aug 2022 05:41:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233595AbiHPJj7 (ORCPT ); Tue, 16 Aug 2022 05:39:59 -0400 Received: from smtp-fw-6002.amazon.com (smtp-fw-6002.amazon.com [52.95.49.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C5551367D7; Tue, 16 Aug 2022 01:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1660638494; x=1692174494; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9K9d4IjBMmcloaT+QG5eIvNYUR3xOoTYrU9248uTcL8=; b=RL1BBWbhtBKQW143Cw1JhTGrLvoKQipy+ui9/EbVUs3CNtXKlTPd0E5v amz9Yp646NL4g0tO9thkRTTRu6yj+Y5cOoeDH0VQAsCDk7TUobJwJXQ5W 9vXsKGe/ynp8s55DIybFpjF8MOyOdxTQCXTTSMDvYMlQmq9R0MLbT6Yl1 8=; X-IronPort-AV: E=Sophos;i="5.93,240,1654560000"; d="scan'208";a="233486519" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-pdx-2b-31df91b1.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-6002.iad6.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2022 08:28:00 +0000 Received: from EX13MTAUEE002.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2b-31df91b1.us-west-2.amazon.com (Postfix) with ESMTPS id 14069450A1; Tue, 16 Aug 2022 08:28:00 +0000 (UTC) Received: from EX13D08UEE001.ant.amazon.com (10.43.62.126) by EX13MTAUEE002.ant.amazon.com (10.43.62.24) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Tue, 16 Aug 2022 08:27:59 +0000 Received: from EX13MTAUEE002.ant.amazon.com (10.43.62.24) by EX13D08UEE001.ant.amazon.com (10.43.62.126) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Tue, 16 Aug 2022 08:27:59 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by mail-relay.amazon.com (10.43.62.224) with Microsoft SMTP Server id 15.0.1497.38 via Frontend Transport; Tue, 16 Aug 2022 08:27:59 +0000 Received: by dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (Postfix, from userid 14301484) id 5F4D64C55; Tue, 16 Aug 2022 08:27:57 +0000 (UTC) From: Eliav Farber To: , , , , , , CC: , , , , , , , , , , , , Subject: [PATCH 02/16] hwmon: (mr75203) update pvt->v_num to the actual number of used sensors Date: Tue, 16 Aug 2022 08:27:43 +0000 Message-ID: <20220816082757.11990-3-farbere@amazon.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220816082757.11990-1-farbere@amazon.com> References: <20220816082757.11990-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, 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