At 2022-07-16 21:50:08, "Bart Van Assche" <bvanassche@xxxxxxx> wrote: >On 7/14/22 17:17, Liang He wrote: >> +static bool phandle_exists(const struct device_node *np, >> + const char *phandle_name, >> + int index) > >Indentation of the arguments now looks really odd :-( Yes, Bart, I also wonder this coding style, however I learned that from the definition of 'of_parse_phandle' in of.h. Is it OK if I put all of them in one line? Thanks, > >> +{ >> + struct device_node *parse_np = of_parse_phandle(np, phandle_name, index); >> + bool ret = false; >> + >> + if (parse_np) { >> + ret = true; >> + of_node_put(parse_np); >> + } >> + >> + return ret; >> +} > >The 'ret' variable is not necessary. If "return ret" is changed into >"return parse_np" then the variable 'ret' can be left out. > OK, I will use 'return parse_np' in new version when you confirm above coding style. >Thanks, > >Bart. Thanks, Liang