<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 12, 2013 at 11:50 AM, Saket Sinha <span dir="ltr">&lt;<a href="mailto:saket.sinha89@gmail.com" target="_blank">saket.sinha89@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">This is to discuss the problems I am facing with porting  a driver from a 2.6.18 kernel to 3.8.3 kernel.</span><br>

</div><div><font face="arial, sans-serif">Apart from the APIs and functions that have changed(which I have more or less replaced), the system call implementation has changed.</font></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>

</span></div><div><div dir="ltr" style="font-family:arial,sans-serif;font-size:13px"><a href="http://lxr.linux.no/linux+v2.6.18/arch/i386/kernel/syscall_table.S#L41" target="_blank">http://lxr.linux.no/linux+v2.6.18/arch/i386/kernel/syscall_table.S#L41</a></div>

<div dir="ltr" style="font-family:arial,sans-serif;font-size:13px"><a href="http://lxr.linux.no/linux+v3.8.3/arch/x86/syscalls/syscall_64.tbl#L92" target="_blank">http://lxr.linux.no/linux+v3.8.3/arch/x86/syscalls/syscall_64.tbl#L92</a></div>

</div><div dir="ltr" style="font-family:arial,sans-serif;font-size:13px"><br></div><div dir="ltr" style="font-family:arial,sans-serif;font-size:13px">Now due to this, some unnecessary warnings and errors are coming.<br>
</div><div dir="ltr" style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">To explain this I am providing the compiler error which is not coming on 2.6.18 kernel but is coming on 3.8.3 kernel.</div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">the below line is generating</div><div style="font-family:arial,sans-serif;font-size:13px">
<a href="https://github.com/HeisSpiter/hepunion/blob/master/fs/hepunion/helpers.c#L492" target="_blank">https://github.com/HeisSpiter/hepunion/blob/master/fs/hepunion/helpers.c#L492</a><br></div><div style="font-family:arial,sans-serif;font-size:13px">

<span style="color:rgb(80,0,80)">mode &amp;= ~current-&gt;fs-&gt;umask;</span><br></div><div style="font-family:arial,sans-serif;font-size:13px">the following error-</div><div style="font-family:arial,sans-serif;font-size:13px">

<div> ERROR:Derefencing pointer to incomplete type</div></div></div></blockquote><div>AFAIK, this error seems like the &#39;fs&#39;  structures definition is not known to the code present in this file.<br></div><div> This can happen because of the header which you included was as per 2.6.18 kernel and in 3.8.3 kernel that struct maybe moved to some where else. The error indicates the type of the pointer is not known and you are trying to deference it.<br>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div><div style="font-family:arial,sans-serif;font-size:13px">This has nothing to do with any APIs or change in the structure in the newer kernel. </div><div style="font-family:arial,sans-serif;font-size:13px">
This just the importation of mkdir code from the linux kernel. Likely to be sys_mkdir, IIRC. Talking of which, I&#39;d think that I must sync ALL the importations from the Linux kernel with mine.</div><div dir="ltr" style="font-family:arial,sans-serif;font-size:13px">

<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Regards,</div><div style="font-family:arial,sans-serif;font-size:13px">
Saket Sinha</div></div>
<br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br></div><div class="gmail_extra">- Rohan<br></div></div>