Skip to content

Commit 73d73f5

Browse files
Li zemingrafaeljw
authored andcommitted
PM: core: Remove unnecessary (void *) conversions
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>
1 parent 7e364e5 commit 73d73f5

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/base/power/main.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ static bool dpm_async_fn(struct device *dev, async_func_t func)
679679

680680
static void async_resume_noirq(void *data, async_cookie_t cookie)
681681
{
682-
struct device *dev = (struct device *)data;
682+
struct device *dev = data;
683683
int error;
684684

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

817817
static void async_resume_early(void *data, async_cookie_t cookie)
818818
{
819-
struct device *dev = (struct device *)data;
819+
struct device *dev = data;
820820
int error;
821821

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

981981
static void async_resume(void *data, async_cookie_t cookie)
982982
{
983-
struct device *dev = (struct device *)data;
983+
struct device *dev = data;
984984
int error;
985985

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

12701270
static void async_suspend_noirq(void *data, async_cookie_t cookie)
12711271
{
1272-
struct device *dev = (struct device *)data;
1272+
struct device *dev = data;
12731273
int error;
12741274

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

14511451
static void async_suspend_late(void *data, async_cookie_t cookie)
14521452
{
1453-
struct device *dev = (struct device *)data;
1453+
struct device *dev = data;
14541454
int error;
14551455

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

17281728
static void async_suspend(void *data, async_cookie_t cookie)
17291729
{
1730-
struct device *dev = (struct device *)data;
1730+
struct device *dev = data;
17311731
int error;
17321732

17331733
error = __device_suspend(dev, pm_transition, true);

0 commit comments

Comments
 (0)