Re: [PATCH 0/3] PCI: dwc: Improve code readability

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

 



Hello,

[...]
> > > I confirmed that the uintptr_t fixed the issue.
> >
> > We declined a similar fix in the past[1] ...
> >
> > > I also think that adding a new struct with the mode is overkill.
> >
> > ... with the hopes that a driver could drop the switch statements in place
> > of using the other pattern.  Also, to be consistent with other drivers that
> > do this already.
> 
> Note that the issue of casting is something we cannot fix easily:
> some *_device_id structs use "kernel_ulong_t" for the "data" member,
> others use "void *".
> 
> git grep -W "_device_id" -- include/linux/mod_devicetable.h | grep data
> 
> In addition, several drivers use multiple types of device IDs, so you
> cannot settle on one type to avoid casts.
> 
> Also, putting enum values in instances of that struct, as suggested,
> increases kernel size, for IMHO no additional gain.

All good points!  Thank you for taking the time to get back to me.  Appreciated. :)

> If there is more data to put in the struct, I agree it makes sense to use
> a struct.

Yeah.  Perhaps if there is such a need in the future, indeed.

	Krzysztof



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux