rslib: Add missing includes and update EXPORTs
PATCH 1/1 rslib: Add missing includes and update EXPORTs
After refactoring to pass down GFP_* flags, slab.h needed to be added and the EXPORTs needed to be renamed. I also moved some end-of-file EXPORTs to their respective functions as done already for the other functions in rslib.
Reported-by [email protected]
Fixes c80cb2004afe ("rslib: Add GFP aware init function")
Signed-off-by Kees Cook <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
I added the slab header and fixed up EXPORTs which the same randconfig noticed at link time after the compile-time failure got fixed.
--- include/linux/rslib.h | 1 + lib/reed_solomon/reed_solomon.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-)
include/linux/rslib.h +1 -0
@@ -11,6 +11,7 @@#define _RSLIB_H_#include <linux/list.h> +#include <linux/slab.h> /** * struct rs_codec - rs codec data
lib/reed_solomon/reed_solomon.c +3 -4
@@ -193,6 +193,7 @@ void free_rs(struct rs_control *rs)mutex_unlock (&rslistlock);kfree (rs); } +EXPORT_SYMBOL_GPL (free_rs);/** * init_rs_internal - Allocate rs control, find a matching codec or allocate a new one
@@ -289,6 +290,7 @@ struct rs_control *init_rs_gfp(int symsize, int gfpoly, int fcr, int prim, {return init_rs_internal (symsize, gfpoly,NULL , fcr, prim, nroots, gfp); } +EXPORT_SYMBOL_GPL (init_rs_gfp);/** * init_rs_non_canonical - Allocate rs control struct for fields with
@@ -308,6 +310,7 @@ struct rs_control *init_rs_non_canonical(int symsize, int (*gffunc)(int),return init_rs_internal (symsize,0 , gffunc, fcr, prim, nroots,GFP_KERNEL ); } +EXPORT_SYMBOL_GPL (init_rs_non_canonical);#ifdef CONFIG_REED_SOLOMON_ENC8 /**
@@ -411,10 +414,6 @@ int decode_rs16(struct rs_control *rsc, uint16_t *data, uint16_t *par, int len,EXPORT_SYMBOL_GPL (decode_rs16);#endif -EXPORT_SYMBOL_GPL (init_rs); -EXPORT_SYMBOL_GPL (init_rs_non_canonical); -EXPORT_SYMBOL_GPL (free_rs); -MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Reed Solomon encoder/decoder" );MODULE_AUTHOR ("Phil Karn, Thomas Gleixner" );
Signature · 6 lines
2.7.4 -- Kees Cook Pixel Security