* [PATCH] Input: iqs626a - prohibit inlining of channel parsing functions
@ 2021-11-29 0:41 Jeff LaBundy
2021-11-29 7:43 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Jeff LaBundy @ 2021-11-29 0:41 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, Jeff LaBundy, kernel test robot
Some automated builds report a stack frame size in excess
of 2 kB for iqs626_probe(); the culprit appears to be the
call to iqs626_parse_prop().
To solve this problem, specify noinline_for_stack for all
of the iqs626_parse_*() helper functions which are called
inside a for loop within iqs626_parse_prop().
As a result, a build with '-Wframe-larger-than' as low as
512 is free of any such warnings.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jeff LaBundy <jeff@labundy.com>
---
drivers/input/misc/iqs626a.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/drivers/input/misc/iqs626a.c b/drivers/input/misc/iqs626a.c
index d57e996732cf..23b5dd9552dc 100644
--- a/drivers/input/misc/iqs626a.c
+++ b/drivers/input/misc/iqs626a.c
@@ -456,9 +456,10 @@ struct iqs626_private {
unsigned int suspend_mode;
};
-static int iqs626_parse_events(struct iqs626_private *iqs626,
- const struct fwnode_handle *ch_node,
- enum iqs626_ch_id ch_id)
+static noinline_for_stack int
+iqs626_parse_events(struct iqs626_private *iqs626,
+ const struct fwnode_handle *ch_node,
+ enum iqs626_ch_id ch_id)
{
struct iqs626_sys_reg *sys_reg = &iqs626->sys_reg;
struct i2c_client *client = iqs626->client;
@@ -604,9 +605,10 @@ static int iqs626_parse_events(struct iqs626_private *iqs626,
return 0;
}
-static int iqs626_parse_ati_target(struct iqs626_private *iqs626,
- const struct fwnode_handle *ch_node,
- enum iqs626_ch_id ch_id)
+static noinline_for_stack int
+iqs626_parse_ati_target(struct iqs626_private *iqs626,
+ const struct fwnode_handle *ch_node,
+ enum iqs626_ch_id ch_id)
{
struct iqs626_sys_reg *sys_reg = &iqs626->sys_reg;
struct i2c_client *client = iqs626->client;
@@ -885,9 +887,10 @@ static int iqs626_parse_trackpad(struct iqs626_private *iqs626,
return 0;
}
-static int iqs626_parse_channel(struct iqs626_private *iqs626,
- const struct fwnode_handle *ch_node,
- enum iqs626_ch_id ch_id)
+static noinline_for_stack int
+iqs626_parse_channel(struct iqs626_private *iqs626,
+ const struct fwnode_handle *ch_node,
+ enum iqs626_ch_id ch_id)
{
struct iqs626_sys_reg *sys_reg = &iqs626->sys_reg;
struct i2c_client *client = iqs626->client;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input: iqs626a - prohibit inlining of channel parsing functions
2021-11-29 0:41 [PATCH] Input: iqs626a - prohibit inlining of channel parsing functions Jeff LaBundy
@ 2021-11-29 7:43 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2021-11-29 7:43 UTC (permalink / raw)
To: Jeff LaBundy; +Cc: linux-input, kernel test robot
On Sun, Nov 28, 2021 at 06:41:04PM -0600, Jeff LaBundy wrote:
> Some automated builds report a stack frame size in excess
> of 2 kB for iqs626_probe(); the culprit appears to be the
> call to iqs626_parse_prop().
>
> To solve this problem, specify noinline_for_stack for all
> of the iqs626_parse_*() helper functions which are called
> inside a for loop within iqs626_parse_prop().
>
> As a result, a build with '-Wframe-larger-than' as low as
> 512 is free of any such warnings.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-29 7:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 0:41 [PATCH] Input: iqs626a - prohibit inlining of channel parsing functions Jeff LaBundy
2021-11-29 7:43 ` Dmitry Torokhov
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.