Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1291393
| From | Ross Zwisler <zwisler@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHV2 1/3] x86, ras: Add new infrastructure for machine check fixup tables |
| Date | 2015-12-14 19:00 +0100 |
| Message-ID | <qFFzI-Ts-3@gated-at.bofh.it> (permalink) |
| References | <qEBHP-ir-5@gated-at.bofh.it> <qEBHP-ir-3@gated-at.bofh.it> <qEPrs-PW-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, Dec 12, 2015 at 3:11 AM, Borislav Petkov <bp@alien8.de> wrote:
> On Thu, Dec 10, 2015 at 01:58:04PM -0800, Tony Luck wrote:
<>
>> +#ifdef CONFIG_MCE_KERNEL_RECOVERY
>> +/* Given an address, look for it in the machine check exception tables. */
>> +const struct exception_table_entry *search_mcexception_tables(
>> + unsigned long addr)
>> +{
>> + const struct exception_table_entry *e;
>> +
>> + e = search_extable(__start___mcex_table, __stop___mcex_table-1, addr);
>> + return e;
>> +}
>> +#endif
>
> You can make this one a bit more readable by doing:
>
> /* Given an address, look for it in the machine check exception tables. */
> const struct exception_table_entry *
> search_mcexception_tables(unsigned long addr)
> {
> #ifdef CONFIG_MCE_KERNEL_RECOVERY
> return search_extable(__start___mcex_table,
> __stop___mcex_table - 1, addr);
> #endif
> }
With this code if CONFIG_MCE_KERNEL_RECOVERY isn't defined you'll get
a compiler error that the function doesn't have a return statement,
right? I think we need an #else to return NULL, or to have the #ifdef
encompass the whole function definition as it was in Tony's version.
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCHV2 1/3] x86, ras: Add new infrastructure for machine check fixup tables Borislav Petkov <bp@alien8.de> - 2015-12-12 11:20 +0100
Re: [PATCHV2 1/3] x86, ras: Add new infrastructure for machine check fixup tables Ross Zwisler <zwisler@gmail.com> - 2015-12-14 19:00 +0100
Re: [PATCHV2 1/3] x86, ras: Add new infrastructure for machine check fixup tables Borislav Petkov <bp@alien8.de> - 2015-12-14 23:30 +0100
Re: [PATCHV2 1/3] x86, ras: Add new infrastructure for machine check fixup tables "Luck, Tony" <tony.luck@intel.com> - 2015-12-15 02:10 +0100
Re: [PATCHV2 1/3] x86, ras: Add new infrastructure for machine check fixup tables Borislav Petkov <bp@alien8.de> - 2015-12-15 10:50 +0100
Re: [PATCHV2 1/3] x86, ras: Add new infrastructure for machine check fixup tables Borislav Petkov <bp@alien8.de> - 2015-12-15 11:50 +0100
csiph-web