[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20111116160007.5a834380ca396153931cc238@studenti.unina.it>
Date: Wed, 16 Nov 2011 16:00:07 +0100
From: Antonio Ospite <ospite@...denti.unina.it>
To: Richard Purdie <rpurdie@...ys.net>
Cc: Antonio Ospite <ospite@...denti.unina.it>,
Dan Carpenter <dan.carpenter@...cle.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] leds: leds-lp3944, fix "sparse" warning
"mixing different enum types"
On Thu, 6 Oct 2011 23:34:44 +0200
Antonio Ospite <ospite@...denti.unina.it> wrote:
> Fix a warning from "sparse":
>
> drivers/leds/leds-lp3944.c:292:23: warning: mixing different enum types
> drivers/leds/leds-lp3944.c:292:23: int enum led_brightness versus
> drivers/leds/leds-lp3944.c:292:23: int enum lp3944_status
>
> Keeping track of LP3944_LED_STATUS_OFF and LP3944_LED_STATUS_ON only in
> lp3944_led_set_brightness() is OK, as the handling of DIM (blinking)
> mode[s] is in lp3944_led_set_blink().
>
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Antonio Ospite <ospite@...denti.unina.it>
Ping.
Dan, did you receive this one? I can't see it in 3.2-rc2.
Regards,
Antonio.
> ---
> drivers/leds/leds-lp3944.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/leds/leds-lp3944.c b/drivers/leds/leds-lp3944.c
> index 9010c05..3cc01fb 100644
> --- a/drivers/leds/leds-lp3944.c
> +++ b/drivers/leds/leds-lp3944.c
> @@ -289,7 +289,7 @@ static void lp3944_led_set_brightness(struct led_classdev *led_cdev,
> dev_dbg(&led->client->dev, "%s: %s, %d\n",
> __func__, led_cdev->name, brightness);
>
> - led->status = brightness;
> + led->status = !!brightness;
> schedule_work(&led->work);
> }
>
> --
> 1.7.6.3
>
>
--
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists