Current-Users archive

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

Re: call for testing: completing the device/softc split



chs@ wrote:

> I put together a patch to complete the device/softc split
> for the remaining drivers in the tree.  the patch is at:
> http://ftp.netbsd.org/pub/NetBSD/misc/chs/diff.devsoftc.8

>> +++ sys/arch/amiga/amiga/autoconf.c     9 Oct 2012 02:53:15 -0000
>> @@ -156,34 +156,52 @@ matchname(const char *fp, const char *sp
>>   * always tell the difference betwean the real and console init
>>   * by checking for NULL.
>>   */
>> +struct qq {
>> +    int q;
>> +    int c;
>> +} qq;

Debug leftover?

>> +++ sys/dev/pci/if_devar.h      26 Sep 2012 23:44:22 -0000
>> @@ -487,7 +487,7 @@ struct _tulip_softc_t {
>>  #endif /* _BSDI_VERSION < 199401 */
>>  #endif /* __bsdi__ */
>>  #if defined(__NetBSD__)
>> -    struct device tulip_dev;           /* base device */
>> +    device_t tulip_dev;                /* base device */

Some more macro?
>> #define tulip_unit                   tulip_dev.dv_unit

Or it's time to obsolete de driver?


It would be nice to split the patch into two parts,
cosmetic only changes (struct device * -> device_t,
device_xname() macro etc) and actual split
(CFATTACH_DECL -> CFATTACH_DECL_NEW with softc)
that could have many pitfalls. (conversion between
device_t and softc via (void *) casts/pointers)

(though actually you've caught some botches in x68k ;-)

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index