From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Subject: Re: usbnet private-data accessor functions Date: Fri, 12 Oct 2018 17:38:48 +0200 Message-ID: <1539358728.2802.3.camel@suse.com> References: <20181012091642.21294-1-ben.dooks@codethink.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: gregkh@linuxfoundation.org, linux-kernel@lists.codethink.co.uk, bjorn@mork.no, steve.glendinning@shawell.net, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org To: Ben Dooks , davem@davemloft.net, netdev@vger.kernel.org Return-path: In-Reply-To: <20181012091642.21294-1-ben.dooks@codethink.co.uk> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Fr, 2018-10-12 at 10:16 +0100, Ben Dooks wrote: > I have been looking at the usbnet drivers and the possibility of some > code cleanups. One of the things I've found is that changing the way > the drivers use the private data with the usbnet structure is often > hand-coded each time is needed. Where is the improvement? You are just hiding how the data is passed. It may look more pleasant to you, but that is a subjective impression. I would suggest that if you want a nicely named way to get at private data, add a field to the appropriate data structure. Regards Oliver