From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752592AbcEGMAM (ORCPT ); Sat, 7 May 2016 08:00:12 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:51084 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbcEGMAK (ORCPT ); Sat, 7 May 2016 08:00:10 -0400 Message-ID: <1462622397.19332.28.camel@decadent.org.uk> Subject: Re: [PATCH 1/2] net: phy: add ethtool_phy_{get|set}_link_ksettings From: Ben Hutchings To: Philippe Reynes , f.fainelli@gmail.com, fugang.duan@nxp.com, davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 07 May 2016 12:59:57 +0100 In-Reply-To: <1462576729-5932-1-git-send-email-tremyfr@gmail.com> References: <1462576729-5932-1-git-send-email-tremyfr@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-/e2UIH9RWctcYlyNhFaZ" X-Mailer: Evolution 3.18.5.1-1 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-/e2UIH9RWctcYlyNhFaZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 2016-05-07 at 01:18 +0200, 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 >=20 > We add two defines ethtool_phy_{get|set}_link_ksettings > to avoid writing severals times almost the same function. [...] I don't think there's no need to access a private structure, as there's a phydev pointer in struct net_device. =C2=A0If some drivers don't maintain that pointer, they should be changed to do so. =C2=A0Then they can=20 use generic implementations of {get,set}_link_ksettings provided by phylib. Ben. --=20 Ben Hutchings Editing code like this is akin to sticking plasters on the bleeding stump of a severed limb. - me, 29 June 1999 --=-/e2UIH9RWctcYlyNhFaZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCgAGBQJXLdi9AAoJEOe/yOyVhhEJz+wP/3f2rlvfBG1vgivF7gha2iYf jFHMbeCQpISCKRBwTLkv9mX6YUXsYHosFLsK05eM4MyvMJnxAf6vmpb1PYkoPQNK ZpY14Wa6DpWQwRyR3nfxbDIb5vQAsIxPCEZwJ6fCiAxwNC9wBuiBQh+2Fw8tYuKu MiA3a3CQr2WoZ7NTBsdXDfuEDYRImdD/ZNp8znFjWL4Iv/LTnd+EY0/wf0a5l1uC SeJH4duG2ZCli6bRC63tQ3GCwScYY0MICC7wLsJQADG5adEB8BPMbgPW1srGPrQH H4n/W7GnDcf1IRgsHvIvsqR827jnqNsS06eJEwk9qeW4j3fzlBUnt6FfPLwHo/Zt MxVlvVYQz1+j2FgULE/XGjJT1YS73qNLUFMV91yRf0L419kdqmIvbQepmtihp/iv DOrJ3c+FUhAalKInxkeuyQ8yBM+w6DraoDAYiib/GmwbCJvt0FADJidqznzrqaQV C9pmH2D7lhJow6hgfdZT5OrqeRBKRWF2pNVsk+QBRKnqgldd6lkIEhvyolbHYqhK ayJUWOFz+xFh2Ao8C+xF82KQH5uENA94FWsc+/pckqRxOM9BhEGBhSoucZpLifPH ISdYtaQwRL6uj/S0t9uzs1KDdzaKeEUKmWiKm3l18fYBLB93Fun16oEYw7qB7TnU Nz99Nk6rXHupL6GSHZdC =+ZhM -----END PGP SIGNATURE----- --=-/e2UIH9RWctcYlyNhFaZ--