From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759031AbcEFXll (ORCPT ); Fri, 6 May 2016 19:41:41 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:36275 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758602AbcEFXlk (ORCPT ); Fri, 6 May 2016 19:41:40 -0400 Subject: Re: [PATCH 1/2] net: phy: add ethtool_phy_{get|set}_link_ksettings To: Philippe Reynes , fugang.duan@nxp.com, davem@davemloft.net References: <1462576729-5932-1-git-send-email-tremyfr@gmail.com> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Florian Fainelli Message-ID: <572D2BAD.8080606@gmail.com> Date: Fri, 6 May 2016 16:41:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1462576729-5932-1-git-send-email-tremyfr@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/05/16 16:18, Philippe Reynes wrote: > The callback {get|set}_link_ksettings are often defined > in a very close way. There are mainly two differences in > those callback: > - the name of the netdev private structure > - the name of the struct phydev in the private structure > > We add two defines ethtool_phy_{get|set}_link_ksettings > to avoid writing severals times almost the same function. This looks fine in principle, but then there is a whole ton of code that could become like that in the kernel, I do not have any strong opinion either way... -- Florian