]> git.baikalelectronics.ru Git - kernel.git/commit
net/core: work around section mismatch warning for ptp_classifier
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 15 Apr 2019 17:14:45 +0000 (19:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Apr 2019 03:46:17 +0000 (20:46 -0700)
commit645a468ac1cccd7854cf12f7a04da3ebc7628e5b
tree94815209f5a50aaa29411e6e5511f5076f049b68
parent37e5722de0a08bdcb278256bd37b1ca81802e258
net/core: work around section mismatch warning for ptp_classifier

The routine ptp_classifier_init() uses an initializer for an
automatic struct type variable which refers to an __initdata
symbol. This is perfectly legal, but may trigger a section
mismatch warning when running the compiler in -fpic mode, due
to the fact that the initializer may be emitted into an anonymous
.data section thats lack the __init annotation. So work around it
by using assignments instead.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/ptp_classifier.c