diff mbox

drm: shmobile: fix warnings

Message ID E1X6Ho7-0006ru-U9@rmk-PC.arm.linux.org.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Russell King July 13, 2014, 11:19 a.m. UTC
drivers/gpu/drm/shmobile/shmob_drm_drv.c:300:5: warning: "CONFIG_PM_SLEEP" is not defined [-Wundef]

Always use #ifdef with CONFIG symbols, never just bare #if

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 drivers/gpu/drm/shmobile/shmob_drm_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Russell King - ARM Linux July 22, 2014, 8:52 a.m. UTC | #1
On Sun, Jul 13, 2014 at 12:19:03PM +0100, Russell King wrote:
> drivers/gpu/drm/shmobile/shmob_drm_drv.c:300:5: warning: "CONFIG_PM_SLEEP" is not defined [-Wundef]
> 
> Always use #ifdef with CONFIG symbols, never just bare #if
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Ping?

> ---
>  drivers/gpu/drm/shmobile/shmob_drm_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> index 82c84c7fd4f6..ff4ba483b602 100644
> --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> @@ -297,7 +297,7 @@ static struct drm_driver shmob_drm_driver = {
>   * Power management
>   */
>  
> -#if CONFIG_PM_SLEEP
> +#ifdef CONFIG_PM_SLEEP
>  static int shmob_drm_pm_suspend(struct device *dev)
>  {
>  	struct shmob_drm_device *sdev = dev_get_drvdata(dev);
> -- 
> 1.8.3.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Dave Airlie July 22, 2014, 10:15 a.m. UTC | #2
On 22 July 2014 18:52, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> On Sun, Jul 13, 2014 at 12:19:03PM +0100, Russell King wrote:
>> drivers/gpu/drm/shmobile/shmob_drm_drv.c:300:5: warning: "CONFIG_PM_SLEEP" is not defined [-Wundef]
>>
>> Always use #ifdef with CONFIG symbols, never just bare #if
>>
>> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>
> Ping?
>

I merged all these to -next earlier today,

I'm still looking at the other ones that have dependant patches on
Greg on how best to merge.

Dave.
diff mbox

Patch

diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
index 82c84c7fd4f6..ff4ba483b602 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
@@ -297,7 +297,7 @@  static struct drm_driver shmob_drm_driver = {
  * Power management
  */
 
-#if CONFIG_PM_SLEEP
+#ifdef CONFIG_PM_SLEEP
 static int shmob_drm_pm_suspend(struct device *dev)
 {
 	struct shmob_drm_device *sdev = dev_get_drvdata(dev);