Re: [PATCH net-next 05/19] net: usb: aqc111: Introduce PHY access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 08, 2018 at 09:09:54AM +0000, Igor Russkikh wrote:
> 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?

	Andrew



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux