Re: [PATCH 4/5] of: silence of_diff output for negative indents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 07, 2022 at 09:17:30AM +0100, Sascha Hauer wrote:
> On Mon, Feb 07, 2022 at 08:56:20AM +0100, Ahmad Fatoum wrote:
> > Negative indents just led to strange behavior so far. Repurpose them to
> > mean that the caller is not interested in console output. This makes
> > them useful for negative tests (Sanity check that two different nodes
> > are indeed different).
> > 
> > Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
> > ---
> >  drivers/of/base.c | 15 +++++++++++++--
> >  1 file changed, 13 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/of/base.c b/drivers/of/base.c
> > index 99be24254203..ffa79785f80e 100644
> > --- a/drivers/of/base.c
> > +++ b/drivers/of/base.c
> > @@ -2087,6 +2087,8 @@ int of_diff(struct device_node *a, struct device_node *b, int indent)
> 
> Can we add a
> 
> 	bool do_print = indent >= 0;
> 
> variable and use it for the tests below? I think this makes the code a
> bit clearer.

Changed while applying, so when you agree with this we are good to go.

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux