File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 3
3
#define _ASM_POWERPC_MACHDEP_H
4
4
#ifdef __KERNEL__
5
5
6
+ #include <linux/compiler.h>
6
7
#include <linux/seq_file.h>
7
8
#include <linux/init.h>
8
9
#include <linux/dma-mapping.h>
@@ -220,11 +221,16 @@ extern struct machdep_calls *machine_id;
220
221
EXPORT_SYMBOL(mach_##name); \
221
222
struct machdep_calls mach_##name __machine_desc =
222
223
223
- #define machine_is (name ) \
224
- ({ \
225
- extern struct machdep_calls mach_##name \
226
- __attribute__((weak)); \
227
- machine_id == &mach_##name; \
224
+ static inline bool __machine_is (const struct machdep_calls * md )
225
+ {
226
+ WARN_ON (!machine_id ); // complain if used before probe_machine()
227
+ return machine_id == md ;
228
+ }
229
+
230
+ #define machine_is (name ) \
231
+ ({ \
232
+ extern struct machdep_calls mach_##name __weak; \
233
+ __machine_is(&mach_##name); \
228
234
})
229
235
230
236
static inline void log_error (char * buf , unsigned int err_type , int fatal )
You can’t perform that action at this time.
0 commit comments