Page MenuHomeFreeBSD

mbuf: remove remnants of caddr_t
AcceptedPublic

Authored by glebius on Wed, Oct 14, 7:46 PM.
Tags
None
Referenced Files
F175992713: D60736.diff
Thu, Oct 15, 2:52 AM
F175976819: D60736.id189931.diff
Wed, Oct 14, 11:21 PM
F175976735: D60736.id189937.diff
Wed, Oct 14, 11:20 PM
F175976683: D60736.diff
Wed, Oct 14, 11:19 PM

Details

Reviewers
adrian
tuexen
Group Reviewers
network
transport
Summary

caddr_t is a typedef for a character pointer (char *) that originated in
Version 7 Unix, released by AT&T in 1979. It became obsolete in 1981,
when ANSI C introduced void *.

There is a lot of code that uses m->m_data for arithmetics, thus we can't
switch it to void * easily. Let's at least stop proliferation of caddr_t.
We have developers that are twice younger than obsoletion of this type.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 78227
Build 75110: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Wed, Oct 14, 7:48 PM

Sorry, dropped unfinished diff. Will update.

Change m_append, m_copyback, m_copydata prototypes to use void *.

This revision now requires review to proceed.Wed, Oct 14, 9:06 PM

We have developers that are twice younger than obsoletion of this type.

Looks like I'm not qualified to approve this one. 🚶

This revision is now accepted and ready to land.Wed, Oct 14, 11:24 PM
zlei added inline comments.
sys/kern/uipc_mbuf.c
699

Maybe it is shorter to use macro mtodo ?

1296

Actually bzero() does not care about the type. No need to cast to char *.

1311

Ditto.

1356
1356
1369
sys/sys/mbuf.h
347

I guess the type of m_data can eventually be converted void * ? But many drivers access m_data directly.