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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 22 Sep 2015 21:02:43 +0200
From:	Andrew Lunn <andrew@...n.ch>
To:	Jacek Anaszewski <j.anaszewski@...sung.com>
Cc:	linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
	sakari.ailus@...ux.intel.com, stsp@...rs.sourceforge.net,
	pavel@....cz, ospite@...denti.unina.it, davem@...emloft.net,
	linus.walleij@...aro.org, ricardo.ribalda@...il.com,
	p.meerwald@...-electronic.com
Subject: Re: [PATCH 4/5] leds: core: Add an internal
 led_set_brightness_nosleep function

> +void led_set_brightness_nosleep(struct led_classdev *led_cdev,
> +					enum led_brightness value)
> +{
> +	led_cdev->brightness = min(value, led_cdev->max_brightness);
> +
> +	if (led_cdev->flags & LED_SUSPENDED)
> +		return;
> +
> +	/* Use brightness_set op if available, it is guaranteed not to sleep */
> +	if (led_cdev->brightness_set)
> +		led_cdev->brightness_set(led_cdev, led_cdev->brightness);
> +
> +	/* If brightness setting can sleep, delegate it to a work queue task */
> +	led_cdev->delayed_set_value = led_cdev->brightness;
> +	schedule_work(&led_cdev->set_brightness_work);
> +}

To me, it looks like there is a missing else, or return here. We don't
want both led_cdev->brightness_set() and the work queue.


> +EXPORT_SYMBOL(led_set_brightness_nosleep);

There seems to be a mixture of EXPORT_SYMBOL and
EXPORT_SYMBOL_GPL. Have you figured out the pattern? led-class.c seems
to be all _GPL, but led-core.c has a mixture.

   Andrew
--
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