livepatch: samples: non static warnings fix
authorNicholas Mc Guire <hofrat@osadl.org>
Thu, 24 Jan 2019 01:48:16 +0000 (02:48 +0100)
committerJiri Kosina <jkosina@suse.cz>
Fri, 25 Jan 2019 15:43:35 +0000 (16:43 +0100)
commitb73d5dc72272c0012999f939476b703d269d21b6
treef7badad5904aa7d595e47f036433dc81c8f4ac7c
parenta6c34247af70053219fcfa711bfc5e0d0d954daf
livepatch: samples: non static warnings fix

Sparse reported warnings about non-static symbols. For the variables
a simple static attribute is fine - for the functions referenced by
livepatch via klp_func the symbol-names must be unmodified in the
symbol table and the patchable code has to be emitted. The resolution
is to attach __used attribute to the shared statically declared functions.

Link: https://lore.kernel.org/lkml/1544965657-26804-1-git-send-email-hofrat@osadl.org/
Suggested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
samples/livepatch/livepatch-shadow-fix1.c
samples/livepatch/livepatch-shadow-fix2.c
samples/livepatch/livepatch-shadow-mod.c