Thread (11 messages) 11 messages, 4 authors, 2020-02-10

Re: [PATCH v3 3/3] lib/vsprintf: add two device node flags

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2020-01-20 14:19:57
Also in: linux-doc

On Mon, Jan 20, 2020 at 07:38:29PM +0800, lijiazi wrote:
Add two device node flags, and use OF_DEVICE_NODE_FLAG_MAX instead
of sizeof("xxxx").
...
 			tbuf[1] = of_node_check_flag(dn, OF_DETACHED) ? 'd' : '-';
 			tbuf[2] = of_node_check_flag(dn, OF_POPULATED) ? 'P' : '-';
 			tbuf[3] = of_node_check_flag(dn, OF_POPULATED_BUS) ? 'B' : '-';
-			tbuf[4] = 0;
This is fine to leave untouched. See below.
+			tbuf[4] = of_node_check_flag(dn, OF_OVERLAY) ? 'O' : '-';
+			tbuf[5] = of_node_check_flag(dn, OF_OVERLAY_FREE_CSET) ? 'F' : '-';
These two should be part of patch 1, which in turn should be last in the series.
+			tbuf[OF_DEVICE_NODE_FLAG_MAX] = 0;
This one also, but in a form of explicit number, if you afraid of problems
here, we may add something like

	BUILD_BUG_ON(OF_DEVICE_NODE_FLAG_MAX < ...);

where ... depends on amount of flags we print here.

-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help