staging: fbtft: use %pe for backlight errors
Subsystems (3)
PATCH v2 1/1 staging: fbtft: use %pe for backlight errors
Coccinelle found two places where backlight registration errors are printed by passing PTR_ERR() to dev_err().
Use %pe instead so the error pointer can be printed directly. This keeps the behavior the same and just makes the error printing cleaner.
---
Changes in v2:
- Use reachable Gmail address for author and Signed-off-by.
drivers/staging/fbtft/fb_ssd1351.c | 4 ++-- drivers/staging/fbtft/fbtft-core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/fbtft/fb_ssd1351.c +2 -2
@@ -218,8 +218,8 @@ static void register_onboard_backlight(struct fbtft_par *par) &bl_props);if (IS_ERR (bd)) {dev_err (par->info->device, -"cannot register backlight device (%ld)\n" , -PTR_ERR (bd)); +"cannot register backlight device (%pe)\n" , + bd);return ; } par->info->bl_dev = bd;
drivers/staging/fbtft/fbtft-core.c +2 -2
@@ -187,8 +187,8 @@ void fbtft_register_backlight(struct fbtft_par *par) &fbtft_bl_ops, &bl_props);if (IS_ERR (bd)) {dev_err (par->info->device, -"cannot register backlight device (%ld)\n" , -PTR_ERR (bd)); +"cannot register backlight device (%pe)\n" , + bd);return ; } par->info->bl_dev = bd;
Signature · 1 line
2.54.0
Quoted 6 lines · Keefe Reeves
Coccinelle found two places where backlight registration errors are printed by passing
PTR_ERR()todev_err().Use %pe instead so the error pointer can be printed directly. This keeps the behavior the same and just makes the error printing cleaner.
Oh, nice! Now
(for curious ones: you can also see my comment against v1 of this patch).
Signature · 2 lines
With Best Regards, Andy Shevchenko
Greg KH
maintainerQuoted 10 lines · Keefe Reeves
Coccinelle found two places where backlight registration errors are printed by passing
PTR_ERR()todev_err().Use %pe instead so the error pointer can be printed directly. This keeps the behavior the same and just makes the error printing cleaner.
Signed-off-by Keefe Reeves <[email protected]>---
Changes in v2:
- Use reachable Gmail address for author and Signed-off-by.
Does not apply to my tree :(