Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp63185imm; Thu, 10 May 2018 15:32:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqCCJ0nc74FBPYYif84q9baA5ncv6q4QGf1SfnIp2YmTrggNL0fiJC3pISjKzU49BoUUwoC X-Received: by 2002:a63:aa01:: with SMTP id e1-v6mr2443103pgf.331.1525991560717; Thu, 10 May 2018 15:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525991560; cv=none; d=google.com; s=arc-20160816; b=uKxkAu9Aiiozx7l/lu9ygJb7XSC5BlVUyT9dFeFje+gj+Y6l6h077Hk7GqyYpV7t1h 6TCp4zoqfFZXR0EGkwaQlA36uKAYM5BSn9wjBk6/I+4bsxQ61xwef6VUAlcoo3wqN0p9 0YQ0vUXxyrux0SGvOXU7n8MfLk4v3/h8Ky3oHPQ71MjK6pDh3ShNzz6Qk2JlZc/RXQEn pzZtsoHrpEna75V+QN9vYTMX79IkVYdF4lF8lEIuznIiuA/70K94EYuphtbihB0FRF87 TYaw3bZbienmdO0jw2o2KkMfjped4wXjjl53k2AX5wyAoXtXkA9lHCwDhZtIYBPsCS/u NNsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=+k8dUXvLghWMOEmQn7KU3qwY9+OSpI6TCtn1Sq1INUI=; b=tspM2dTpM2iAl8eYVd9PtLJQQtIBEkfd94CLVOpCnqWn5E5tuekDJ/b2v2gNvWUIFk /IY5GGW7p2zAAf6kiNfLm7i6eE+W0P3piNRKxw9HDxXwvwn2rLnGQPfYCGh8342SNfIO LV617SuedWLmICqBnSI62yj1e/FEkJDk8hWeql14yWgQGJEqOIDQx95Tz4JuhNz53YI2 DuiN+0QVw3hhNh5FdWfEhBZDWMuyx2V8V23Bb2gK9oJHZIRr2mhsgmUrcCL+ij+d99Np /BuD8LlT7WWZA5XtB1Jo5/KzCakJ55rtdGDGiVGRLDkja6h0VcK6gdml6NX7lJKxWETL sdvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10-v6si1681799pfn.256.2018.05.10.15.32.26; Thu, 10 May 2018 15:32:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751082AbeEJWbM (ORCPT + 99 others); Thu, 10 May 2018 18:31:12 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43422 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750711AbeEJWbL (ORCPT ); Thu, 10 May 2018 18:31:11 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.71]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4AF4F22; Thu, 10 May 2018 22:31:11 +0000 (UTC) Date: Thu, 10 May 2018 15:31:09 -0700 From: Andrew Morton To: Chengguang Xu Cc: ericvh@gmail.com, rminnich@sandia.gov, lucho@ionkov.net, v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [V9fs-developer][PATCH v3 1/2] net/9p: detecting invalid options as much as possible Message-Id: <20180510153109.ca9ac1c8d2308c37952a42c7@linux-foundation.org> In-Reply-To: <1525340676-34072-1-git-send-email-cgxu519@gmx.com> References: <1525340676-34072-1-git-send-email-cgxu519@gmx.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 3 May 2018 17:44:35 +0800 Chengguang Xu wrote: > Currently when detecting invalid options in option parsing, > some options(e.g. msize) just set errno and allow to continuously > validate other options so that it can detect invalid options > as much as possible and give proper error messages together. > > This patch applies same rule to option 'trans' and 'version' > when detecting -EINVAL. Looks OK. It does mean that if two or more options cause errors, we will now return the error code arising from the final error rather than from the first error (or from some mish-mash mixture of both, as the present code does). But I don't think this matters.