Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1157784 > unrolled thread
| Started by | Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com> |
|---|---|
| First post | 2015-06-03 17:40 +0200 |
| Last post | 2015-06-03 18:30 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH V2 3/9] edac, mce_amd_inj: Modify flags attrigute to use string arguments Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com> - 2015-06-03 17:40 +0200
Re: [PATCH V2 3/9] edac, mce_amd_inj: Modify flags attrigute to use string arguments Borislav Petkov <bp@alien8.de> - 2015-06-03 18:10 +0200
Re: [PATCH V2 3/9] edac, mce_amd_inj: Modify flags attrigute to use string arguments Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com> - 2015-06-03 18:30 +0200
| From | Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com> |
|---|---|
| Date | 2015-06-03 17:40 +0200 |
| Subject | Re: [PATCH V2 3/9] edac, mce_amd_inj: Modify flags attrigute to use string arguments |
| Message-ID | <pxiVR-5gl-19@gated-at.bofh.it> |
On 6/3/2015 9:50 AM, Borislav Petkov wrote:
> On Tue, Jun 02, 2015 at 03:35:56PM -0500, Aravind Gopalakrishnan wrote:
>
>
>> +
>> + buf[cnt - 1] = 0;
>> +
>> + /* strip whitespaces.. */
>> + strstrip(buf);
> Didn't your compiler trigger that:
>
> drivers/edac/mce_amd_inj.c: In function ‘flags_write’:
> drivers/edac/mce_amd_inj.c:146:2: warning: ignoring return value of ‘strstrip’, declared with attribute warn_unused_result [-Wunused-result]
> strstrip(buf);
> ^
>
> ?
Oddly, No. The only thing I got was:
arch/x86/kernel/cpu/microcode/intel_early.c: In function
âget_matching_model_microcode.isra.2.constprop.7â:
arch/x86/kernel/cpu/microcode/intel_early.c:348:1: warning: the frame
size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=]
}
^
>
> Because it is a valid warning. You need to take the return value. I
> fixed it up like this:
Thanks for fixing it.
-Aravind.
> ---
> diff --git a/drivers/edac/mce_amd_inj.c b/drivers/edac/mce_amd_inj.c
> index c129a8da34b2..5c847fe6e9bd 100644
> --- a/drivers/edac/mce_amd_inj.c
> +++ b/drivers/edac/mce_amd_inj.c
> @@ -128,7 +128,7 @@ static ssize_t flags_read(struct file *filp, char __user *ubuf,
> static ssize_t flags_write(struct file *filp, const char __user *ubuf,
> size_t cnt, loff_t *ppos)
> {
> - char buf[MAX_FLAG_OPT_SIZE];
> + char buf[MAX_FLAG_OPT_SIZE], *__buf;
> int err;
> size_t ret;
>
> @@ -142,12 +142,12 @@ static ssize_t flags_write(struct file *filp, const char __user *ubuf,
>
> buf[cnt - 1] = 0;
>
> - /* strip whitespaces.. */
> - strstrip(buf);
> + /* strip whitespace */
> + __buf = strstrip(buf);
>
> - err = __set_inj(buf);
> + err = __set_inj(__buf);
> if (err) {
> - pr_err("%s: Invalid flags value: %s\n", __func__, buf);
> + pr_err("%s: Invalid flags value: %s\n", __func__, __buf);
> return err;
> }
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2015-06-03 18:10 +0200 |
| Message-ID | <pxjoR-64y-15@gated-at.bofh.it> |
| In reply to | #1157784 |
On Wed, Jun 03, 2015 at 10:34:50AM -0500, Aravind Gopalakrishnan wrote:
> Oddly, No. The only thing I got was:
> arch/x86/kernel/cpu/microcode/intel_early.c: In function
> âget_matching_model_microcode.isra.2.constprop.7â:
> arch/x86/kernel/cpu/microcode/intel_early.c:348:1: warning: the frame size
> of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> }
> ^
32-bit?
Because on 64-bit, that frame size is relaxed to 2K.
config FRAME_WARN
int "Warn for stack frames larger than (needs gcc 4.4)"
range 0 8192
default 1024 if !64BIT
default 2048 if 64BIT
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com> |
|---|---|
| Date | 2015-06-03 18:30 +0200 |
| Message-ID | <pxjIf-6rK-27@gated-at.bofh.it> |
| In reply to | #1157806 |
On 6/3/2015 11:00 AM, Borislav Petkov wrote: > On Wed, Jun 03, 2015 at 10:34:50AM -0500, Aravind Gopalakrishnan wrote: >> Oddly, No. The only thing I got was: >> arch/x86/kernel/cpu/microcode/intel_early.c: In function >> âget_matching_model_microcode.isra.2.constprop.7â: >> arch/x86/kernel/cpu/microcode/intel_early.c:348:1: warning: the frame size >> of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=] >> } >> ^ > 32-bit? > > Because on 64-bit, that frame size is relaxed to 2K. > > config FRAME_WARN > int "Warn for stack frames larger than (needs gcc 4.4)" > range 0 8192 > default 1024 if !64BIT > default 2048 if 64BIT > Nope. But it's still set to 1K for me, and I think I know where the problem might have originated from.. I used a generic distro (Ubuntu) config as base when I first built the kernel, and I see that on Ubuntu's 'generic' configs, the value for FRAME_WARN is 1K. (Btw, I did install a 64-bit version of the distro on the system to begin with.. guess they just set it to 1K always) When I do make defconfig, this is set to 2K properly. Thanks, -Aravind -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web