Skip to content

Commit

Permalink
PM: core: Remove unnecessary (void *) conversions
Browse files Browse the repository at this point in the history
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: Li zeming <zeming@nfschina.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Li zeming authored and Rafael J. Wysocki committed Apr 7, 2023
1 parent 7e364e5 commit 73d73f5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/base/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,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);
Expand Down Expand Up @@ -816,7 +816,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);
Expand Down Expand Up @@ -980,7 +980,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);
Expand Down Expand Up @@ -1269,7 +1269,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);
Expand Down Expand Up @@ -1450,7 +1450,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);
Expand Down Expand Up @@ -1727,7 +1727,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);
Expand Down

0 comments on commit 73d73f5

Please sign in to comment.