Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4441324rwb; Tue, 16 Aug 2022 23:08:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR5vDyiVZnxdM1zvxqD485Fe+XHPpA0k7YXQ7I9IfHzZ+PsyKffvFhYaRAtPB2bnAwD3dPdw X-Received: by 2002:a17:902:8343:b0:16d:d2ff:c91d with SMTP id z3-20020a170902834300b0016dd2ffc91dmr24421909pln.142.1660716492869; Tue, 16 Aug 2022 23:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660716492; cv=none; d=google.com; s=arc-20160816; b=zjnrf+8yq6ZSBMseZcvy3JTqUYmjHz47+XfHfbf4fB2WS7wwmKfoEdDjWB/uugQg5u wqkcNkCkxB7HUgfb9OXPy2tisZ2Jf7fL7Cc4xA4+1jaepWIJ5SmzBzBAp3PX+ygWQkvL 3/2do9XRTLnUaye4gg+GR4UtqZpSULz1vCagfXvxClUfuJpMQn4gfFVhdN42PMkE8X4A pTAypaBft5Xi+pqy8Zwvad8Z7kHug4WI4d6RPoFEMletQHie76SZ9aFJW9MSIhLW7XjZ M6aOFJsjzFwGqGcAbQ8jJGmEGNfAqVgNl+HEQbSaqC9fyjSPPfsyx8cbV9tvMtgNM4FF q8nw== 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=0F7/hXt20fjj0UKgvMOUsmS9XWfFqhwb84KuPdCTX8e6IZO3tbAp3Pmq8svh4Fka51 iGbvEfFqUioby8F7Ym/J5VJRbb2z8a8rQAk9B1MXhKZ/ojLy39w1m7va1jKTxr3JUttJ iw21k1PcUmkEX9GdFlgHBfwKaOi6lkpn2n5AsTpFSGLS1vvcqHPpoZn/c4u8zjIvfNnR IgM1JMCwsc1EqSDI4OaMbKswIpulcoau7Uf/kN1oJ0clOXXGSjODGgnvOyJ121Q60AeU S7a0Z/c5pZkp1ssxN2vej0iOs+4sMeSpfYhtqCe/3H4CmWWNRk+l5Is7uIyjkYJsjjLi Hlng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=dQZK134k; 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 z6-20020a170902834600b0016ee1c1df80si496050pln.366.2022.08.16.23.08.02; Tue, 16 Aug 2022 23:08:12 -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=dQZK134k; 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 S238787AbiHQFoz (ORCPT + 99 others); Wed, 17 Aug 2022 01:44:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238610AbiHQFoQ (ORCPT ); Wed, 17 Aug 2022 01:44:16 -0400 Received: from smtp-fw-9102.amazon.com (smtp-fw-9102.amazon.com [207.171.184.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B9B27CB6C; Tue, 16 Aug 2022 22:44:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1660715040; x=1692251040; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9K9d4IjBMmcloaT+QG5eIvNYUR3xOoTYrU9248uTcL8=; b=dQZK134ka3Ye9p+j7oDTxSvDCKdwcW2fvQXwVPHcJcH2ubl1uZTgN/Lf hEKiMIVFXfEeB8hRcdD2Ay5lZ3F6R86AomeCND1/ASODY78BJ363KMoH+ EvN+Dh7mA0XJvWGN+BOechV6cdWpy/32862sdTQjKCYbhSFxCBJ6BfiVs Q=; X-IronPort-AV: E=Sophos;i="5.93,242,1654560000"; d="scan'208";a="249710571" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-iad-1a-b09d0114.us-east-1.amazon.com) ([10.25.36.210]) by smtp-border-fw-9102.sea19.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2022 05:43:45 +0000 Received: from EX13MTAUWA001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-iad-1a-b09d0114.us-east-1.amazon.com (Postfix) with ESMTPS id BD6208151C; Wed, 17 Aug 2022 05:43:42 +0000 (UTC) Received: from EX19D013UWA004.ant.amazon.com (10.13.138.207) by EX13MTAUWA001.ant.amazon.com (10.43.160.58) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Wed, 17 Aug 2022 05:43:22 +0000 Received: from EX13MTAUWA001.ant.amazon.com (10.43.160.58) by EX19D013UWA004.ant.amazon.com (10.13.138.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1118.12; Wed, 17 Aug 2022 05:43:22 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by mail-relay.amazon.com (10.43.160.118) with Microsoft SMTP Server id 15.0.1497.38 via Frontend Transport; Wed, 17 Aug 2022 05:43:22 +0000 Received: by dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (Postfix, from userid 14301484) id 6F16B4C4F; Wed, 17 Aug 2022 05:43:21 +0000 (UTC) From: Eliav Farber To: , , , , , , CC: , , , , , , , , , , , , Subject: [PATCH v2 02/16] hwmon: (mr75203) update pvt->v_num to the actual number of used sensors Date: Wed, 17 Aug 2022 05:43:07 +0000 Message-ID: <20220817054321.6519-3-farbere@amazon.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220817054321.6519-1-farbere@amazon.com> References: <20220817054321.6519-1-farbere@amazon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-14.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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