Commit f17dd77f authored by Li zeming's avatar Li zeming Committed by Yang Yingliang
Browse files

PM: core: Remove unnecessary (void *) conversions

stable inclusion
from stable-v5.10.210
commit 8b604883d4cb1fa8d6b7d5d7db44b96465c9010b
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I97NIA
CVE: CVE-2023-52498

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8b604883d4cb1fa8d6b7d5d7db44b96465c9010b



--------------------------------

[ Upstream commit 73d73f5e ]

Assignments from pointer variables of type (void *) do not require
explicit type casts, so remove such type cases from the code in
drivers/base/power/main.c where applicable.

Signed-off-by: default avatarLi zeming <zeming@nfschina.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: 7839d0078e0d ("PM: sleep: Fix possible deadlocks in core system-wide PM code")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 396d9255
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -683,7 +683,7 @@ static bool dpm_async_fn(struct device *dev, async_func_t func)

static void async_resume_noirq(void *data, async_cookie_t cookie)
{
	struct device *dev = (struct device *)data;
	struct device *dev = data;
	int error;

	error = device_resume_noirq(dev, pm_transition, true);
@@ -822,7 +822,7 @@ static int device_resume_early(struct device *dev, pm_message_t state, bool asyn

static void async_resume_early(void *data, async_cookie_t cookie)
{
	struct device *dev = (struct device *)data;
	struct device *dev = data;
	int error;

	error = device_resume_early(dev, pm_transition, true);
@@ -986,7 +986,7 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)

static void async_resume(void *data, async_cookie_t cookie)
{
	struct device *dev = (struct device *)data;
	struct device *dev = data;
	int error;

	error = device_resume(dev, pm_transition, true);
@@ -1275,7 +1275,7 @@ static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool a

static void async_suspend_noirq(void *data, async_cookie_t cookie)
{
	struct device *dev = (struct device *)data;
	struct device *dev = data;
	int error;

	error = __device_suspend_noirq(dev, pm_transition, true);
@@ -1458,7 +1458,7 @@ static int __device_suspend_late(struct device *dev, pm_message_t state, bool as

static void async_suspend_late(void *data, async_cookie_t cookie)
{
	struct device *dev = (struct device *)data;
	struct device *dev = data;
	int error;

	error = __device_suspend_late(dev, pm_transition, true);
@@ -1734,7 +1734,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)

static void async_suspend(void *data, async_cookie_t cookie)
{
	struct device *dev = (struct device *)data;
	struct device *dev = data;
	int error;

	error = __device_suspend(dev, pm_transition, true);