[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/dev/dec
Robert Swindells wrote:
> Christoph Egger wrote:
>>> Valeriy E. Ushakov wrote:
>>>> On Tue, May 12, 2009 at 14:18:16 +0000, Christoph Egger wrote:
>>>>> struct device * -> device_t, no functional changes intended.
>>>> Why don't you cmp(1) the objects before and after to verify that?
>>>> "Same object code generated" is, unlike intentions, something
>>>> that can be verified.
>>> A fair number won't be the same, I would guess half our SCSI
>>> drivers are currently broken.
>>> Do a search in sys/dev/ic for 'adapt_dev', any driver that casts
>>> this to a softc instead of calling device_private() will crash.
>> The cast is a bug in drivers which have
>> the device_t/softc split already done. It is harmless
>> for those not yet splitted.
> Maybe ahc(4) was the only one that was broken. The point is that you
> could have found this by comparing the object files.
As Izumi said, struct device * and device_t are equal.
Replacing a cast with device_private() generates different object code,
because device_private() is a function call.
Main Index |
Thread Index |