Remove __nonnull() attributes from x86 machine check architecture.

These are of the few cases where we use the GCC non-null attributes in
non-header code. As part of a review [1] of our use of such attributes we
are replacing such uses of the overly aggressive GCC attribute with clang's
_Nonnull attribute.

In this case the attributes serve little purpose as they just don't
enforce run time checks, If anything the attributes would cause NULL pointer
checks to be ignored but there are no such checks so only effect is
cosmetic.

The references appear to be left over from code development and likely
already fulfilled their purpose.

Reference [1]:
https://reviews.freebsd.org/D9004

Reviewed by:	jhb
MFC after:	3 weeks
This commit is contained in:
Pedro F. Giffuni 2017-01-13 01:39:19 +00:00
parent e046e8e680
commit be04edbb4f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=312001

View File

@ -247,7 +247,7 @@ mca_error_mmtype(uint16_t mca_error)
return ("???"); return ("???");
} }
static int __nonnull(1) static int
mca_mute(const struct mca_record *rec) mca_mute(const struct mca_record *rec)
{ {
@ -276,7 +276,7 @@ mca_mute(const struct mca_record *rec)
} }
/* Dump details about a single machine check. */ /* Dump details about a single machine check. */
static void __nonnull(1) static void
mca_log(const struct mca_record *rec) mca_log(const struct mca_record *rec)
{ {
uint16_t mca_error; uint16_t mca_error;
@ -415,7 +415,7 @@ mca_log(const struct mca_record *rec)
printf("MCA: Misc 0x%llx\n", (long long)rec->mr_misc); printf("MCA: Misc 0x%llx\n", (long long)rec->mr_misc);
} }
static int __nonnull(2) static int
mca_check_status(int bank, struct mca_record *rec) mca_check_status(int bank, struct mca_record *rec)
{ {
uint64_t status; uint64_t status;
@ -482,7 +482,7 @@ mca_refill(void *context, int pending)
mca_fill_freelist(); mca_fill_freelist();
} }
static void __nonnull(2) static void
mca_record_entry(enum scan_mode mode, const struct mca_record *record) mca_record_entry(enum scan_mode mode, const struct mca_record *record)
{ {
struct mca_internal *rec; struct mca_internal *rec;