Message ID | 20191021145149.31657-5-geert+renesas@glider.be (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | debugfs: Remove casts in debugfs_create_*() callers | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch next (600802af9049be799465b24d14162918545634bf) |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 8 lines checked |
On Monday, October 21, 2019 4:51:48 PM CET Geert Uytterhoeven wrote: > There is no need to cast a typed pointer to a void pointer when calling > a function that accepts the latter. Remove it, as the cast prevents > further compiler checks. > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Greg, have you taken this one by any chance? > --- > drivers/power/avs/smartreflex.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c > index 4684e7df833a81e9..5376f3d22f31eade 100644 > --- a/drivers/power/avs/smartreflex.c > +++ b/drivers/power/avs/smartreflex.c > @@ -905,7 +905,7 @@ static int omap_sr_probe(struct platform_device *pdev) > sr_info->dbg_dir = debugfs_create_dir(sr_info->name, sr_dbg_dir); > > debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, sr_info->dbg_dir, > - (void *)sr_info, &pm_sr_fops); > + sr_info, &pm_sr_fops); > debugfs_create_x32("errweight", S_IRUGO, sr_info->dbg_dir, > &sr_info->err_weight); > debugfs_create_x32("errmaxlimit", S_IRUGO, sr_info->dbg_dir, >
On Fri, Nov 08, 2019 at 12:24:42PM +0100, Rafael J. Wysocki wrote: > On Monday, October 21, 2019 4:51:48 PM CET Geert Uytterhoeven wrote: > > There is no need to cast a typed pointer to a void pointer when calling > > a function that accepts the latter. Remove it, as the cast prevents > > further compiler checks. > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > > Greg, have you taken this one by any chance? Nope, it's all yours! :)
On Monday, October 21, 2019 4:51:48 PM CET Geert Uytterhoeven wrote: > There is no need to cast a typed pointer to a void pointer when calling > a function that accepts the latter. Remove it, as the cast prevents > further compiler checks. > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- > drivers/power/avs/smartreflex.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c > index 4684e7df833a81e9..5376f3d22f31eade 100644 > --- a/drivers/power/avs/smartreflex.c > +++ b/drivers/power/avs/smartreflex.c > @@ -905,7 +905,7 @@ static int omap_sr_probe(struct platform_device *pdev) > sr_info->dbg_dir = debugfs_create_dir(sr_info->name, sr_dbg_dir); > > debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, sr_info->dbg_dir, > - (void *)sr_info, &pm_sr_fops); > + sr_info, &pm_sr_fops); > debugfs_create_x32("errweight", S_IRUGO, sr_info->dbg_dir, > &sr_info->err_weight); > debugfs_create_x32("errmaxlimit", S_IRUGO, sr_info->dbg_dir, > Applying as 5.5 material, thanks!
diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c index 4684e7df833a81e9..5376f3d22f31eade 100644 --- a/drivers/power/avs/smartreflex.c +++ b/drivers/power/avs/smartreflex.c @@ -905,7 +905,7 @@ static int omap_sr_probe(struct platform_device *pdev) sr_info->dbg_dir = debugfs_create_dir(sr_info->name, sr_dbg_dir); debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, sr_info->dbg_dir, - (void *)sr_info, &pm_sr_fops); + sr_info, &pm_sr_fops); debugfs_create_x32("errweight", S_IRUGO, sr_info->dbg_dir, &sr_info->err_weight); debugfs_create_x32("errmaxlimit", S_IRUGO, sr_info->dbg_dir,
There is no need to cast a typed pointer to a void pointer when calling a function that accepts the latter. Remove it, as the cast prevents further compiler checks. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- drivers/power/avs/smartreflex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)