From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD8FCC4321E for ; Thu, 1 Dec 2022 01:37:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229515AbiLABhj (ORCPT ); Wed, 30 Nov 2022 20:37:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbiLABhh (ORCPT ); Wed, 30 Nov 2022 20:37:37 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D0891089; Wed, 30 Nov 2022 17:37:34 -0800 (PST) Received: from canpemm500010.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NMz9h6lbGzqSfh; Thu, 1 Dec 2022 09:33:28 +0800 (CST) Received: from [10.174.179.191] (10.174.179.191) by canpemm500010.china.huawei.com (7.192.105.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 1 Dec 2022 09:37:31 +0800 Message-ID: Date: Thu, 1 Dec 2022 09:37:31 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH v4 2/2] RDMA/srp: Fix error return code in srp_parse_options() To: Bart Van Assche , , , CC: , , , , References: <1669687459-14180-1-git-send-email-wangyufen@huawei.com> <1669687459-14180-2-git-send-email-wangyufen@huawei.com> <65604aae-b722-4caf-3373-d0f1e4492faa@huawei.com> <1d27a774-cf83-6e36-4fa1-c0635ebfd79e@acm.org> From: wangyufen In-Reply-To: <1d27a774-cf83-6e36-4fa1-c0635ebfd79e@acm.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.179.191] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500010.china.huawei.com (7.192.105.118) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 在 2022/12/1 2:00, Bart Van Assche 写道: > 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. > Thanks, that's helpful. > 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. > >