[linux-dvb] [PATCH] Multi protocol support

Manu Abraham abraham.manu at gmail.com
Sun Apr 16 12:18:47 CEST 2006


Johannes Stezenbach wrote:
> On Sat, Apr 15, 2006, Manu Abraham wrote:
>   
>> Andreas Oberritter wrote:
>>     
>>> Manu Abraham wrote:
>>>       
>>>> +typedef enum {
>>>> +       FE_TRANSPORT,
>>>> +       FE_GENERIC_PACKET,
>>>> +       FE_GENERIC_CONTINUOUS,
>>>> +       FE_RESERVED
>>>> +} fe_bbheader_t;
>>>>         
>>> See dmx_bbheader_t.
>>>
>>> IIRC it was discouraged to introduce new typedefs.
>>>       
>> The idea of discouraging typedef's was for typedefining a struct IIRC
>>     
>
> No, typedefs should only be used if you deliberately want to
> _hide_ the true data type. Consider:
>
>   foo_t bar;	// wtf is it?
> vs.
>   enum foo bar;	// it's an enum
>
>
> That said, with all the legacy typedefs in the DVB API, the question
> is whether consistency is more important than avoiding typdefs...
>
>   

I vote for consistency. It would be nice to see a consistent behaviour 
in drivers, rather than causing a confusion.


Manu




More information about the linux-dvb mailing list