* [PATCH] pinctrl: max77620: Remove an unused fields in struct max77620_pin_info and max77620_pctrl_info
@ 2024-04-01 17:30 Christophe JAILLET
2024-04-04 11:45 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2024-04-01 17:30 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-gpio
In "struct max77620_pin_info", the 'pull_config' field is unused.
In "struct max77620_pctrl_info", the 'pins_current_opt' field is unused.
Remove them.
On my x86_64 config, with allmodconfig, this shrinks the struct
max77620_pctrl_info from 360 bytes to 296.
Found with cppcheck, unusedStructMember.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Compile tested only.
---
drivers/pinctrl/pinctrl-max77620.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-max77620.c b/drivers/pinctrl/pinctrl-max77620.c
index ab723ab4ec1d..d236daa7c13e 100644
--- a/drivers/pinctrl/pinctrl-max77620.c
+++ b/drivers/pinctrl/pinctrl-max77620.c
@@ -88,7 +88,6 @@ struct max77620_pingroup {
struct max77620_pin_info {
enum max77620_pin_ppdrv drv_type;
- int pull_config;
};
struct max77620_fps_config {
@@ -104,7 +103,6 @@ struct max77620_pctrl_info {
struct device *dev;
struct pinctrl_dev *pctl;
struct regmap *rmap;
- int pins_current_opt[MAX77620_GPIO_NR];
const struct max77620_pin_function *functions;
unsigned int num_functions;
const struct max77620_pingroup *pin_groups;
--
2.44.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: max77620: Remove an unused fields in struct max77620_pin_info and max77620_pctrl_info
2024-04-01 17:30 [PATCH] pinctrl: max77620: Remove an unused fields in struct max77620_pin_info and max77620_pctrl_info Christophe JAILLET
@ 2024-04-04 11:45 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2024-04-04 11:45 UTC (permalink / raw)
To: Christophe JAILLET; +Cc: linux-kernel, kernel-janitors, linux-gpio
On Mon, Apr 1, 2024 at 7:30 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
> In "struct max77620_pin_info", the 'pull_config' field is unused.
> In "struct max77620_pctrl_info", the 'pins_current_opt' field is unused.
>
> Remove them.
>
> On my x86_64 config, with allmodconfig, this shrinks the struct
> max77620_pctrl_info from 360 bytes to 296.
>
> Found with cppcheck, unusedStructMember.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-04 11:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-01 17:30 [PATCH] pinctrl: max77620: Remove an unused fields in struct max77620_pin_info and max77620_pctrl_info Christophe JAILLET
2024-04-04 11:45 ` Linus Walleij
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 NNTP newsgroup(s).