qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] slirp: kill ugly macros


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH] slirp: kill ugly macros
Date: Fri, 17 Feb 2012 14:32:15 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2012-02-16 12:06, Kevin Wolf wrote:
> Am 15.02.2012 19:55, schrieb Jan Kiszka:
>> On 2012-02-15 19:45, Michael S. Tsirkin wrote:
>>> Remove ugly macros for field names,
>>> change done by the following script:
>>>
>>> s#\bifq_prev\b#m_prev#g;
>>> s#\bifq_next\b#m_next#g;
>>> s#\bifs_prev\b#m_prevpkt#g;
>>> s#\bifs_next\b#m_nextpkt#g;
>>> s#\bifq_so\b#m_so#g;
>>> s#\bm_next\b#m_hdr.mh_next#g;
>>> s#\bm_prev\b#m_hdr.mh_prev#g;
>>> s#\bm_nextpkt\b#m_hdr.mh_nextpkt#g;
>>> s#\bm_prevpkt\b#m_hdr.mh_prevpkt#g;
>>> s#\bm_flags\b#m_hdr.mh_flags#g;
>>> s#\bm_len\b#m_hdr.mh_len#g;
>>> s#\bm_data\b#m_hdr.mh_data#g;
>>> s#\bm_size\b#m_hdr.mh_size#g;
>>> s#\bm_dat\b#M_dat.m_dat_#g;
>>> s#\bm_ext\b#M_dat.m_ext_#g;
>>
>> Could you convert M_dat to m_dat as well (do not script, it's also a
>> type)? It looks strange.
> 
> What are all these m_ and mh_ prefixes for struct fields even about?
> When I have an mbuf, I know perfectly well that it is one, and that
> m_hdr is a header of it.
> 
> So while we're cleaning up here, wouldn't mbuf->hdr->next make more
> sense than mbuf->m_hdr->mh_next?

I tend to agree - as we are already touching so many files, and the
names also get longer due to this. Mind to respin the series?

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux



reply via email to

[Prev in Thread] Current Thread [Next in Thread]