Skip to content

Commit 2538af0

Browse files
Csókás, Bencemiquelraynal
authored andcommitted
mtd: cmdlinepart: Replace dbg() macro with pr_debug()
This macro was left over from the dawn of Git history. For some reason it was defined in such a way that you needed double brackets around it. Replace it with the now-standard `pr_debug()`. Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20240625093148.3579660-1-csokas.bence@prolan.hu
1 parent f32ded4 commit 2538af0

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

drivers/mtd/parsers/cmdlinepart.c

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,6 @@
4444
#include <linux/module.h>
4545
#include <linux/err.h>
4646

47-
/* debug macro */
48-
#if 0
49-
#define dbg(x) do { printk("DEBUG-CMDLINE-PART: "); printk x; } while(0)
50-
#else
51-
#define dbg(x)
52-
#endif
53-
54-
5547
/* special size referring to all the remaining space in a partition */
5648
#define SIZE_REMAINING ULLONG_MAX
5749
#define OFFSET_CONTINUOUS ULLONG_MAX
@@ -199,9 +191,9 @@ static struct mtd_partition * newpart(char *s,
199191
parts[this_part].name = extra_mem;
200192
extra_mem += name_len + 1;
201193

202-
dbg(("partition %d: name <%s>, offset %llx, size %llx, mask flags %x\n",
194+
pr_debug("partition %d: name <%s>, offset %llx, size %llx, mask flags %x\n",
203195
this_part, parts[this_part].name, parts[this_part].offset,
204-
parts[this_part].size, parts[this_part].mask_flags));
196+
parts[this_part].size, parts[this_part].mask_flags);
205197

206198
/* return (updated) pointer to extra_mem memory */
207199
if (extra_mem_ptr)
@@ -267,7 +259,7 @@ static int mtdpart_setup_real(char *s)
267259
}
268260
mtd_id_len = p - mtd_id;
269261

270-
dbg(("parsing <%s>\n", p+1));
262+
pr_debug("parsing <%s>\n", p+1);
271263

272264
/*
273265
* parse one mtd. have it reserve memory for the
@@ -304,8 +296,8 @@ static int mtdpart_setup_real(char *s)
304296
this_mtd->next = partitions;
305297
partitions = this_mtd;
306298

307-
dbg(("mtdid=<%s> num_parts=<%d>\n",
308-
this_mtd->mtd_id, this_mtd->num_parts));
299+
pr_debug("mtdid=<%s> num_parts=<%d>\n",
300+
this_mtd->mtd_id, this_mtd->num_parts);
309301

310302

311303
/* EOS - we're done */

0 commit comments

Comments
 (0)