]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.4.165/misc-atmel-ssc-fix-section-annotation-on-atmel_ssc_get_driver_data.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.4.165 / misc-atmel-ssc-fix-section-annotation-on-atmel_ssc_get_driver_data.patch
CommitLineData
704fbcc2
GKH
1From 7c97301285b62a41d6bceded7d964085fc8cc50f Mon Sep 17 00:00:00 2001
2From: Nathan Chancellor <natechancellor@gmail.com>
3Date: Wed, 17 Oct 2018 10:09:02 -0700
4Subject: misc: atmel-ssc: Fix section annotation on atmel_ssc_get_driver_data
5
6From: Nathan Chancellor <natechancellor@gmail.com>
7
8commit 7c97301285b62a41d6bceded7d964085fc8cc50f upstream.
9
10After building the kernel with Clang, the following section mismatch
11warning appears:
12
13WARNING: vmlinux.o(.text+0x3bf19a6): Section mismatch in reference from
14the function ssc_probe() to the function
15.init.text:atmel_ssc_get_driver_data()
16The function ssc_probe() references
17the function __init atmel_ssc_get_driver_data().
18This is often because ssc_probe lacks a __init
19annotation or the annotation of atmel_ssc_get_driver_data is wrong.
20
21Remove __init from atmel_ssc_get_driver_data to get rid of the mismatch.
22
23Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
24Cc: stable <stable@vger.kernel.org>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26
27---
28 drivers/misc/atmel-ssc.c | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
30
31--- a/drivers/misc/atmel-ssc.c
32+++ b/drivers/misc/atmel-ssc.c
33@@ -129,7 +129,7 @@ static const struct of_device_id atmel_s
34 MODULE_DEVICE_TABLE(of, atmel_ssc_dt_ids);
35 #endif
36
37-static inline const struct atmel_ssc_platform_data * __init
38+static inline const struct atmel_ssc_platform_data *
39 atmel_ssc_get_driver_data(struct platform_device *pdev)
40 {
41 if (pdev->dev.of_node) {