public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: wangyufen <wangyufen@huawei.com>,
	jgg@ziepe.ca, leon@kernel.org,
	dennis.dalessandro@cornelisnetworks.com
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	andriy.shevchenko@linux.intel.com, bart.vanassche@wdc.com,
	easwar.hariharan@intel.com
Subject: Re: [PATCH v4 2/2] RDMA/srp: Fix error return code in srp_parse_options()
Date: Wed, 30 Nov 2022 10:00:07 -0800	[thread overview]
Message-ID: <1d27a774-cf83-6e36-4fa1-c0635ebfd79e@acm.org> (raw)
In-Reply-To: <65604aae-b722-4caf-3373-d0f1e4492faa@huawei.com>

On 11/29/22 19:31, wangyufen wrote:
> I'm so sorry for the poor patch description. Is the following 
> description OK?
> 
> In the previous iteration of the while loop, "ret" may have been 
> assigned a value of 0, so the error return code -EINVAL may have been 
> incorrectly set to 0.
> Also, investigate each case separately as Andy suggessted. If the help 
> function match_int() fails, the error code is returned, which is 
> different from the warning information printed before. If the parsing 
> result token is incorrect, "-EINVAL" is returned and the original 
> warning information is printed.

Please reply below instead of above. See also 
https://en.wikipedia.org/wiki/Posting_style.

Regarding your question: not logging an error message if user input is 
rejected is unfriendly to the user. I think it's better to keep the 
behavior of reporting an error if a match* function fails instead of 
reporting in the patch description that the behavior has changed.

Thanks,

Bart.


  reply	other threads:[~2022-11-30 18:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29  2:04 [PATCH v4 1/2] RDMA/hfi1: Fix error return code in parse_platform_config() Wang Yufen
2022-11-29  2:04 ` [PATCH v4 2/2] RDMA/srp: Fix error return code in srp_parse_options() Wang Yufen
2022-11-29 18:43   ` Bart Van Assche
2022-11-30  3:31     ` wangyufen
2022-11-30 18:00       ` Bart Van Assche [this message]
2022-12-01  1:37         ` wangyufen
2022-12-01  1:49         ` wangyufen
2022-12-01 12:21           ` Andy Shevchenko
2022-11-29  8:56 ` [PATCH v4 1/2] RDMA/hfi1: Fix error return code in parse_platform_config() Leon Romanovsky

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=1d27a774-cf83-6e36-4fa1-c0635ebfd79e@acm.org \
    --to=bvanassche@acm.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bart.vanassche@wdc.com \
    --cc=dennis.dalessandro@cornelisnetworks.com \
    --cc=easwar.hariharan@intel.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=wangyufen@huawei.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