Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1745139imm; Fri, 6 Jul 2018 05:53:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeod35w45McF0Ag6O8u3pVFyre3b5noGOUOqsTs7GNe1WfvFSjGeVJasgNinfJ1to7OAarp X-Received: by 2002:a17:902:102b:: with SMTP id b40-v6mr10165548pla.125.1530881591812; Fri, 06 Jul 2018 05:53:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530881591; cv=none; d=google.com; s=arc-20160816; b=jiiZTJ0ONJQwYS3rLnPGkuzCwRRk9wXjtXf8nESkMmeYnClR2itDSKfV2esD5mq7N7 YsF8tc/n7Khz9rugO92JayeWHwT9Fb0/44C6G6rv6fhBidxDkQCh3lQ8h0DPxbQYmaQq quecZBWyCywgNVBnieBdYE9mUk0eZBQVzIk+m1hjTJ9L5dyQpC4HXgOITKIWe4LQiKmV q7TEwGYaPSpzWnbSKQ1+6Eehq9iNa2M9LeOysKyWY8r9QqiNnn7gOJ370D9YefMD55MK uqIaZR00w4OFbStiS0IPuQZrn6WQsumzqfANM4NFC4u8UKqgz2wpiSE2TtdFka/MlqF4 4/tQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=ZFVj5xcLDlXbz7jow5/ZFXywlIPzslJwcrQ3McVl3oA=; b=NoE+7lXX7c1P2r8k3Vu5uNhFjPO1zPDLA9lacWuLXVOHbT+/cgiGpJQcA8LlX2AOXh mwm6xQ4fmGqIF2smgU149/aNyY74IpI50y6na/+4Iv6XCFZrJ5uLtGI3UbvCcYLYBrzd ON9bbTcswwfg32AOaI1RV0x+NFQ/yuZgf8fHAQLioTLg7HJz+aAUmBll6x4zT5teUHPn EsxR7j5R/+OtZLufiVdWmg5ufRpAxWmscrOBXof31iPy3GVydNNKlsT4hsvwuy7w5O41 hMFNRr+ZhNsVOfjbUIiAJDs9zK4KAyF+xa4o+SCVVRV4ZtUveXoc43GcJmqsidrl/78w E7ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cumulusnetworks.com header.s=google header.b=W6q6yI7u; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cumulusnetworks.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h16-v6si8033253pgb.39.2018.07.06.05.52.56; Fri, 06 Jul 2018 05:53:11 -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; dkim=pass header.i=@cumulusnetworks.com header.s=google header.b=W6q6yI7u; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cumulusnetworks.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933150AbeGFMvd (ORCPT + 99 others); Fri, 6 Jul 2018 08:51:33 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38710 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932780AbeGFMvb (ORCPT ); Fri, 6 Jul 2018 08:51:31 -0400 Received: by mail-wr1-f66.google.com with SMTP id j33-v6so4091768wrj.5 for ; Fri, 06 Jul 2018 05:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cumulusnetworks.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZFVj5xcLDlXbz7jow5/ZFXywlIPzslJwcrQ3McVl3oA=; b=W6q6yI7uV5zlQtY44+Gte1pwQIa++53doTBjESs0BS1uBFhN4mb2dwEEp/VsQeSBOb negVlLQXQYxmEbXrPE5DweFlSmbAWAPm1PMf/yiv8gDZILxLLKsc3rmbrJiueAHpMWWx vwwULtdwjQ00s/rFgY75Q/S233le9oEqULGlI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZFVj5xcLDlXbz7jow5/ZFXywlIPzslJwcrQ3McVl3oA=; b=OV7TiiJ8IMT8eQ8+PpSFW6tPAauiSSAEm9mCFCRxIHzaankSE1+TLQPP1FVxwKln6r +cilC9SIqtLNUVicTpCgcC4ftXCc3324XetZlhJBOFyYut73IfZLiO1/rrgXAr6z2dcY mNQwNJukKH39Hh5OKNhd42vwVKH4Anpu1HA4SG0VwMmD9b2Dv4qwh0dIXa2PKa6pqQ79 T9I+MKAQeoDwfi5zlYeeejVLXAOdWSw4NcpfN5z7OhcK942wV5dQ1YdwUkXtZSmA8pGB 2MpRCoFu3CmOk7UG9s0tJVSHa29cy4bFy17DdHBO41wmfXG2z6HkEIoM2lRWBIbgCUOo Ydhg== X-Gm-Message-State: APt69E3M92wuhWNuJNQk1bQXz/kcy7MkqGGUHxS7IT1lNpkFO4KWEqv6 q2S13geSobAI+YHMZZiJiaapREPp X-Received: by 2002:adf:8895:: with SMTP id f21-v6mr7326274wrf.250.1530881490416; Fri, 06 Jul 2018 05:51:30 -0700 (PDT) Received: from [192.168.51.243] ([93.152.141.58]) by smtp.gmail.com with ESMTPSA id i4-v6sm13078319wmf.4.2018.07.06.05.51.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jul 2018 05:51:29 -0700 (PDT) Subject: Re: [PATCH net] net: bridge: fix br_vlan_get_{pvid,info} return values To: Arnd Bergmann , "David S. Miller" Cc: Jiri Pirko , Yotam Gigi , Roopa Prabhu , Petr Machata , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180706124420.3129099-1-arnd@arndb.de> From: Nikolay Aleksandrov Message-ID: <49b31434-53e5-72e9-ae0b-1c1200806a50@cumulusnetworks.com> Date: Fri, 6 Jul 2018 15:51:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180706124420.3129099-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/07/18 15:44, Arnd Bergmann wrote: > These two functions return the regular -EINVAL failure in the normal > code path, but return a nonstandard '-1' error otherwise, which gets > interpreted as -EPERM. > > Let's change it to -EINVAL for the dummy functions as well. > > Fixes: 4d4fd36126d6 ("net: bridge: Publish bridge accessor functions") > Signed-off-by: Arnd Bergmann > --- > include/linux/if_bridge.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h > index 7843b98e1c6e..c20c7e197d07 100644 > --- a/include/linux/if_bridge.h > +++ b/include/linux/if_bridge.h > @@ -105,13 +105,13 @@ static inline bool br_vlan_enabled(const struct net_device *dev) > > static inline int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid) > { > - return -1; > + return -EINVAL; > } > > static inline int br_vlan_get_info(const struct net_device *dev, u16 vid, > struct bridge_vlan_info *p_vinfo) > { > - return -1; > + return -EINVAL; > } > #endif > > Acked-by: Nikolay Aleksandrov