drm: Convert to using %pOFn instead of device_node.name
diff mbox series

Message ID 20180828015252.28511-19-robh@kernel.org
State New
Headers show
Series
  • drm: Convert to using %pOFn instead of device_node.name
Related show

Commit Message

Rob Herring Aug. 28, 2018, 1:52 a.m. UTC
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Rob Clark <robdclark@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/gpu/drm/drm_modes.c     | 4 ++--
 drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Maarten Lankhorst Aug. 28, 2018, 12:54 p.m. UTC | #1
Op 28-08-18 om 03:52 schreef Rob Herring:
> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
>
> Cc: Gustavo Padovan <gustavo@padovan.org>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-arm-msm@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  drivers/gpu/drm/drm_modes.c     | 4 ++--
>  drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 02db9ac82d7a..24a750436559 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -716,8 +716,8 @@ int of_get_drm_display_mode(struct device_node *np,
>  	if (bus_flags)
>  		drm_bus_flags_from_videomode(&vm, bus_flags);
>  
> -	pr_debug("%pOF: got %dx%d display mode from %s\n",
> -		np, vm.hactive, vm.vactive, np->name);
> +	pr_debug("%pOF: got %dx%d display mode\n",
> +		np, vm.hactive, vm.vactive);
Aren't you removing it here instead of converting?

~Maarten
>  	drm_mode_debug_printmodeline(dmode);
>  
>  	return 0;
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
> index c79659ca5706..23670907a29d 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
> @@ -579,7 +579,7 @@ static int msm_hdmi_bind(struct device *dev, struct device *master, void *data)
>  	hdmi_cfg = (struct hdmi_platform_config *)
>  			of_device_get_match_data(dev);
>  	if (!hdmi_cfg) {
> -		dev_err(dev, "unknown hdmi_cfg: %s\n", of_node->name);
> +		dev_err(dev, "unknown hdmi_cfg: %pOFn\n", of_node);
>  		return -ENXIO;
>  	}
>
Rob Herring Aug. 28, 2018, 3:04 p.m. UTC | #2
On Tue, Aug 28, 2018 at 7:54 AM Maarten Lankhorst
<maarten.lankhorst@linux.intel.com> wrote:
>
> Op 28-08-18 om 03:52 schreef Rob Herring:
> > In preparation to remove the node name pointer from struct device_node,
> > convert printf users to use the %pOFn format specifier.
> >
> > Cc: Gustavo Padovan <gustavo@padovan.org>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Sean Paul <sean@poorly.run>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: Rob Clark <robdclark@gmail.com>
> > Cc: dri-devel@lists.freedesktop.org
> > Cc: linux-arm-msm@vger.kernel.org
> > Cc: freedreno@lists.freedesktop.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> >  drivers/gpu/drm/drm_modes.c     | 4 ++--
> >  drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +-
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> > index 02db9ac82d7a..24a750436559 100644
> > --- a/drivers/gpu/drm/drm_modes.c
> > +++ b/drivers/gpu/drm/drm_modes.c
> > @@ -716,8 +716,8 @@ int of_get_drm_display_mode(struct device_node *np,
> >       if (bus_flags)
> >               drm_bus_flags_from_videomode(&vm, bus_flags);
> >
> > -     pr_debug("%pOF: got %dx%d display mode from %s\n",
> > -             np, vm.hactive, vm.vactive, np->name);
> > +     pr_debug("%pOF: got %dx%d display mode\n",
> > +             np, vm.hactive, vm.vactive);
> Aren't you removing it here instead of converting?

Well, yes. The full path and name are already printed so the node name
alone was pretty redundant.

Rob
Rob Clark Aug. 28, 2018, 3:04 p.m. UTC | #3
On Mon, Aug 27, 2018 at 9:53 PM Rob Herring <robh@kernel.org> wrote:
>
> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
>
> Cc: Gustavo Padovan <gustavo@padovan.org>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-arm-msm@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
> Signed-off-by: Rob Herring <robh@kernel.org>

for msm part,

Acked-by: Rob Clark <robdclark@gmail.com>

(for drm_modes part, I guess there is no harm removing the redundant name)

BR,
-R

> ---
>  drivers/gpu/drm/drm_modes.c     | 4 ++--
>  drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 02db9ac82d7a..24a750436559 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -716,8 +716,8 @@ int of_get_drm_display_mode(struct device_node *np,
>         if (bus_flags)
>                 drm_bus_flags_from_videomode(&vm, bus_flags);
>
> -       pr_debug("%pOF: got %dx%d display mode from %s\n",
> -               np, vm.hactive, vm.vactive, np->name);
> +       pr_debug("%pOF: got %dx%d display mode\n",
> +               np, vm.hactive, vm.vactive);
>         drm_mode_debug_printmodeline(dmode);
>
>         return 0;
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
> index c79659ca5706..23670907a29d 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
> @@ -579,7 +579,7 @@ static int msm_hdmi_bind(struct device *dev, struct device *master, void *data)
>         hdmi_cfg = (struct hdmi_platform_config *)
>                         of_device_get_match_data(dev);
>         if (!hdmi_cfg) {
> -               dev_err(dev, "unknown hdmi_cfg: %s\n", of_node->name);
> +               dev_err(dev, "unknown hdmi_cfg: %pOFn\n", of_node);
>                 return -ENXIO;
>         }
>
> --
> 2.17.1
>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 02db9ac82d7a..24a750436559 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -716,8 +716,8 @@  int of_get_drm_display_mode(struct device_node *np,
 	if (bus_flags)
 		drm_bus_flags_from_videomode(&vm, bus_flags);
 
-	pr_debug("%pOF: got %dx%d display mode from %s\n",
-		np, vm.hactive, vm.vactive, np->name);
+	pr_debug("%pOF: got %dx%d display mode\n",
+		np, vm.hactive, vm.vactive);
 	drm_mode_debug_printmodeline(dmode);
 
 	return 0;
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
index c79659ca5706..23670907a29d 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
@@ -579,7 +579,7 @@  static int msm_hdmi_bind(struct device *dev, struct device *master, void *data)
 	hdmi_cfg = (struct hdmi_platform_config *)
 			of_device_get_match_data(dev);
 	if (!hdmi_cfg) {
-		dev_err(dev, "unknown hdmi_cfg: %s\n", of_node->name);
+		dev_err(dev, "unknown hdmi_cfg: %pOFn\n", of_node);
 		return -ENXIO;
 	}