Merge branch 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux
[firefly-linux-kernel-4.4.55.git] / fs / befs / debug.c
index e831a8f30849a98a088d46394742cc3b4c476182..622e73775c83e91da573ff7266688d19e25f3dca 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/spinlock.h>
 #include <linux/kernel.h>
 #include <linux/fs.h>
+#include <linux/slab.h>
 
 #endif                         /* __KERNEL__ */
 
@@ -28,7 +29,7 @@ void
 befs_error(const struct super_block *sb, const char *fmt, ...)
 {
        va_list args;
-       char *err_buf = (char *) kmalloc(ERRBUFSIZE, GFP_KERNEL);
+       char *err_buf = kmalloc(ERRBUFSIZE, GFP_KERNEL);
        if (err_buf == NULL) {
                printk(KERN_ERR "could not allocate %d bytes\n", ERRBUFSIZE);
                return;
@@ -46,7 +47,7 @@ void
 befs_warning(const struct super_block *sb, const char *fmt, ...)
 {
        va_list args;
-       char *err_buf = (char *) kmalloc(ERRBUFSIZE, GFP_KERNEL);
+       char *err_buf = kmalloc(ERRBUFSIZE, GFP_KERNEL);
        if (err_buf == NULL) {
                printk(KERN_ERR "could not allocate %d bytes\n", ERRBUFSIZE);
                return;
@@ -70,7 +71,7 @@ befs_debug(const struct super_block *sb, const char *fmt, ...)
        char *err_buf = NULL;
 
        if (BEFS_SB(sb)->mount_opts.debug) {
-               err_buf = (char *) kmalloc(ERRBUFSIZE, GFP_KERNEL);
+               err_buf = kmalloc(ERRBUFSIZE, GFP_KERNEL);
                if (err_buf == NULL) {
                        printk(KERN_ERR "could not allocate %d bytes\n",
                                ERRBUFSIZE);