Linux-ARM-Kernel Archive mirror
 help / color / mirror / Atom feed
* [PATCH] leds: mt6370: Remove an unused field in struct mt6370_priv
@ 2024-04-28 18:27 Christophe JAILLET
  2024-04-29  8:13 ` AngeloGioacchino Del Regno
  2024-05-02 17:13 ` (subset) " Lee Jones
  0 siblings, 2 replies; 5+ messages in thread
From: Christophe JAILLET @ 2024-04-28 18:27 UTC (permalink / raw
  To: Pavel Machek, Lee Jones, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-leds,
	linux-arm-kernel, linux-mediatek

In "struct mt6370_priv", the 'reg_cfgs' field is unused.

Moreover the "struct reg_cfg" is defined nowhere. Neither in this file, nor
in a global .h file, so it is completely pointless.

Remove it.

Found with cppcheck, unusedStructMember.

So, remove it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Compile tested only.
---
 drivers/leds/rgb/leds-mt6370-rgb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/leds/rgb/leds-mt6370-rgb.c b/drivers/leds/rgb/leds-mt6370-rgb.c
index 448d0da11848..359ef00498b4 100644
--- a/drivers/leds/rgb/leds-mt6370-rgb.c
+++ b/drivers/leds/rgb/leds-mt6370-rgb.c
@@ -149,7 +149,6 @@ struct mt6370_priv {
 	struct regmap_field *fields[F_MAX_FIELDS];
 	const struct reg_field *reg_fields;
 	const struct linear_range *ranges;
-	struct reg_cfg *reg_cfgs;
 	const struct mt6370_pdata *pdata;
 	unsigned int leds_count;
 	unsigned int leds_active;
-- 
2.44.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] leds: mt6370: Remove an unused field in struct mt6370_priv
  2024-04-28 18:27 [PATCH] leds: mt6370: Remove an unused field in struct mt6370_priv Christophe JAILLET
@ 2024-04-29  8:13 ` AngeloGioacchino Del Regno
  2024-04-29 18:31   ` Christophe JAILLET
  2024-05-02 17:13 ` (subset) " Lee Jones
  1 sibling, 1 reply; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-04-29  8:13 UTC (permalink / raw
  To: Christophe JAILLET, Pavel Machek, Lee Jones, Matthias Brugger
  Cc: linux-kernel, kernel-janitors, linux-leds, linux-arm-kernel,
	linux-mediatek

Il 28/04/24 20:27, Christophe JAILLET ha scritto:
> In "struct mt6370_priv", the 'reg_cfgs' field is unused.
> 
> Moreover the "struct reg_cfg" is defined nowhere. Neither in this file, nor
> in a global .h file, so it is completely pointless.
> 
> Remove it.

Sure

> 
> Found with cppcheck, unusedStructMember.
> 
> So, remove it.

Again?! :-P

> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>


Anyway, this commit misses a Fixes tag; please add the relevant one, after which,

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

> ---
> Compile tested only.
> ---
>   drivers/leds/rgb/leds-mt6370-rgb.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/leds/rgb/leds-mt6370-rgb.c b/drivers/leds/rgb/leds-mt6370-rgb.c
> index 448d0da11848..359ef00498b4 100644
> --- a/drivers/leds/rgb/leds-mt6370-rgb.c
> +++ b/drivers/leds/rgb/leds-mt6370-rgb.c
> @@ -149,7 +149,6 @@ struct mt6370_priv {
>   	struct regmap_field *fields[F_MAX_FIELDS];
>   	const struct reg_field *reg_fields;
>   	const struct linear_range *ranges;
> -	struct reg_cfg *reg_cfgs;
>   	const struct mt6370_pdata *pdata;
>   	unsigned int leds_count;
>   	unsigned int leds_active;



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] leds: mt6370: Remove an unused field in struct mt6370_priv
  2024-04-29  8:13 ` AngeloGioacchino Del Regno
@ 2024-04-29 18:31   ` Christophe JAILLET
  2024-05-02 17:14     ` Lee Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Christophe JAILLET @ 2024-04-29 18:31 UTC (permalink / raw
  To: AngeloGioacchino Del Regno, Pavel Machek, Lee Jones,
	Matthias Brugger
  Cc: linux-kernel, kernel-janitors, linux-leds, linux-arm-kernel,
	linux-mediatek

Le 29/04/2024 à 10:13, AngeloGioacchino Del Regno a écrit :
> Il 28/04/24 20:27, Christophe JAILLET ha scritto:
>> In "struct mt6370_priv", the 'reg_cfgs' field is unused.
>>
>> Moreover the "struct reg_cfg" is defined nowhere. Neither in this 
>> file, nor
>> in a global .h file, so it is completely pointless.
>>
>> Remove it.
> 
> Sure
> 
>>
>> Found with cppcheck, unusedStructMember.
>>
>> So, remove it.
> 
> Again?! :-P

Yes. This way we safe twice the memory space :).

> 
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> 
> Anyway, this commit misses a Fixes tag; please add the relevant one, 
> after which,

Will do, but this patch does not fix anything.
It is just a clean-up.

CJ

> 
> Reviewed-by: AngeloGioacchino Del Regno 
> <angelogioacchino.delregno@collabora.com>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: (subset) [PATCH] leds: mt6370: Remove an unused field in struct mt6370_priv
  2024-04-28 18:27 [PATCH] leds: mt6370: Remove an unused field in struct mt6370_priv Christophe JAILLET
  2024-04-29  8:13 ` AngeloGioacchino Del Regno
@ 2024-05-02 17:13 ` Lee Jones
  1 sibling, 0 replies; 5+ messages in thread
From: Lee Jones @ 2024-05-02 17:13 UTC (permalink / raw
  To: Pavel Machek, Lee Jones, Matthias Brugger,
	AngeloGioacchino Del Regno, Christophe JAILLET
  Cc: linux-kernel, kernel-janitors, linux-leds, linux-arm-kernel,
	linux-mediatek

On Sun, 28 Apr 2024 20:27:31 +0200, Christophe JAILLET wrote:
> In "struct mt6370_priv", the 'reg_cfgs' field is unused.
> 
> Moreover the "struct reg_cfg" is defined nowhere. Neither in this file, nor
> in a global .h file, so it is completely pointless.
> 
> Remove it.
> 
> [...]

Applied, thanks!

[1/1] leds: mt6370: Remove an unused field in struct mt6370_priv
      commit: f2994f5341e03b8680a88abc5f1dee950033c3a9

--
Lee Jones [李琼斯]


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] leds: mt6370: Remove an unused field in struct mt6370_priv
  2024-04-29 18:31   ` Christophe JAILLET
@ 2024-05-02 17:14     ` Lee Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2024-05-02 17:14 UTC (permalink / raw
  To: Christophe JAILLET
  Cc: AngeloGioacchino Del Regno, Pavel Machek, Matthias Brugger,
	linux-kernel, kernel-janitors, linux-leds, linux-arm-kernel,
	linux-mediatek

On Mon, 29 Apr 2024, Christophe JAILLET wrote:

> Le 29/04/2024 à 10:13, AngeloGioacchino Del Regno a écrit :
> > Il 28/04/24 20:27, Christophe JAILLET ha scritto:
> > > In "struct mt6370_priv", the 'reg_cfgs' field is unused.
> > > 
> > > Moreover the "struct reg_cfg" is defined nowhere. Neither in this
> > > file, nor
> > > in a global .h file, so it is completely pointless.
> > > 
> > > Remove it.
> > 
> > Sure
> > 
> > > 
> > > Found with cppcheck, unusedStructMember.
> > > 
> > > So, remove it.
> > 
> > Again?! :-P
> 
> Yes. This way we safe twice the memory space :).

I changed all of the commit messages in this disjointed set to flow a
little better.  No need for a Fixes tag either I feel.

-- 
Lee Jones [李琼斯]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-02 17:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-28 18:27 [PATCH] leds: mt6370: Remove an unused field in struct mt6370_priv Christophe JAILLET
2024-04-29  8:13 ` AngeloGioacchino Del Regno
2024-04-29 18:31   ` Christophe JAILLET
2024-05-02 17:14     ` Lee Jones
2024-05-02 17:13 ` (subset) " Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).