* [PATCH] drm/i915: use __func__ instead of __FUNCTION__
@ 2014-03-27 23:20 Christoph Jaeger
2014-03-28 6:47 ` Jani Nikula
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Jaeger @ 2014-03-27 23:20 UTC (permalink / raw)
To: airlied, daniel.vetter, jani.nikula
Cc: intel-gfx, Christoph Jaeger, dri-devel
__FUNCTION__ is gcc specific; use __func__ instead.
Signed-off-by: Christoph Jaeger <christophjaeger@linux.com>
---
drivers/gpu/drm/i915/dvo_ns2501.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/dvo_ns2501.c b/drivers/gpu/drm/i915/dvo_ns2501.c
index 954acb2..e40cd26 100644
--- a/drivers/gpu/drm/i915/dvo_ns2501.c
+++ b/drivers/gpu/drm/i915/dvo_ns2501.c
@@ -234,7 +234,7 @@ static enum drm_mode_status ns2501_mode_valid(struct intel_dvo_device *dvo,
{
DRM_DEBUG_KMS
("%s: is mode valid (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d)\n",
- __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
+ __func__, mode->hdisplay, mode->htotal, mode->vdisplay,
mode->vtotal);
/*
@@ -262,7 +262,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
DRM_DEBUG_KMS
("%s: set mode (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d).\n",
- __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
+ __func__, mode->hdisplay, mode->htotal, mode->vdisplay,
mode->vtotal);
/*
@@ -277,8 +277,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
if (mode->hdisplay == 800 && mode->vdisplay == 600) {
/* mode 277 */
ns->reg_8_shadow &= ~NS2501_8_BPAS;
- DRM_DEBUG_KMS("%s: switching to 800x600\n",
- __FUNCTION__);
+ DRM_DEBUG_KMS("%s: switching to 800x600\n", __func__);
/*
* No, I do not know where this data comes from.
@@ -341,8 +340,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
} else if (mode->hdisplay == 640 && mode->vdisplay == 480) {
/* mode 274 */
- DRM_DEBUG_KMS("%s: switching to 640x480\n",
- __FUNCTION__);
+ DRM_DEBUG_KMS("%s: switching to 640x480\n", __func__);
/*
* No, I do not know where this data comes from.
* It is just what the video bios left in the DVO, so
@@ -406,8 +404,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
} else if (mode->hdisplay == 1024 && mode->vdisplay == 768) {
/* mode 280 */
- DRM_DEBUG_KMS("%s: switching to 1024x768\n",
- __FUNCTION__);
+ DRM_DEBUG_KMS("%s: switching to 1024x768\n", __func__);
/*
* This might or might not work, actually. I'm silently
* assuming here that the native panel resolution is
@@ -459,7 +456,7 @@ static void ns2501_dpms(struct intel_dvo_device *dvo, bool enable)
unsigned char ch;
DRM_DEBUG_KMS("%s: Trying set the dpms of the DVO to %i\n",
- __FUNCTION__, enable);
+ __func__, enable);
ch = ns->reg_8_shadow;
--
1.8.5.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: use __func__ instead of __FUNCTION__
2014-03-27 23:20 [PATCH] drm/i915: use __func__ instead of __FUNCTION__ Christoph Jaeger
@ 2014-03-28 6:47 ` Jani Nikula
2014-03-28 9:19 ` Christoph Jaeger
0 siblings, 1 reply; 6+ messages in thread
From: Jani Nikula @ 2014-03-28 6:47 UTC (permalink / raw)
To: airlied, daniel.vetter; +Cc: intel-gfx, Christoph Jaeger, dri-devel
On Fri, 28 Mar 2014, Christoph Jaeger <christophjaeger@linux.com> wrote:
> __FUNCTION__ is gcc specific; use __func__ instead.
I acknowledge the patch is correct and functionally the same as
before. However the correct fix would be to drop __FUNCTION__ and the
corresponding "%s: " altogether as DRM_DEBUG_KMS includes printing the
function name.
BR,
Jani.
>
> Signed-off-by: Christoph Jaeger <christophjaeger@linux.com>
> ---
> drivers/gpu/drm/i915/dvo_ns2501.c | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/dvo_ns2501.c b/drivers/gpu/drm/i915/dvo_ns2501.c
> index 954acb2..e40cd26 100644
> --- a/drivers/gpu/drm/i915/dvo_ns2501.c
> +++ b/drivers/gpu/drm/i915/dvo_ns2501.c
> @@ -234,7 +234,7 @@ static enum drm_mode_status ns2501_mode_valid(struct intel_dvo_device *dvo,
> {
> DRM_DEBUG_KMS
> ("%s: is mode valid (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d)\n",
> - __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
> + __func__, mode->hdisplay, mode->htotal, mode->vdisplay,
> mode->vtotal);
>
> /*
> @@ -262,7 +262,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
>
> DRM_DEBUG_KMS
> ("%s: set mode (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d).\n",
> - __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
> + __func__, mode->hdisplay, mode->htotal, mode->vdisplay,
> mode->vtotal);
>
> /*
> @@ -277,8 +277,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
> if (mode->hdisplay == 800 && mode->vdisplay == 600) {
> /* mode 277 */
> ns->reg_8_shadow &= ~NS2501_8_BPAS;
> - DRM_DEBUG_KMS("%s: switching to 800x600\n",
> - __FUNCTION__);
> + DRM_DEBUG_KMS("%s: switching to 800x600\n", __func__);
>
> /*
> * No, I do not know where this data comes from.
> @@ -341,8 +340,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
>
> } else if (mode->hdisplay == 640 && mode->vdisplay == 480) {
> /* mode 274 */
> - DRM_DEBUG_KMS("%s: switching to 640x480\n",
> - __FUNCTION__);
> + DRM_DEBUG_KMS("%s: switching to 640x480\n", __func__);
> /*
> * No, I do not know where this data comes from.
> * It is just what the video bios left in the DVO, so
> @@ -406,8 +404,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
>
> } else if (mode->hdisplay == 1024 && mode->vdisplay == 768) {
> /* mode 280 */
> - DRM_DEBUG_KMS("%s: switching to 1024x768\n",
> - __FUNCTION__);
> + DRM_DEBUG_KMS("%s: switching to 1024x768\n", __func__);
> /*
> * This might or might not work, actually. I'm silently
> * assuming here that the native panel resolution is
> @@ -459,7 +456,7 @@ static void ns2501_dpms(struct intel_dvo_device *dvo, bool enable)
> unsigned char ch;
>
> DRM_DEBUG_KMS("%s: Trying set the dpms of the DVO to %i\n",
> - __FUNCTION__, enable);
> + __func__, enable);
>
> ch = ns->reg_8_shadow;
>
> --
> 1.8.5.3
>
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: use __func__ instead of __FUNCTION__
2014-03-28 6:47 ` Jani Nikula
@ 2014-03-28 9:19 ` Christoph Jaeger
2014-03-28 9:19 ` [PATCH] drm/i915: drop __FUNCTION__ as argument to DRM_DEBUG_KMS Christoph Jaeger
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Jaeger @ 2014-03-28 9:19 UTC (permalink / raw)
To: airlied, daniel.vetter, jani.nikula; +Cc: intel-gfx, dri-devel
Thanks for review.
This patch obsoletes patch "drm/i915: use __func__ instead of
__FUNCTION__".
Best,
Chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] drm/i915: drop __FUNCTION__ as argument to DRM_DEBUG_KMS
2014-03-28 9:19 ` Christoph Jaeger
@ 2014-03-28 9:19 ` Christoph Jaeger
2014-03-28 10:49 ` Jani Nikula
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Jaeger @ 2014-03-28 9:19 UTC (permalink / raw)
To: airlied, daniel.vetter, jani.nikula
Cc: intel-gfx, Christoph Jaeger, dri-devel
DRM_DEBUG_KMS includes printing the function name.
Signed-off-by: Christoph Jaeger <christophjaeger@linux.com>
---
drivers/gpu/drm/i915/dvo_ns2501.c | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/i915/dvo_ns2501.c b/drivers/gpu/drm/i915/dvo_ns2501.c
index 954acb2..ce5242f 100644
--- a/drivers/gpu/drm/i915/dvo_ns2501.c
+++ b/drivers/gpu/drm/i915/dvo_ns2501.c
@@ -233,9 +233,8 @@ static enum drm_mode_status ns2501_mode_valid(struct intel_dvo_device *dvo,
struct drm_display_mode *mode)
{
DRM_DEBUG_KMS
- ("%s: is mode valid (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d)\n",
- __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
- mode->vtotal);
+ ("is mode valid (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d)\n",
+ mode->hdisplay, mode->htotal, mode->vdisplay, mode->vtotal);
/*
* Currently, these are all the modes I have data from.
@@ -261,9 +260,8 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv);
DRM_DEBUG_KMS
- ("%s: set mode (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d).\n",
- __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
- mode->vtotal);
+ ("set mode (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d).\n",
+ mode->hdisplay, mode->htotal, mode->vdisplay, mode->vtotal);
/*
* Where do I find the native resolution for which scaling is not required???
@@ -277,8 +275,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
if (mode->hdisplay == 800 && mode->vdisplay == 600) {
/* mode 277 */
ns->reg_8_shadow &= ~NS2501_8_BPAS;
- DRM_DEBUG_KMS("%s: switching to 800x600\n",
- __FUNCTION__);
+ DRM_DEBUG_KMS("switching to 800x600\n");
/*
* No, I do not know where this data comes from.
@@ -341,8 +338,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
} else if (mode->hdisplay == 640 && mode->vdisplay == 480) {
/* mode 274 */
- DRM_DEBUG_KMS("%s: switching to 640x480\n",
- __FUNCTION__);
+ DRM_DEBUG_KMS("switching to 640x480\n");
/*
* No, I do not know where this data comes from.
* It is just what the video bios left in the DVO, so
@@ -406,8 +402,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
} else if (mode->hdisplay == 1024 && mode->vdisplay == 768) {
/* mode 280 */
- DRM_DEBUG_KMS("%s: switching to 1024x768\n",
- __FUNCTION__);
+ DRM_DEBUG_KMS("switching to 1024x768\n");
/*
* This might or might not work, actually. I'm silently
* assuming here that the native panel resolution is
@@ -458,8 +453,7 @@ static void ns2501_dpms(struct intel_dvo_device *dvo, bool enable)
struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv);
unsigned char ch;
- DRM_DEBUG_KMS("%s: Trying set the dpms of the DVO to %i\n",
- __FUNCTION__, enable);
+ DRM_DEBUG_KMS("Trying set the dpms of the DVO to %i\n", enable);
ch = ns->reg_8_shadow;
--
1.8.5.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: drop __FUNCTION__ as argument to DRM_DEBUG_KMS
2014-03-28 9:19 ` [PATCH] drm/i915: drop __FUNCTION__ as argument to DRM_DEBUG_KMS Christoph Jaeger
@ 2014-03-28 10:49 ` Jani Nikula
2014-03-28 17:35 ` Daniel Vetter
0 siblings, 1 reply; 6+ messages in thread
From: Jani Nikula @ 2014-03-28 10:49 UTC (permalink / raw)
To: airlied, daniel.vetter; +Cc: intel-gfx, Christoph Jaeger, dri-devel
On Fri, 28 Mar 2014, Christoph Jaeger <christophjaeger@linux.com> wrote:
> DRM_DEBUG_KMS includes printing the function name.
>
> Signed-off-by: Christoph Jaeger <christophjaeger@linux.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/dvo_ns2501.c | 22 ++++++++--------------
> 1 file changed, 8 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/dvo_ns2501.c b/drivers/gpu/drm/i915/dvo_ns2501.c
> index 954acb2..ce5242f 100644
> --- a/drivers/gpu/drm/i915/dvo_ns2501.c
> +++ b/drivers/gpu/drm/i915/dvo_ns2501.c
> @@ -233,9 +233,8 @@ static enum drm_mode_status ns2501_mode_valid(struct intel_dvo_device *dvo,
> struct drm_display_mode *mode)
> {
> DRM_DEBUG_KMS
> - ("%s: is mode valid (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d)\n",
> - __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
> - mode->vtotal);
> + ("is mode valid (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d)\n",
> + mode->hdisplay, mode->htotal, mode->vdisplay, mode->vtotal);
>
> /*
> * Currently, these are all the modes I have data from.
> @@ -261,9 +260,8 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
> struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv);
>
> DRM_DEBUG_KMS
> - ("%s: set mode (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d).\n",
> - __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
> - mode->vtotal);
> + ("set mode (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d).\n",
> + mode->hdisplay, mode->htotal, mode->vdisplay, mode->vtotal);
>
> /*
> * Where do I find the native resolution for which scaling is not required???
> @@ -277,8 +275,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
> if (mode->hdisplay == 800 && mode->vdisplay == 600) {
> /* mode 277 */
> ns->reg_8_shadow &= ~NS2501_8_BPAS;
> - DRM_DEBUG_KMS("%s: switching to 800x600\n",
> - __FUNCTION__);
> + DRM_DEBUG_KMS("switching to 800x600\n");
>
> /*
> * No, I do not know where this data comes from.
> @@ -341,8 +338,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
>
> } else if (mode->hdisplay == 640 && mode->vdisplay == 480) {
> /* mode 274 */
> - DRM_DEBUG_KMS("%s: switching to 640x480\n",
> - __FUNCTION__);
> + DRM_DEBUG_KMS("switching to 640x480\n");
> /*
> * No, I do not know where this data comes from.
> * It is just what the video bios left in the DVO, so
> @@ -406,8 +402,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
>
> } else if (mode->hdisplay == 1024 && mode->vdisplay == 768) {
> /* mode 280 */
> - DRM_DEBUG_KMS("%s: switching to 1024x768\n",
> - __FUNCTION__);
> + DRM_DEBUG_KMS("switching to 1024x768\n");
> /*
> * This might or might not work, actually. I'm silently
> * assuming here that the native panel resolution is
> @@ -458,8 +453,7 @@ static void ns2501_dpms(struct intel_dvo_device *dvo, bool enable)
> struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv);
> unsigned char ch;
>
> - DRM_DEBUG_KMS("%s: Trying set the dpms of the DVO to %i\n",
> - __FUNCTION__, enable);
> + DRM_DEBUG_KMS("Trying set the dpms of the DVO to %i\n", enable);
>
> ch = ns->reg_8_shadow;
>
> --
> 1.8.5.3
>
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: drop __FUNCTION__ as argument to DRM_DEBUG_KMS
2014-03-28 10:49 ` Jani Nikula
@ 2014-03-28 17:35 ` Daniel Vetter
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2014-03-28 17:35 UTC (permalink / raw)
To: Jani Nikula; +Cc: daniel.vetter, Christoph Jaeger, intel-gfx, dri-devel
On Fri, Mar 28, 2014 at 12:49:26PM +0200, Jani Nikula wrote:
> On Fri, 28 Mar 2014, Christoph Jaeger <christophjaeger@linux.com> wrote:
> > DRM_DEBUG_KMS includes printing the function name.
> >
> > Signed-off-by: Christoph Jaeger <christophjaeger@linux.com>
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Queued for -next, thanks for the patch.
-Daniel
>
>
> > ---
> > drivers/gpu/drm/i915/dvo_ns2501.c | 22 ++++++++--------------
> > 1 file changed, 8 insertions(+), 14 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/dvo_ns2501.c b/drivers/gpu/drm/i915/dvo_ns2501.c
> > index 954acb2..ce5242f 100644
> > --- a/drivers/gpu/drm/i915/dvo_ns2501.c
> > +++ b/drivers/gpu/drm/i915/dvo_ns2501.c
> > @@ -233,9 +233,8 @@ static enum drm_mode_status ns2501_mode_valid(struct intel_dvo_device *dvo,
> > struct drm_display_mode *mode)
> > {
> > DRM_DEBUG_KMS
> > - ("%s: is mode valid (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d)\n",
> > - __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
> > - mode->vtotal);
> > + ("is mode valid (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d)\n",
> > + mode->hdisplay, mode->htotal, mode->vdisplay, mode->vtotal);
> >
> > /*
> > * Currently, these are all the modes I have data from.
> > @@ -261,9 +260,8 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
> > struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv);
> >
> > DRM_DEBUG_KMS
> > - ("%s: set mode (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d).\n",
> > - __FUNCTION__, mode->hdisplay, mode->htotal, mode->vdisplay,
> > - mode->vtotal);
> > + ("set mode (hdisplay=%d,htotal=%d,vdisplay=%d,vtotal=%d).\n",
> > + mode->hdisplay, mode->htotal, mode->vdisplay, mode->vtotal);
> >
> > /*
> > * Where do I find the native resolution for which scaling is not required???
> > @@ -277,8 +275,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
> > if (mode->hdisplay == 800 && mode->vdisplay == 600) {
> > /* mode 277 */
> > ns->reg_8_shadow &= ~NS2501_8_BPAS;
> > - DRM_DEBUG_KMS("%s: switching to 800x600\n",
> > - __FUNCTION__);
> > + DRM_DEBUG_KMS("switching to 800x600\n");
> >
> > /*
> > * No, I do not know where this data comes from.
> > @@ -341,8 +338,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
> >
> > } else if (mode->hdisplay == 640 && mode->vdisplay == 480) {
> > /* mode 274 */
> > - DRM_DEBUG_KMS("%s: switching to 640x480\n",
> > - __FUNCTION__);
> > + DRM_DEBUG_KMS("switching to 640x480\n");
> > /*
> > * No, I do not know where this data comes from.
> > * It is just what the video bios left in the DVO, so
> > @@ -406,8 +402,7 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo,
> >
> > } else if (mode->hdisplay == 1024 && mode->vdisplay == 768) {
> > /* mode 280 */
> > - DRM_DEBUG_KMS("%s: switching to 1024x768\n",
> > - __FUNCTION__);
> > + DRM_DEBUG_KMS("switching to 1024x768\n");
> > /*
> > * This might or might not work, actually. I'm silently
> > * assuming here that the native panel resolution is
> > @@ -458,8 +453,7 @@ static void ns2501_dpms(struct intel_dvo_device *dvo, bool enable)
> > struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv);
> > unsigned char ch;
> >
> > - DRM_DEBUG_KMS("%s: Trying set the dpms of the DVO to %i\n",
> > - __FUNCTION__, enable);
> > + DRM_DEBUG_KMS("Trying set the dpms of the DVO to %i\n", enable);
> >
> > ch = ns->reg_8_shadow;
> >
> > --
> > 1.8.5.3
> >
>
> --
> Jani Nikula, Intel Open Source Technology Center
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-03-28 17:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-27 23:20 [PATCH] drm/i915: use __func__ instead of __FUNCTION__ Christoph Jaeger
2014-03-28 6:47 ` Jani Nikula
2014-03-28 9:19 ` Christoph Jaeger
2014-03-28 9:19 ` [PATCH] drm/i915: drop __FUNCTION__ as argument to DRM_DEBUG_KMS Christoph Jaeger
2014-03-28 10:49 ` Jani Nikula
2014-03-28 17:35 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.