lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 5 Oct 2011 12:32:48 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	ospite@...denti.unina.it
Cc:	Richard Purdie <rpurdie@...ys.net>,
	open list <linux-kernel@...r.kernel.org>
Subject: [sparse stuff] bug in lp3944_led_set_brightness()

Hi Antonio,

I was going through some Sparse warnings and this one seems pretty
valid.

drivers/leds/leds-lp3944.c +292 23:
	warning: mixing different enum types

   284  static void lp3944_led_set_brightness(struct led_classdev *led_cdev,
   285                                        enum led_brightness brightness)
   286  {
   287          struct lp3944_led_data *led = ldev_to_led(led_cdev);
   288  
   289          dev_dbg(&led->client->dev, "%s: %s, %d\n",
   290                  __func__, led_cdev->name, brightness);
   291  
   292          led->status = brightness;
                ^^^^^^^^^^^^^^^^^^^^^^^^
   293          schedule_work(&led->work);
   294  }

led->status should be values between 0-3.  brightness is 0, 127 and
255.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ