Skip to content

Commit 8c62b4e

Browse files
mtd: ofpart: don't complain about missing 'partitions' node too loudly
The ofpart partition parser might be run on DT-enabled systems that don't have any "ofpart" partition subnodes at all, since "ofpart" is in the default parser list. So don't complain loudly on every boot. Example: using m25p80.c with no intent to use ofpart: &spi2 { status = "okay"; flash@0 { compatible = "jedec,spi-nor"; reg = <0>; }; }; I see this warning: [ 0.588471] m25p80 spi2.0: gd25q32 (4096 Kbytes) [ 0.593091] spi2.0: 'partitions' subnode not found on /spi@ff130000/flash@0. Trying to parse direct subnodes as partitions. Cc: Michal Suchanek <hramrach@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
1 parent 1ddaa02 commit 8c62b4e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/mtd/ofpart.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,13 @@ static int parse_ofpart_partitions(struct mtd_info *master,
4646

4747
ofpart_node = of_get_child_by_name(mtd_node, "partitions");
4848
if (!ofpart_node) {
49-
pr_warn("%s: 'partitions' subnode not found on %s. Trying to parse direct subnodes as partitions.\n",
50-
master->name, mtd_node->full_name);
49+
/*
50+
* We might get here even when ofpart isn't used at all (e.g.,
51+
* when using another parser), so don't be louder than
52+
* KERN_DEBUG
53+
*/
54+
pr_debug("%s: 'partitions' subnode not found on %s. Trying to parse direct subnodes as partitions.\n",
55+
master->name, mtd_node->full_name);
5156
ofpart_node = mtd_node;
5257
dedicated = false;
5358
}

0 commit comments

Comments
 (0)