Skip to content

Commit e1f5e84

Browse files
jlabundydtor
authored andcommitted
Input: iqs626a - prohibit inlining of channel parsing functions
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 <[email protected]> Signed-off-by: Jeff LaBundy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 9222ba6 commit e1f5e84

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

drivers/input/misc/iqs626a.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,10 @@ struct iqs626_private {
456456
unsigned int suspend_mode;
457457
};
458458

459-
static int iqs626_parse_events(struct iqs626_private *iqs626,
460-
const struct fwnode_handle *ch_node,
461-
enum iqs626_ch_id ch_id)
459+
static noinline_for_stack int
460+
iqs626_parse_events(struct iqs626_private *iqs626,
461+
const struct fwnode_handle *ch_node,
462+
enum iqs626_ch_id ch_id)
462463
{
463464
struct iqs626_sys_reg *sys_reg = &iqs626->sys_reg;
464465
struct i2c_client *client = iqs626->client;
@@ -604,9 +605,10 @@ static int iqs626_parse_events(struct iqs626_private *iqs626,
604605
return 0;
605606
}
606607

607-
static int iqs626_parse_ati_target(struct iqs626_private *iqs626,
608-
const struct fwnode_handle *ch_node,
609-
enum iqs626_ch_id ch_id)
608+
static noinline_for_stack int
609+
iqs626_parse_ati_target(struct iqs626_private *iqs626,
610+
const struct fwnode_handle *ch_node,
611+
enum iqs626_ch_id ch_id)
610612
{
611613
struct iqs626_sys_reg *sys_reg = &iqs626->sys_reg;
612614
struct i2c_client *client = iqs626->client;
@@ -885,9 +887,10 @@ static int iqs626_parse_trackpad(struct iqs626_private *iqs626,
885887
return 0;
886888
}
887889

888-
static int iqs626_parse_channel(struct iqs626_private *iqs626,
889-
const struct fwnode_handle *ch_node,
890-
enum iqs626_ch_id ch_id)
890+
static noinline_for_stack int
891+
iqs626_parse_channel(struct iqs626_private *iqs626,
892+
const struct fwnode_handle *ch_node,
893+
enum iqs626_ch_id ch_id)
891894
{
892895
struct iqs626_sys_reg *sys_reg = &iqs626->sys_reg;
893896
struct i2c_client *client = iqs626->client;

0 commit comments

Comments
 (0)