Re: [PATCH v3 09/11] leds: max77650: add LEDs support

From: Pavel Machek
Date: Tue Feb 12 2019 - 07:10:38 EST


Hi!


> >> +static struct max77650_led *max77650_to_led(struct led_classdev *cdev)
> >> +{
> >> +    return container_of(cdev, struct max77650_led, cdev);
> >> +}
> >> +
> >> +static int max77650_led_brightness_set(struct led_classdev *cdev,
> >> +                       enum led_brightness brightness)
> >> +{
> >> +    struct max77650_led *led = max77650_to_led(cdev);
> >> +    int val, mask;
> >> +
>
> The register value and bits are only 8 bit why an int?

int is word size CPU prefers. It is ok here. If you force u8, it may
actually result in slower/bigger code.
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature