perf cs-etm: Improve missing sink warning message
[linux-2.6-microblaze.git] / kernel / padata.c
index de90af5..e007b8a 100644 (file)
@@ -83,8 +83,16 @@ static struct padata_work *padata_work_alloc(void)
        return pw;
 }
 
-static void padata_work_init(struct padata_work *pw, work_func_t work_fn,
-                            void *data, int flags)
+/*
+ * This function is marked __ref because this function may be optimized in such
+ * a way that it directly refers to work_fn's address, which causes modpost to
+ * complain when work_fn is marked __init. This scenario was observed with clang
+ * LTO, where padata_work_init() was optimized to refer directly to
+ * padata_mt_helper() because the calls to padata_work_init() with other work_fn
+ * values were eliminated or inlined.
+ */
+static void __ref padata_work_init(struct padata_work *pw, work_func_t work_fn,
+                                  void *data, int flags)
 {
        if (flags & PADATA_WORK_ONSTACK)
                INIT_WORK_ONSTACK(&pw->pw_work, work_fn);