From: Jani Nikula <jani.nikula@linux.intel.com>
To: airlied@linux.ie, daniel.vetter@ffwll.ch
Cc: intel-gfx@lists.freedesktop.org,
Christoph Jaeger <christophjaeger@linux.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: use __func__ instead of __FUNCTION__
Date: Fri, 28 Mar 2014 08:47:24 +0200 [thread overview]
Message-ID: <8738i2hlab.fsf@intel.com> (raw)
In-Reply-To: <1395962436-18183-1-git-send-email-christophjaeger@linux.com>
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
next prev parent reply other threads:[~2014-03-28 6:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 23:20 [PATCH] drm/i915: use __func__ instead of __FUNCTION__ Christoph Jaeger
2014-03-28 6:47 ` Jani Nikula [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8738i2hlab.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@linux.ie \
--cc=christophjaeger@linux.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.