dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Vincent Stehlé" <vincent.stehle@laposte.net>
To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: "Vincent Stehlé" <vincent.stehle@laposte.net>,
	"David Airlie" <airlied@linux.ie>
Subject: [PATCH] gma500: define do_gma_backlight_set only when used
Date: Thu, 26 Sep 2013 23:46:56 +0200	[thread overview]
Message-ID: <1380232016-25368-1-git-send-email-vincent.stehle@laposte.net> (raw)

Make sure static function do_gma_backlight_set() is only defined when
CONFIG_BACKLIGHT_CLASS_DEVICE is defined, as it is never called otherwise.

This fixes the following warning:

  drivers/gpu/drm/gma500/backlight.c:29:13: warning: ‘do_gma_backlight_set’ defined but not used [-Wunused-function]

While at it, remove some end of line spaces.

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: David Airlie <airlied@linux.ie>
---

Hi,

This can be seen with mainline or linux-next with e.g. allmodconfig on x86.

Best regards,

V.

 drivers/gpu/drm/gma500/backlight.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/gma500/backlight.c b/drivers/gpu/drm/gma500/backlight.c
index 143eba3..399731e 100644
--- a/drivers/gpu/drm/gma500/backlight.c
+++ b/drivers/gpu/drm/gma500/backlight.c
@@ -26,13 +26,13 @@
 #include "intel_bios.h"
 #include "power.h"
 
+#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
 static void do_gma_backlight_set(struct drm_device *dev)
 {
-#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
 	struct drm_psb_private *dev_priv = dev->dev_private;
 	backlight_update_status(dev_priv->backlight_device);
-#endif	
 }
+#endif
 
 void gma_backlight_enable(struct drm_device *dev)
 {
@@ -43,7 +43,7 @@ void gma_backlight_enable(struct drm_device *dev)
 		dev_priv->backlight_device->props.brightness = dev_priv->backlight_level;
 		do_gma_backlight_set(dev);
 	}
-#endif	
+#endif
 }
 
 void gma_backlight_disable(struct drm_device *dev)
@@ -55,7 +55,7 @@ void gma_backlight_disable(struct drm_device *dev)
 		dev_priv->backlight_device->props.brightness = 0;
 		do_gma_backlight_set(dev);
 	}
-#endif	
+#endif
 }
 
 void gma_backlight_set(struct drm_device *dev, int v)
@@ -67,7 +67,7 @@ void gma_backlight_set(struct drm_device *dev, int v)
 		dev_priv->backlight_device->props.brightness = v;
 		do_gma_backlight_set(dev);
 	}
-#endif	
+#endif
 }
 
 int gma_backlight_init(struct drm_device *dev)
-- 
1.8.4.rc3

             reply	other threads:[~2013-09-26 21:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26 21:46 Vincent Stehlé [this message]
2013-09-27  3:12 ` [PATCH] gma500: define do_gma_backlight_set only when used Patrik Jakobsson
2013-09-27  9:38   ` Jani Nikula

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=1380232016-25368-1-git-send-email-vincent.stehle@laposte.net \
    --to=vincent.stehle@laposte.net \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox