Commit 43247ab
EDAC/sb_edac: Fix the compile warning of large frame size
Compiling sb_edac driver with GCC 11.4.0 and the W=1 option reported
the following warning:
drivers/edac/sb_edac.c: In function ‘sbridge_mce_output_error’:
drivers/edac/sb_edac.c:3249:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
As there is no concurrent invocation of sbridge_mce_output_error(),
fix this warning by moving the large-size variables 'msg' and 'msg_full'
from the stack to the pre-allocated data segment.
[Tony: Fix checkpatch warnings for code alignment & use of strcpy()]
Reported-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/all/20240829120903.84152-1-qiuxu.zhuo@intel.com1 parent 7a33c14 commit 43247ab
1 file changed
Lines changed: 18 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
3079 | 3081 | | |
3080 | 3082 | | |
3081 | 3083 | | |
3082 | | - | |
3083 | 3084 | | |
3084 | 3085 | | |
3085 | 3086 | | |
| |||
3095 | 3096 | | |
3096 | 3097 | | |
3097 | 3098 | | |
| 3099 | + | |
3098 | 3100 | | |
3099 | 3101 | | |
3100 | 3102 | | |
3101 | | - | |
3102 | 3103 | | |
3103 | 3104 | | |
3104 | 3105 | | |
| |||
3168 | 3169 | | |
3169 | 3170 | | |
3170 | 3171 | | |
3171 | | - | |
3172 | | - | |
3173 | | - | |
3174 | | - | |
3175 | | - | |
3176 | | - | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
3177 | 3178 | | |
3178 | 3179 | | |
3179 | 3180 | | |
3180 | | - | |
| 3181 | + | |
3181 | 3182 | | |
3182 | 3183 | | |
3183 | 3184 | | |
3184 | 3185 | | |
3185 | 3186 | | |
3186 | | - | |
| 3187 | + | |
3187 | 3188 | | |
3188 | 3189 | | |
3189 | | - | |
| 3190 | + | |
3190 | 3191 | | |
3191 | 3192 | | |
3192 | 3193 | | |
3193 | 3194 | | |
3194 | 3195 | | |
3195 | 3196 | | |
3196 | | - | |
| 3197 | + | |
3197 | 3198 | | |
3198 | 3199 | | |
3199 | 3200 | | |
| |||
3218 | 3219 | | |
3219 | 3220 | | |
3220 | 3221 | | |
3221 | | - | |
| 3222 | + | |
3222 | 3223 | | |
3223 | 3224 | | |
3224 | 3225 | | |
3225 | 3226 | | |
3226 | 3227 | | |
3227 | 3228 | | |
3228 | 3229 | | |
3229 | | - | |
| 3230 | + | |
3230 | 3231 | | |
3231 | | - | |
| 3232 | + | |
3232 | 3233 | | |
3233 | 3234 | | |
3234 | 3235 | | |
| |||
3239 | 3240 | | |
3240 | 3241 | | |
3241 | 3242 | | |
3242 | | - | |
| 3243 | + | |
3243 | 3244 | | |
3244 | 3245 | | |
3245 | 3246 | | |
3246 | 3247 | | |
3247 | | - | |
| 3248 | + | |
3248 | 3249 | | |
3249 | 3250 | | |
3250 | 3251 | | |
| |||
0 commit comments