Skip to content

Commit 27d8071

Browse files
arndbdavem330
authored andcommitted
ISDN: eicon: reduce stack size of sig_ind function
I noticed that this function uses a lot of kernel stack when the "latent entropy" plugin is enabled: drivers/isdn/hardware/eicon/message.c: In function 'sig_ind': drivers/isdn/hardware/eicon/message.c:6113:1: error: the frame size of 1168 bytes is larger than 1152 bytes [-Werror=frame-larger-than=] We currently don't warn about this, as we raise the warning limit to 2048 bytes in mainline, but I'd like to lower that limit again in the future, and this function can easily be changed to be more efficient and avoid that warning, by making some of its local variables 'const'. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5b9d6b1 commit 27d8071

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/isdn/hardware/eicon/message.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static word plci_remove_check(PLCI *);
147147
static void listen_check(DIVA_CAPI_ADAPTER *);
148148
static byte AddInfo(byte **, byte **, byte *, byte *);
149149
static byte getChannel(API_PARSE *);
150-
static void IndParse(PLCI *, word *, byte **, byte);
150+
static void IndParse(PLCI *, const word *, byte **, byte);
151151
static byte ie_compare(byte *, byte *);
152152
static word find_cip(DIVA_CAPI_ADAPTER *, byte *, byte *);
153153
static word CPN_filter_ok(byte *cpn, DIVA_CAPI_ADAPTER *, word);
@@ -4858,20 +4858,20 @@ static void sig_ind(PLCI *plci)
48584858
/* included before the ESC_MSGTYPE and MAXPARMSIDS has to be incremented */
48594859
/* SMSG is situated at the end because its 0 (for compatibility reasons */
48604860
/* (see Info_Mask Bit 4, first IE. then the message type) */
4861-
word parms_id[] =
4861+
static const word parms_id[] =
48624862
{MAXPARMSIDS, CPN, 0xff, DSA, OSA, BC, LLC, HLC, ESC_CAUSE, DSP, DT, CHA,
48634863
UUI, CONG_RR, CONG_RNR, ESC_CHI, KEY, CHI, CAU, ESC_LAW,
48644864
RDN, RDX, CONN_NR, RIN, NI, CAI, ESC_CR,
48654865
CST, ESC_PROFILE, 0xff, ESC_MSGTYPE, SMSG};
48664866
/* 14 FTY repl by ESC_CHI */
48674867
/* 18 PI repl by ESC_LAW */
48684868
/* removed OAD changed to 0xff for future use, OAD is multiIE now */
4869-
word multi_fac_id[] = {1, FTY};
4870-
word multi_pi_id[] = {1, PI};
4871-
word multi_CiPN_id[] = {1, OAD};
4872-
word multi_ssext_id[] = {1, ESC_SSEXT};
4869+
static const word multi_fac_id[] = {1, FTY};
4870+
static const word multi_pi_id[] = {1, PI};
4871+
static const word multi_CiPN_id[] = {1, OAD};
4872+
static const word multi_ssext_id[] = {1, ESC_SSEXT};
48734873

4874-
word multi_vswitch_id[] = {1, ESC_VSWITCH};
4874+
static const word multi_vswitch_id[] = {1, ESC_VSWITCH};
48754875

48764876
byte *cau;
48774877
word ncci;
@@ -8924,7 +8924,7 @@ static void listen_check(DIVA_CAPI_ADAPTER *a)
89248924
/* functions for all parameters sent in INDs */
89258925
/*------------------------------------------------------------------*/
89268926

8927-
static void IndParse(PLCI *plci, word *parms_id, byte **parms, byte multiIEsize)
8927+
static void IndParse(PLCI *plci, const word *parms_id, byte **parms, byte multiIEsize)
89288928
{
89298929
word ploc; /* points to current location within packet */
89308930
byte w;

0 commit comments

Comments
 (0)