All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Alexandru Soponar <asoponar@taladin.ro>
Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org,
	linux-iio@vger.kernel.org, linux-leds@vger.kernel.org,
	linux-watchdog@vger.kernel.org, jdelvare@suse.com,
	linux@roeck-us.net, jic23@kernel.org, pavel@ucw.cz,
	baocheng.su@siemens.com, wim@linux-watchdog.org,
	tobias.schaffner@siemens.com,
	angelogioacchino.delregno@collabora.com,
	benedikt.niedermayr@siemens.com, matthias.bgg@gmail.com,
	aardelean@baylibre.com, contact@sopy.one
Subject: Re: [PATCH 13/16] leds: eds-mt6370-rgb: Fix type incompatibility with find_closest()
Date: Thu, 22 May 2025 15:33:09 +0100	[thread overview]
Message-ID: <20250522143309.GA1378991@google.com> (raw)
In-Reply-To: <20250515081332.151250-14-asoponar@taladin.ro>

On Thu, 15 May 2025, Alexandru Soponar wrote:

> The common_tfreqs and mt6372_tfreqs arrays were previously declared as
> unsigned int but used with find_closest(), which now takes signed int
> parameters. Change these arrays from unsigned int to int to maintain type
> compatibility with the find_closest() function signature and prevent
> compilation errors.
> 
> Signed-off-by: Alexandru Soponar <asoponar@taladin.ro>
> ---
>  drivers/leds/rgb/leds-mt6370-rgb.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

Acked-by: Lee Jones <lee@kernel.org>

> diff --git a/drivers/leds/rgb/leds-mt6370-rgb.c b/drivers/leds/rgb/leds-mt6370-rgb.c
> index ebd3ba878dd5..6ce11432dd96 100644
> --- a/drivers/leds/rgb/leds-mt6370-rgb.c
> +++ b/drivers/leds/rgb/leds-mt6370-rgb.c
> @@ -135,7 +135,7 @@ struct mt6370_led {
>  };
>  
>  struct mt6370_pdata {
> -	const unsigned int *tfreq;
> +	const int *tfreq;
>  	unsigned int tfreq_len;
>  	u16 reg_rgb1_tr;
>  	s16 reg_rgb_chrind_tr;
> @@ -212,11 +212,11 @@ static const struct linear_range mt6372_led_ranges[R_MAX_RANGES] = {
>  	[R_LED_TOFF]	= { 250, 0, 15, 500 },
>  };
>  
> -static const unsigned int common_tfreqs[] = {
> +static const int common_tfreqs[] = {
>  	10000, 5000, 2000, 1000, 500, 200, 5, 1,
>  };
>  
> -static const unsigned int mt6372_tfreqs[] = {
> +static const int mt6372_tfreqs[] = {
>  	8000, 4000, 2000, 1000, 500, 250, 8, 4,
>  };
>  
> @@ -304,7 +304,8 @@ static int mt6370_set_led_freq(struct mt6370_priv *priv, unsigned int led_no, un
>  	const struct mt6370_pdata *pdata = priv->pdata;
>  	enum mt6370_led_field sel_field;
>  	unsigned int tfreq_len = pdata->tfreq_len;
> -	unsigned int tsum, sel;
> +	unsigned int sel;
> +	int tsum;
>  
>  	tsum = ton + toff;
>  
> -- 
> 2.49.0
> 

-- 
Lee Jones [李琼斯]

  reply	other threads:[~2025-05-22 14:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-15  8:13 [PATCH 0/16] lib: Refactor find_closest() and find_closest_descending() from macros to lib functions Alexandru Soponar
2025-05-15  8:13 ` [PATCH 01/16] hwmon: w83795: Fix type incompatibility with non-macro find_closest Alexandru Soponar
2025-05-15  8:13 ` [PATCH 02/16] hwmon: emc1403: " Alexandru Soponar
2025-05-15  8:13 ` [PATCH 03/16] hwmon: ina3221: " Alexandru Soponar
2025-05-15  8:13 ` [PATCH 04/16] hwmon: lm95234: " Alexandru Soponar
2025-05-15  8:13 ` [PATCH 05/16] hwmon: max1619: " Alexandru Soponar
2025-05-15  8:13 ` [PATCH 06/16] hwmon: lm75: " Alexandru Soponar
2025-05-15  8:13 ` [PATCH 07/16] hwmon: ltc4282: " Alexandru Soponar
2025-05-15  8:13 ` [PATCH 08/16] hwmon: max6639: " Alexandru Soponar
2025-05-15  8:13 ` [PATCH 09/16] hwmon: max20740: " Alexandru Soponar
2025-05-15  8:13 ` [PATCH 10/16] iio: ad7606: " Alexandru Soponar
2025-05-15 17:13   ` Jonathan Cameron
2025-05-15  8:13 ` [PATCH 11/16] iio: mcp3564: " Alexandru Soponar
2025-05-15 17:14   ` Jonathan Cameron
2025-05-19  8:09   ` Marius.Cristea
2025-05-15  8:13 ` [PATCH 12/16] iio: max44009: " Alexandru Soponar
2025-05-15 17:14   ` Jonathan Cameron
2025-05-15  8:13 ` [PATCH 13/16] leds: eds-mt6370-rgb: Fix type incompatibility with find_closest() Alexandru Soponar
2025-05-22 14:33   ` Lee Jones [this message]
2025-05-15  8:13 ` [PATCH 14/16] regulator: max77857: " Alexandru Soponar
2025-05-15  8:13 ` [PATCH 15/16] watchdog: simatic-ipc-wdt: " Alexandru Soponar
2025-05-15  8:13 ` [PATCH 16/16] lib: move find_closest() and find_closest_descending() to lib functions Alexandru Soponar
2025-05-19 16:35   ` David Lechner
2025-05-19 15:44 ` [PATCH 0/16] lib: Refactor find_closest() and find_closest_descending() from macros " Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250522143309.GA1378991@google.com \
    --to=lee@kernel.org \
    --cc=aardelean@baylibre.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=asoponar@taladin.ro \
    --cc=baocheng.su@siemens.com \
    --cc=benedikt.niedermayr@siemens.com \
    --cc=contact@sopy.one \
    --cc=jdelvare@suse.com \
    --cc=jic23@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=matthias.bgg@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=tobias.schaffner@siemens.com \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.