Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a528957 authored by Joe Perches's avatar Joe Perches Committed by David Woodhouse
Browse files

jffs2: Use pr_fmt and remove jffs: from formats



Use pr_fmt to prefix KBUILD_MODNAME to appropriate logging messages.

Remove now unnecessary internal prefixes from formats.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent da320f05
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@
 *
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/fs.h>
+4 −3
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@
 *
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/kernel.h>
#include <linux/jffs2.h>
#include <linux/mtd/mtd.h>
@@ -48,8 +50,7 @@ int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c)
		ret = PTR_ERR(tsk);
	} else {
		/* Wait for it... */
		jffs2_dbg(1, "JFFS2: Garbage collect thread is pid %d\n",
			  tsk->pid);
		jffs2_dbg(1, "Garbage collect thread is pid %d\n", tsk->pid);
		wait_for_completion(&c->gc_thread_start);
		ret = tsk->pid;
	}
@@ -62,7 +63,7 @@ void jffs2_stop_garbage_collect_thread(struct jffs2_sb_info *c)
	int wait = 0;
	spin_lock(&c->erase_completion_lock);
	if (c->gc_task) {
		jffs2_dbg(1, "jffs2: Killing GC task %d\n", c->gc_task->pid);
		jffs2_dbg(1, "Killing GC task %d\n", c->gc_task->pid);
		send_sig(SIGKILL, c->gc_task, 1);
		wait = 1;
	}
+4 −2
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@
 *
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/slab.h>
@@ -307,7 +309,7 @@ static void jffs2_calc_trigger_levels(struct jffs2_sb_info *c)
	   trying to GC to make more space. It'll be a fruitless task */
	c->nospc_dirty_size = c->sector_size + (c->flash_size / 100);

	dbg_fsbuild("JFFS2 trigger levels (size %d KiB, block size %d KiB, %d blocks)\n",
	dbg_fsbuild("trigger levels (size %d KiB, block size %d KiB, %d blocks)\n",
		    c->flash_size / 1024, c->sector_size / 1024, c->nr_blocks);
	dbg_fsbuild("Blocks required to allow deletion:    %d (%d KiB)\n",
		  c->resv_blocks_deletion, c->resv_blocks_deletion*c->sector_size/1024);
+11 −10
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@
 *
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include "compr.h"

static DEFINE_SPINLOCK(jffs2_compressor_list_lock);
@@ -79,7 +81,7 @@ static int jffs2_selected_compress(u8 compr, unsigned char *data_in,

	output_buf = kmalloc(*cdatalen, GFP_KERNEL);
	if (!output_buf) {
		pr_warn("JFFS2: No memory for compressor allocation. Compression failed.\n");
		pr_warn("No memory for compressor allocation. Compression failed.\n");
		return ret;
	}
	orig_slen = *datalen;
@@ -188,7 +190,7 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
				tmp_buf = kmalloc(orig_slen, GFP_KERNEL);
				spin_lock(&jffs2_compressor_list_lock);
				if (!tmp_buf) {
					pr_warn("JFFS2: No memory for compressor allocation. (%d bytes)\n",
					pr_warn("No memory for compressor allocation. (%d bytes)\n",
						orig_slen);
					continue;
				}
@@ -236,7 +238,7 @@ uint16_t jffs2_compress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
				cpage_out, datalen, cdatalen);
		break;
	default:
		pr_err("JFFS2: unknown compression mode\n");
		pr_err("unknown compression mode\n");
	}

	if (ret == JFFS2_COMPR_NONE) {
@@ -289,8 +291,7 @@ int jffs2_decompress(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
				return ret;
			}
		}
		pr_warn("JFFS2 compression type 0x%02x not available\n",
			comprtype);
		pr_warn("compression type 0x%02x not available\n", comprtype);
		spin_unlock(&jffs2_compressor_list_lock);
		return -EIO;
	}
@@ -343,7 +344,7 @@ int jffs2_unregister_compressor(struct jffs2_compressor *comp)

	if (comp->usecount) {
		spin_unlock(&jffs2_compressor_list_lock);
		pr_warn("JFFS2: Compressor module is in use. Unregister failed.\n");
		pr_warn("Compressor module is in use. Unregister failed.\n");
		return -1;
	}
	list_del(&comp->list);
@@ -380,17 +381,17 @@ int __init jffs2_compressors_init(void)
/* Setting default compression mode */
#ifdef CONFIG_JFFS2_CMODE_NONE
	jffs2_compression_mode = JFFS2_COMPR_MODE_NONE;
	jffs2_dbg(1, "JFFS2: default compression mode: none\n");
	jffs2_dbg(1, "default compression mode: none\n");
#else
#ifdef CONFIG_JFFS2_CMODE_SIZE
	jffs2_compression_mode = JFFS2_COMPR_MODE_SIZE;
	jffs2_dbg(1, "JFFS2: default compression mode: size\n");
	jffs2_dbg(1, "default compression mode: size\n");
#else
#ifdef CONFIG_JFFS2_CMODE_FAVOURLZO
	jffs2_compression_mode = JFFS2_COMPR_MODE_FAVOURLZO;
	jffs2_dbg(1, "JFFS2: default compression mode: favourlzo\n");
	jffs2_dbg(1, "default compression mode: favourlzo\n");
#else
	jffs2_dbg(1, "JFFS2: default compression mode: priority\n");
	jffs2_dbg(1, "default compression mode: priority\n");
#endif
#endif
#endif
+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@
 *
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/string.h>
#include <linux/types.h>
#include <linux/jffs2.h>
Loading