From patchwork Tue Jan 21 06:45:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lihuisong (C)" X-Patchwork-Id: 13945811 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 3128F1EF085; Tue, 21 Jan 2025 06:57:38 +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=1737442660; cv=none; b=PDea9zt4d0WWbtN9NwLnxwFp3COzNHXTl/SvBZQM6s8Rcx7QozACy7wY9AtgIj9zv4PO9tFoKkZ1/pdftDWMMp0O3ix2BN4vHbzuo2UPiPzypEWA4KJ1slS62giT6FtlstCAP2UbA0ph587QoBZOwN4bkkGIvCGO18y1BLTXSh8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737442660; c=relaxed/simple; bh=VdcCCHr2Fx3J7DPh0cZGnBX8YgdWaqBT/4N42zLcHUs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZxysEt4qm+gZnpkedlR+ZyW2S+Ff8uAkSvxhF8QxQ3r1eWPvF2IdWheyxLHFFEdF+TfwSPOW9hvl/tVabhME+n/pMZ6KMcVE3VXpOLzss7qZ405vcZZRT9Nh/7wYG7z6yH/hmzQEzhp8uTpQdcfKPnGe+Qg2al0V8nZ5NeOZrlU= 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.163.17]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4YcdGz1YGsz2FcWQ; Tue, 21 Jan 2025 14:54:19 +0800 (CST) Received: from dggemv704-chm.china.huawei.com (unknown [10.3.19.47]) by mail.maildlp.com (Postfix) with ESMTPS id EA2C41A0188; Tue, 21 Jan 2025 14:57:36 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv704-chm.china.huawei.com (10.3.19.47) 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:36 +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:35 +0800 From: Huisong Li To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v1 12/21] hwmon: (hp-wmi-sensors) Fix type of 'config' in struct hwmon_channel_info to u64 Date: Tue, 21 Jan 2025 14:45:10 +0800 Message-ID: <20250121064519.18974-13-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/hp-wmi-sensors.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/hp-wmi-sensors.c b/drivers/hwmon/hp-wmi-sensors.c index d6bdad26feb1..b0d7c7de0565 100644 --- a/drivers/hwmon/hp-wmi-sensors.c +++ b/drivers/hwmon/hp-wmi-sensors.c @@ -1921,8 +1921,8 @@ static int make_chip_info(struct hp_wmi_sensors *state, bool has_events) struct device *dev = &state->wdev->dev; enum hwmon_sensor_types type; u8 type_count = 0; - u32 *config; - u32 attr; + u64 *config; + u64 attr; u8 count; u8 i; @@ -1961,7 +1961,7 @@ static int make_chip_info(struct hp_wmi_sensors *state, bool has_events) attr = hp_wmi_hwmon_attributes[type]; channel_info->type = type; channel_info->config = config; - memset32(config, attr, count); + memset64(config, attr, count); *ptr_channel_info++ = channel_info++;