Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2815487rwb; Wed, 30 Nov 2022 11:13:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf5rmlAdKlUfDlKEnrRtyNV4L7tNBbPD7jOpZKLPjyd074Xdlmzv0ubVWaI6ravtww8IONZp X-Received: by 2002:aa7:dbc3:0:b0:461:6b61:81ae with SMTP id v3-20020aa7dbc3000000b004616b6181aemr56553709edt.62.1669835583396; Wed, 30 Nov 2022 11:13:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669835583; cv=none; d=google.com; s=arc-20160816; b=xmrPvFIiGC8Ieo9lf3ecEkQ94P40gMQ5f4zQBWnvH8vosGJhBS0+n8y2hDBRNMGaR4 EmUMpC0Bzi1Rjc27uU3vsKMjE4hSoSTKCAvazolLcJr3TJLNDZ2caWf4KYmghoyEQNGw /4IIB79GP3Bnz++xehFm89UzNoWvjMdYFDKn67165FvsxMbeTXKPIp2Z0VdVxN9W/lx5 P8eD70T51i2bfX6dCj46lPUGyeye3hQDFjU6i8u1lsPp4vHditv5/zMa5QbK76drjBIb eejepf0It+dsLTuB6X1aFHXwgKOVLi3pRreoWVhBPUi6pFuZRNtp0dKDf7Fj5OtKE9vq 98xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=0fjqJKTVQepvnvgSP+jfjlXiZpM1wFgFx6j+r4BZ42Q=; b=Rh2iQj21hHEmX8nWxZq19FTCU3OHKmthCQn58JXxZnWTDsNCwJJxlxSLtUhi3WTA9e FpzRm2H/wpAXQvisSPp+d9AcRghiGz61xzZHZ5koJk8x9iyKG80NneKa8wBZW/ovhvtA nO6XNg/fxADKJrWCyTvdwdAzjcrKFCulFtiIVooh89UUOCZ1p56PpOY0EMCbFQUD4yju m/Z0tvUJVag46MKd5pzfw2ebFVXktQWAPueX/UILMDKTaf7o8BgWNztUZi++nYbaXjaY xbXYuBPnSqFibNKq/B5K66dlfQaU9VrvHqqIO1BIESfroLigqF2rTfqqnrJXS+c6f5MV cmBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd27-20020a170907629b00b0078a19032c70si2326502ejc.334.2022.11.30.11.12.42; Wed, 30 Nov 2022 11:13:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230019AbiK3SAR (ORCPT + 83 others); Wed, 30 Nov 2022 13:00:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229955AbiK3SAL (ORCPT ); Wed, 30 Nov 2022 13:00:11 -0500 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3FA855CB4; Wed, 30 Nov 2022 10:00:10 -0800 (PST) Received: by mail-pj1-f48.google.com with SMTP id mv18so16407993pjb.0; Wed, 30 Nov 2022 10:00:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0fjqJKTVQepvnvgSP+jfjlXiZpM1wFgFx6j+r4BZ42Q=; b=N6VMEnTWSlD5bbJKxJi+OgWbnuG2N8hFAgNHXB+V6oUtH7mWGCHo15kCODjKR4kz11 wzwA++nTt7UO88QBQMbCNuAvfCe5vFfKSp+hC+47HTU053dx+m1i3wreRdbKbH3E1ix9 /iGChu4Gty6fpbbVA6D9gJVO0MBbS4NnRhLSSCC4zSidnKq3RNKZ0k+VyY8nQcVtkcgZ /w39p9WFDp8ZCuG13v0IfPQYd/HvPys8JFQiwVpxHMOsfRCKO0c2K1nID2lWOXzM9Jy3 AvTo6FjFPmokXPxuTsiLBdrlNIOIT+3RBuj+b5/oEUg3L2cpQNsRH7ZWl9XGWaiAjBmU WGQA== X-Gm-Message-State: ANoB5plziWSt/zvhtglXzlTAd9tDqwyJsB7tJIG492QFK53dRJlWidEn mLy1zF9X+27VJ0m+8HH4/ok7NpU6xCw= X-Received: by 2002:a17:902:db09:b0:188:7dca:6f4d with SMTP id m9-20020a170902db0900b001887dca6f4dmr57232498plx.68.1669831209721; Wed, 30 Nov 2022 10:00:09 -0800 (PST) Received: from ?IPV6:2620:15c:211:201:3729:bd90:53d2:99e3? ([2620:15c:211:201:3729:bd90:53d2:99e3]) by smtp.gmail.com with ESMTPSA id z22-20020aa79596000000b0057294f480casm1733155pfj.97.2022.11.30.10.00.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Nov 2022 10:00:08 -0800 (PST) Message-ID: <1d27a774-cf83-6e36-4fa1-c0635ebfd79e@acm.org> Date: Wed, 30 Nov 2022 10:00:07 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v4 2/2] RDMA/srp: Fix error return code in srp_parse_options() Content-Language: en-US To: wangyufen , 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 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> From: Bart Van Assche In-Reply-To: <65604aae-b722-4caf-3373-d0f1e4492faa@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.