[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190212121032.GC25613@amd>
Date: Tue, 12 Feb 2019 13:10:32 +0100
From: Pavel Machek <pavel@....cz>
To: Dan Murphy <dmurphy@...com>
Cc: Jacek Anaszewski <jacek.anaszewski@...il.com>,
Bartosz Golaszewski <brgl@...ev.pl>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Linus Walleij <linus.walleij@...aro.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Lee Jones <lee.jones@...aro.org>,
Sebastian Reichel <sre@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
devicetree@...r.kernel.org, linux-input@...r.kernel.org,
linux-leds@...r.kernel.org, linux-pm@...r.kernel.org,
Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH v3 09/11] leds: max77650: add LEDs support
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
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists