Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2740905imm; Tue, 4 Sep 2018 09:15:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbE0hAM5+p32mdu55wZI290MI2p9zJJpgb+pmoxX9ZS0vJ5KuzvXJrv3WbUk2rgk9ZuBUxO X-Received: by 2002:a63:5b63:: with SMTP id l35-v6mr32236931pgm.50.1536077729447; Tue, 04 Sep 2018 09:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536077729; cv=none; d=google.com; s=arc-20160816; b=iQfHcFFdfP70RczD+6dmMJxSD/KWMfibF4RuM8Zu4pFO78DwMBhOAcQinI/Kq+/Ckf vFX/04fjs0nZqJZAPumvuZKIO4O8EntgqUoR11FFzOsQsUw/u8WmmF09ZTFVArhIH6hz QvH5ehufBAi3yRVhTHnCzdVfjdRNc9pBKeJkTnsJPP2Lj99/MEIIP6RZm8bKSRRZypee jljappSBoc/yFJQTLuEaDPaiUfbW76hpO+WP/C2mRmkjwXiMaqWy4q2vOpxExAJzr7Y2 kHtjhKByaWQJphXRqs5/aN2fgCyoPwI+O6GahkJTNiM97BlxIloFEJvb3cuLA0S8r+Lm 1eyQ== 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=W8j1+yLCrGMraFjiLUwPAFVNbacfVjxk+8aTf9fb9Wk=; b=xOf6IQpD83XQr5yiIcr55MSoTxpqDNk/KSaENuoS/xcxOOvH/nr11m7KaD5SAolVx2 N3QDJ0rfQPuwYc7DdRjfErD191sx5edhajGp2S0x0AE3CRSiTLxubL0fRwl4QlAQhz/e UZhnpO++fJQEGOaIXzLt6RGXDUAOydPx7cskgMpKw5i3fmSAtOviZ5RZG1W14VRHQr8T IvYE7oRsI5c/R2CQPeZMOo9BS8Qcs7MvQs7PFgXLJucFQD6ejuMD14srLHYZpVeBpGAr h7et9Hjw+Qj+il6N7MGoM/S9rEf4tSoQz4Hx2A5ZIFuigdIu0bZ6fttqEHkkudJlDGyL w/TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BZO5NG05; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8-v6si17176347pgm.201.2018.09.04.09.15.14; Tue, 04 Sep 2018 09:15:29 -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=@gmail.com header.s=20161025 header.b=BZO5NG05; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727662AbeIDUjn (ORCPT + 99 others); Tue, 4 Sep 2018 16:39:43 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45772 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726347AbeIDUjn (ORCPT ); Tue, 4 Sep 2018 16:39:43 -0400 Received: by mail-pg1-f196.google.com with SMTP id x26-v6so1886102pge.12; Tue, 04 Sep 2018 09:13:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=W8j1+yLCrGMraFjiLUwPAFVNbacfVjxk+8aTf9fb9Wk=; b=BZO5NG05UFrLGpTath6Pi806KgQDkYsoV0Mnq3H8x+eon8v8qho2O5QDw07CWmJjh0 YvDmBraNVDESq0wvLYqhPkz0kUAtgsOwUoV/XvpNajgPceoakdKZfBdRVHAYssjd+T5q l/7rQfdtjDCmp1YpfuhsKUYLscnyz7ogiTF5W+6tVicMX5QQ3P0nH2EM26kT97P12CKr dcU9f6o7aHnxSQ8rrdY7X7f6cteX3EtjnojkzCWxyAvOXktwk/tepCDYO93CyR8g31J0 rLPTDkfOn+Z4/2Osq3lxgrIxWO6f4G9YWjwB/K3u1A7KN/QMBI7cWsvKAsGWN06dF+I/ dijg== 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=W8j1+yLCrGMraFjiLUwPAFVNbacfVjxk+8aTf9fb9Wk=; b=hiB3WmcqsDXw88lxrF6PBOan3qc4DbQc/lsknmSxboMuz5EqXv2j1iPb432twaSmNC npwEL4qVRwlnKAyKwbq74yAfTEil+jzOVlOA3/1RdcHpa5Ueym3qBX7bjn2LYlIhuwix EwCQ/L7XczzqUOizt42fVVbsh7r04Yl8R3DdHq5WrPQ09Uw+M9HfoEgFy/hCSWDm+jyi 3OkJ7kPKF68rZ142aFen7aeHBB6aj3Q8iJJd8OfHdtLrdyoANBwmhdRocNSstiXssZwg SeRBxkfZuvJjySwq7sc2mYbvRjIeQI6dGLVx7RGKpe5Y5gp3D7IjLd5hsglbnZNguR6x /0lQ== X-Gm-Message-State: APzg51C1YeL+G7hAR9/6vmsjTbp5MEuF5BUWnRXkgnKhoMxW3gHCddkC z7HlmBZByLO7MPKvzXA8DbOU8eZW X-Received: by 2002:a63:eb53:: with SMTP id b19-v6mr31947131pgk.371.1536077634662; Tue, 04 Sep 2018 09:13:54 -0700 (PDT) Received: from dsa-mb.local ([2601:282:800:fd80:1145:f235:fa5f:50ca]) by smtp.googlemail.com with ESMTPSA id z11-v6sm48690574pgz.62.2018.09.04.09.13.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Sep 2018 09:13:53 -0700 (PDT) Subject: Re: [PATCH net] devlink: Fix devlink_param_driverinit_value_set() stub return code To: Moshe Shemesh , "David S. Miller" Cc: Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1536066265-18641-1-git-send-email-moshe@mellanox.com> From: David Ahern Message-ID: <2bf31ad0-c3f8-cdfd-8b96-1a8e3280064d@gmail.com> Date: Tue, 4 Sep 2018 10:13:52 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1536066265-18641-1-git-send-email-moshe@mellanox.com> 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 9/4/18 7:04 AM, Moshe Shemesh wrote: > The stub function returned -EOPNOTSUPP while CONFIG_NET_DEVLINK is off. > It caused false warning during driver load. Driver needs to update > devlink on a parameter value if devlink module is there, if not it > doesn't need any error code. > > Fixes: ec01aeb1803e ("devlink: Add support for get/set driverinit value") > Signed-off-by: Moshe Shemesh > Acked-by: Jiri Pirko > --- > include/net/devlink.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/net/devlink.h b/include/net/devlink.h > index b9b89d6..b467357 100644 > --- a/include/net/devlink.h > +++ b/include/net/devlink.h > @@ -781,7 +781,7 @@ static inline bool devlink_dpipe_table_counter_enabled(struct devlink *devlink, > devlink_param_driverinit_value_set(struct devlink *devlink, u32 param_id, > union devlink_param_value init_val) > { > - return -EOPNOTSUPP; > + return 0; > } > > static inline void > This should be handled by the driver -- check for -EOPNOTSUPP and not log an error. devlink is generic infrastructure. If a call is made and the operation is not supported, then devlink should return an error.