From patchwork Tue Jan 21 06:45:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lihuisong (C)" X-Patchwork-Id: 13945810 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) (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 EC2841BC065; Tue, 21 Jan 2025 06:57:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.188 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737442660; cv=none; b=nrKw3fJ/Y/WURVA3dlJrFqXlWdKSgNw1yuyWBWYWQEwt8GaiWPTnAEHk0olbG1/CY3V/Zij22ql6879yWp5VvfklVpDP/8YQeg4mSofAUGVVEO6MlnVQU42GRpZOMO+VjY4JAuboQqwhf9nn4uZEZHmAXJMRA2/vA4+OdOxyBEQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737442660; c=relaxed/simple; bh=GHaNzCy9ObieR/bSrLhA7NlrWGfCEwNrqE6XUPHHQKU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QdjeGyj4BXvayu8/1U6cKiy/YsQk2EEdAQuLk1wb40Fjk3tOmcnP9mNOqb3RkvVQjMWazVoV2SJ2f7ZVTaLarIjYeAO/HYdewFAWtNWDZEZTnvhk8YU05btcv4Kf+KP+/u9CkEzbWDROj8dVLOwpFMEPoQtM4KDXthSwbgUnQFc= 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.188 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.163.174]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4YcdJr3NG6zrRgr; Tue, 21 Jan 2025 14:55:56 +0800 (CST) Received: from dggemv711-chm.china.huawei.com (unknown [10.1.198.66]) by mail.maildlp.com (Postfix) with ESMTPS id 8C292140203; Tue, 21 Jan 2025 14:57:35 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv711-chm.china.huawei.com (10.1.198.66) 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:35 +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:33 +0800 From: Huisong Li To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v1 11/21] hwmon: (asus_wmi_sensors) Fix type of 'config' in struct hwmon_channel_info to u64 Date: Tue, 21 Jan 2025 14:45:09 +0800 Message-ID: <20250121064519.18974-12-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-media@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/asus_wmi_sensors.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/asus_wmi_sensors.c b/drivers/hwmon/asus_wmi_sensors.c index c2dd7ff882f2..9593674fc5df 100644 --- a/drivers/hwmon/asus_wmi_sensors.c +++ b/drivers/hwmon/asus_wmi_sensors.c @@ -126,7 +126,7 @@ static enum hwmon_sensor_types asus_data_types[] = { [WATER_FLOW] = hwmon_fan, }; -static u32 hwmon_attributes[hwmon_max] = { +static u64 hwmon_attributes[hwmon_max] = { [hwmon_chip] = HWMON_C_REGISTER_TZ, [hwmon_temp] = HWMON_T_INPUT | HWMON_T_LABEL, [hwmon_in] = HWMON_I_INPUT | HWMON_I_LABEL, @@ -248,9 +248,9 @@ static int asus_wmi_get_item_count(u32 *count) static int asus_wmi_hwmon_add_chan_info(struct hwmon_channel_info *asus_wmi_hwmon_chan, struct device *dev, int num, - enum hwmon_sensor_types type, u32 config) + enum hwmon_sensor_types type, u64 config) { - u32 *cfg; + u64 *cfg; cfg = devm_kcalloc(dev, num + 1, sizeof(*cfg), GFP_KERNEL); if (!cfg) @@ -258,7 +258,7 @@ static int asus_wmi_hwmon_add_chan_info(struct hwmon_channel_info *asus_wmi_hwmo asus_wmi_hwmon_chan->type = type; asus_wmi_hwmon_chan->config = cfg; - memset32(cfg, config, num); + memset64(cfg, config, num); return 0; }