From patchwork Tue Jan 21 06:45:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lihuisong (C)" X-Patchwork-Id: 13945790 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73D671F1902; Tue, 21 Jan 2025 06:57:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737442662; cv=none; b=cImB/JjtJ4jqpJiD2QsZufchOxXUWnBjTS6x73vJKRRoE/FCronE3HVX7KZkL7DTikfqDRMQwHJSuHH9rDi952QF5pYvLpg9pJLIUja+RwYuZsveslmpPITp506pngB5DrWfEbxGRn0RshWsSoBRR/Y9R3gRSFzOr8cJtJkuADg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737442662; c=relaxed/simple; bh=CwGLieQ2c5AcvmBnAGimS4omrJne12mWQI1Y8WGlp2Q=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=utQVhgrm9mgJ26emQTz4EGa9GwKPN4LMJ+FPUx8raK20wKjixBXiMuQJ9lrsJuGNTPdkWiTFD80iEPS9rGUIufS6YXekIqiUqfk5wH7Q8YhCXRoMKaM1ybAfYH0fprKbl7FK2vzC6w7GNh29mDX27KxY3RFolw+lb0sf+qFRz9A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4YcdHx38Wmz22lhR; Tue, 21 Jan 2025 14:55:09 +0800 (CST) Received: from dggemv703-chm.china.huawei.com (unknown [10.3.19.46]) by mail.maildlp.com (Postfix) with ESMTPS id 5CED71402C3; Tue, 21 Jan 2025 14:57:38 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 21 Jan 2025 14:57:38 +0800 Received: from localhost.localdomain (10.28.79.22) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 21 Jan 2025 14:57:36 +0800 From: Huisong Li To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v1 13/21] hwmon: (mr75203) Fix the type of 'config' in struct hwmon_channel_info to u64 Date: Tue, 21 Jan 2025 14:45:11 +0800 Message-ID: <20250121064519.18974-14-lihuisong@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20250121064519.18974-1-lihuisong@huawei.com> References: <20250121064519.18974-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemn100009.china.huawei.com (7.202.194.112) The type of 'config' in struct hwmon_channel_info has been fixed to u64. Modify the related code in driver to avoid compiling failure. Signed-off-by: Huisong Li --- drivers/hwmon/mr75203.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/mr75203.c b/drivers/hwmon/mr75203.c index 7848198f8996..82d399b719a9 100644 --- a/drivers/hwmon/mr75203.c +++ b/drivers/hwmon/mr75203.c @@ -769,7 +769,7 @@ static int mr75203_probe(struct platform_device *pdev) u32 ts_num, vm_num, pd_num, ch_num, val, index, i; const struct hwmon_channel_info **pvt_info; struct device *dev = &pdev->dev; - u32 *temp_config, *in_config; + u64 *temp_config, *in_config; struct device *hwmon_dev; struct pvt_device *pvt; int ret; @@ -837,7 +837,7 @@ static int mr75203_probe(struct platform_device *pdev) if (!temp_config) return -ENOMEM; - memset32(temp_config, HWMON_T_INPUT, ts_num); + memset64(temp_config, HWMON_T_INPUT, ts_num); pvt_temp.config = temp_config; pvt_info[index++] = &pvt_temp; @@ -888,7 +888,7 @@ static int mr75203_probe(struct platform_device *pdev) if (!in_config) return -ENOMEM; - memset32(in_config, HWMON_I_INPUT, pvt->vm_channels.total); + memset64(in_config, HWMON_I_INPUT, pvt->vm_channels.total); in_config[pvt->vm_channels.total] = 0; pvt_in.config = in_config;