Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1902422ybz; Thu, 30 Apr 2020 07:29:08 -0700 (PDT) X-Google-Smtp-Source: APiQypIdAjsiwUQYsVyq2IvzSWwDFL026E6hP7Smd/RqSJfITY24nYHS9xIqgiXvf6k6/LHawE7i X-Received: by 2002:a17:906:6a84:: with SMTP id p4mr3101774ejr.21.1588256948678; Thu, 30 Apr 2020 07:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588256948; cv=none; d=google.com; s=arc-20160816; b=tdikDUVxbcV5UtDFfLoTI7zIc1Or3n+ArahcoBcDikHC6dD2qGo3OsLSdPTtPYGDPb E+5CqnMq4WysaDzuE0fV8laW9rWTNUR0bdcby/GePln5zRaOjLmfQF48CwmbK/nCJA3x NDOwIZEWwAE7Glwn0ec+vQ9BWMccQYEX1BhNyvXlELi4796+/o6/r87+BCCpZ5HptMi5 2w1f9lvlN+Hk8txP0KmWHpHwYnsl6JB+vA9IAGURxtZZJ+EfUUTUx8ma9+qiuqFp9bWj 7WqDN3pymt7OcVJRRh05oI+u01vA9U1adjO+gY6zb1Km6Gh0OaKkZhfYsR94jM7FAaIs Vxnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=x1qcW327bi40rJCDOA/3VQNP7BlakD04Fq3hF5EemCU=; b=ODUkeXgsyjJHVsoY0plkoSZhkkdpFptCTScyshRXQFcTBluW2qYyRj+jiS1TXieeke zDQz7u2bq2rahB5qCre1PPYB8FCc/7TVY4gSYKAi1ZpimN5uhTuD/BBaT2f858KC9tt1 RL67ODf0/L07Fygd/k7eK2AvLv6ijAmWiTA1eTZl2Rz+DTZSfk2wRSEmUziLmL9XRHVe 1Ztg93D9I+NBbMDPOaSF5jEDFZvT87nlIJQd7Dod4i2arnPtVgYH3XhEWSVCd91MtgX5 8LC1/4MizivesqBMbPhM1yJaUfQVh1klEX/dipn4lAPtYH7lxCP8B2+9515F/NPLk339 +zwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=gp2QReN3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w22si5702955edu.568.2020.04.30.07.28.44; Thu, 30 Apr 2020 07:29:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=gp2QReN3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728206AbgD3OYc (ORCPT + 99 others); Thu, 30 Apr 2020 10:24:32 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:33996 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728124AbgD3OY3 (ORCPT ); Thu, 30 Apr 2020 10:24:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=x1qcW327bi40rJCDOA/3VQNP7BlakD04Fq3hF5EemCU=; b=gp2QReN3m19PvBPCArNU9deQZU z7Ie2O7sL0SVI7By+LoWyF79XjtTG/m43F6uGABWeaGlNwS1GoWTM7YrSuNAGg2zYicn+9LVs7YXi AcWN7yw36LigxHcr/hp5lQaoxICF7/vveF3BQCa0PhYpRyvtIA0qepksqvBm5n/lqTHM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1jUA6t-000Q0O-LU; Thu, 30 Apr 2020 16:24:19 +0200 Date: Thu, 30 Apr 2020 16:24:19 +0200 From: Andrew Lunn To: Oleksij Rempel Cc: Michal Kubecek , Marek Vasut , Florian Fainelli , Jonathan Corbet , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King , mkl@pengutronix.de, kernel@pengutronix.de, David Jander , Jakub Kicinski , Christian Herber , "David S. Miller" , Heiner Kallweit Subject: Re: [PATCH net-next v3 1/2] ethtool: provide UAPI for PHY master/slave configuration. Message-ID: <20200430142419.GC76972@lunn.ch> References: <20200428075308.2938-1-o.rempel@pengutronix.de> <20200428075308.2938-2-o.rempel@pengutronix.de> <20200429181614.GL30459@lunn.ch> <20200430043751.ojvcgtubkbfunolb@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200430043751.ojvcgtubkbfunolb@pengutronix.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 30, 2020 at 06:37:51AM +0200, Oleksij Rempel wrote: > Hi Andrew, > > On Wed, Apr 29, 2020 at 08:16:14PM +0200, Andrew Lunn wrote: > > On Tue, Apr 28, 2020 at 09:53:07AM +0200, Oleksij Rempel wrote: > > > > Hi Oleksij > > > > Sorry for taking a while to review this. I was busy fixing the FEC > > driver which i broke :-( > > Not problem. > Interesting, what is wrong with FEC? We use it a lot. I broke MDIO transactions, when making them faster. Hopefully fixed. > > > diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h > > > index 92f737f101178..eb680e3d6bda5 100644 > > > --- a/include/uapi/linux/ethtool.h > > > +++ b/include/uapi/linux/ethtool.h > > > @@ -1666,6 +1666,31 @@ static inline int ethtool_validate_duplex(__u8 duplex) > > > return 0; > > > } > > > > > > +static inline int ethtool_validate_master_slave_cfg(__u8 cfg) > > > +{ > > > + switch (cfg) { > > > + case PORT_MODE_CFG_MASTER_PREFERRED: > > > + case PORT_MODE_CFG_SLAVE_PREFERRED: > > > + case PORT_MODE_CFG_MASTER_FORCE: > > > + case PORT_MODE_CFG_SLAVE_FORCE: > > > + case PORT_MODE_CFG_UNKNOWN: > > > + return 1; > > > + } > > > + > > > + return 0; > > > +} > > > > Does this need to be an inline function? > > Yes, otherwise we get a lot of "defined but not used " warnings. Sorry, was not clear enough. I think there is only one user of this function? Why not put it in the same compilation unit, as a normal static function? Andrew