public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] rslib: Add missing includes and update EXPORTs
Date: Tue, 24 Apr 2018 16:00:11 -0700	[thread overview]
Message-ID: <20180424230011.GA27504@beast> (raw)

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: kbuild-all@01.org
Fixes: c80cb2004afe ("rslib: Add GFP aware init function")
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
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(-)

diff --git a/include/linux/rslib.h b/include/linux/rslib.h
index 0ae635bc6d5a..e7d92fae12f3 100644
--- a/include/linux/rslib.h
+++ b/include/linux/rslib.h
@@ -11,6 +11,7 @@
 #define _RSLIB_H_
 
 #include <linux/list.h>
+#include <linux/slab.h>
 
 /**
  * struct rs_codec - rs codec data
diff --git a/lib/reed_solomon/reed_solomon.c b/lib/reed_solomon/reed_solomon.c
index e705d9877e52..dfcf54242fb9 100644
--- a/lib/reed_solomon/reed_solomon.c
+++ b/lib/reed_solomon/reed_solomon.c
@@ -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");
-- 
2.7.4


-- 
Kees Cook
Pixel Security

                 reply	other threads:[~2018-04-24 23:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180424230011.GA27504@beast \
    --to=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox