* AF9035 experimental header changes
@ 2012-05-13 15:24 Oliver Schinagl
2012-05-13 15:51 ` Antti Palosaari
0 siblings, 1 reply; 4+ messages in thread
From: Oliver Schinagl @ 2012-05-13 15:24 UTC (permalink / raw)
To: linux-media
Hi antti,
I've just updated my local branch of your experimental branch and got
some conflicts because you moved the header inclusions from the C file
to the header file. Why is that? I thought it was really bad practice to
have includes in header files.
http://git.linuxtv.org/anttip/media_tree.git/commitdiff/7d28d8226cffd1ad6e555b36f6f9855d8bba8645
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: AF9035 experimental header changes
2012-05-13 15:24 AF9035 experimental header changes Oliver Schinagl
@ 2012-05-13 15:51 ` Antti Palosaari
2012-05-13 17:26 ` Oliver Schinagl
0 siblings, 1 reply; 4+ messages in thread
From: Antti Palosaari @ 2012-05-13 15:51 UTC (permalink / raw)
To: Oliver Schinagl; +Cc: linux-media
On 13.05.2012 18:24, Oliver Schinagl wrote:
> Hi antti,
>
> I've just updated my local branch of your experimental branch and got
> some conflicts because you moved the header inclusions from the C file
> to the header file. Why is that? I thought it was really bad practice to
> have includes in header files.
>
> http://git.linuxtv.org/anttip/media_tree.git/commitdiff/7d28d8226cffd1ad6e555b36f6f9855d8bba8645
Because "struct state" was inside af9013.h and I added "struct
af9033_config" to state. Due to that af9033_config visibility I was
forced to move af9013.h include to the af9015.h and moved all the others
too.
What is problem you has met?
DVB USB driver header file is something like private place for data
other than code as it is not included by any other driver.
regards
Antti
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: AF9035 experimental header changes
2012-05-13 15:51 ` Antti Palosaari
@ 2012-05-13 17:26 ` Oliver Schinagl
2012-05-13 17:39 ` Antti Palosaari
0 siblings, 1 reply; 4+ messages in thread
From: Oliver Schinagl @ 2012-05-13 17:26 UTC (permalink / raw)
To: Antti Palosaari; +Cc: linux-media
On 13-05-12 17:51, Antti Palosaari wrote:
> On 13.05.2012 18:24, Oliver Schinagl wrote:
>> Hi antti,
>>
>> I've just updated my local branch of your experimental branch and got
>> some conflicts because you moved the header inclusions from the C file
>> to the header file. Why is that? I thought it was really bad practice to
>> have includes in header files.
>>
>> http://git.linuxtv.org/anttip/media_tree.git/commitdiff/7d28d8226cffd1ad6e555b36f6f9855d8bba8645
>>
>
> Because "struct state" was inside af9013.h and I added "struct
> af9033_config" to state. Due to that af9033_config visibility I was
> forced to move af9013.h include to the af9015.h and moved all the
> others too.
>
I see, I just learnedthat having includes in headers is just something
really bad, possibly causing include loops etc etc. Its just something
that's generally not needed and should be avoided. ideally anyway :)
> What is problem you has met?
Well it's just movement of those headers caused merges to conflict and
fail :)
>
> DVB USB driver header file is something like private place for data
> other than code as it is not included by any other driver.
>
> regards
> Antti
Oliver
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: AF9035 experimental header changes
2012-05-13 17:26 ` Oliver Schinagl
@ 2012-05-13 17:39 ` Antti Palosaari
0 siblings, 0 replies; 4+ messages in thread
From: Antti Palosaari @ 2012-05-13 17:39 UTC (permalink / raw)
To: Oliver Schinagl; +Cc: linux-media
On 13.05.2012 20:26, Oliver Schinagl wrote:
> On 13-05-12 17:51, Antti Palosaari wrote:
>> On 13.05.2012 18:24, Oliver Schinagl wrote:
>>> Hi antti,
>>>
>>> I've just updated my local branch of your experimental branch and got
>>> some conflicts because you moved the header inclusions from the C file
>>> to the header file. Why is that? I thought it was really bad practice to
>>> have includes in header files.
>>>
>>> http://git.linuxtv.org/anttip/media_tree.git/commitdiff/7d28d8226cffd1ad6e555b36f6f9855d8bba8645
>>>
>>
>> Because "struct state" was inside af9013.h and I added "struct
>> af9033_config" to state. Due to that af9033_config visibility I was
>> forced to move af9013.h include to the af9015.h and moved all the
>> others too.
>>
> I see, I just learnedthat having includes in headers is just something
> really bad, possibly causing include loops etc etc. Its just something
> that's generally not needed and should be avoided. ideally anyway :)
But it is not actual header in the mind of the normal header. It is
something like driver private include. Maybe better name could be
af9035_priv.h as the demodulators files are named. But as all the other
DVB USB drivers are named without priv I do not like to name that
differently.
Include guards [1] are for avoiding include loops.
>> What is problem you has met?
> Well it's just movement of those headers caused merges to conflict and
> fail :)
Hmmm, may I ask what you are doing? Adding some new supported tuners or
hacking dual mode?
That my repository is the only "official" one. As that is the official
repo you should resolve merge conflicts with your own :)
>> DVB USB driver header file is something like private place for data
>> other than code as it is not included by any other driver.
[1] http://en.wikipedia.org/wiki/Include_guard
regards
Antti
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-13 17:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-13 15:24 AF9035 experimental header changes Oliver Schinagl
2012-05-13 15:51 ` Antti Palosaari
2012-05-13 17:26 ` Oliver Schinagl
2012-05-13 17:39 ` Antti Palosaari
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).