public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Liang He" <windhl@126.com>
To: "Bart Van Assche" <bvanassche@acm.org>
Cc: jejb@linux.ibm.com, martin.petersen@oracle.com,
	linux-scsi@vger.kernel.org
Subject: Re:Re: [PATCH v2] ufs: host: ufschd-pltfrm: Hold reference returned by of_parse_phandle()
Date: Sun, 17 Jul 2022 11:03:23 +0800 (CST)	[thread overview]
Message-ID: <741595c3.743.1820a1c502e.Coremail.windhl@126.com> (raw)
In-Reply-To: <0209504a-fdd5-5987-4772-dfb14c6ceafc@acm.org>


At 2022-07-16 21:50:08, "Bart Van Assche" <bvanassche@acm.org> 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

  reply	other threads:[~2022-07-17  3:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15  0:17 [PATCH v2] ufs: host: ufschd-pltfrm: Hold reference returned by of_parse_phandle() Liang He
2022-07-16 13:50 ` Bart Van Assche
2022-07-17  3:03   ` Liang He [this message]
2022-07-17 14:58     ` Bart Van Assche
2022-07-18  8:30       ` Liang He
2022-07-19  2:46       ` Liang He
2022-07-19 18:12         ` Bart Van Assche
2022-07-20  0:48           ` Liang He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=741595c3.743.1820a1c502e.Coremail.windhl@126.com \
    --to=windhl@126.com \
    --cc=bvanassche@acm.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox