From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Russkikh Subject: Re: [PATCH net-next 05/19] net: usb: aqc111: Introduce PHY access Date: Mon, 8 Oct 2018 17:07:09 +0300 Message-ID: References: <6b4837b970d7709bc2e11d89a7e21e5f10584e30.1538734658.git.igor.russkikh@aquantia.com> <20181005220418.GA29867@lunn.ch> <20181008121707.GB6216@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "David S . Miller" , "linux-usb@vger.kernel.org" , "netdev@vger.kernel.org" , Dmitry Bezrukov To: Andrew Lunn Return-path: Received: from mail-eopbgr730077.outbound.protection.outlook.com ([40.107.73.77]:49712 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726056AbeJHVaE (ORCPT ); Mon, 8 Oct 2018 17:30:04 -0400 In-Reply-To: <20181008121707.GB6216@lunn.ch> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: Hi Andrew, >>>> + struct aqc111_data *aqc111_data = (struct aqc111_data *)dev->data[0]; >>> >>> Having to do this cast all the time is quiet ugly. It seems like some >>> other usb_net drivers use netdev_priv(). >> >> As I see most of usb usbnet based devices use the same theme with accessing >> private data via dev->data. > > It is just ugly. It would of been better if dev->data[] was a void > pointer. This is the first usbnet driver i've reviewed, so i don't > know the history behind this. I wonder if adding a void *priv would be > accepted? I can't comment on history of this, but... net-next/drivers/net/usb$ grep "dev->data" * | wc -l 173 Regards, Igor