[GSOC] Help regarding pc386 3c509.c file

Joel Sherrill joel.sherrill at OARcorp.com
Mon Jul 15 16:50:39 UTC 2013


On 7/15/2013 11:47 AM, Vipul Nayyar wrote:
> Hello,
>
> I'm currently working on i386 pc386 BSP. This problem concerns the 
> 3c509/3c509.c file.
>
> After turning rtems_3c509_driver_attach() from global to static, since 
> it's not being used anywhere outside in the tree, I get this warning 
> for unused function. Ideally I should delete it. If I delete it, then 
> I end up deleting all other functions also. But this 
> rtems_3c509_driver_attach() stores references to different handlers & 
> calls them by passing a ifnet structure to if_attach(). I think it's a 
> very important method & I don't think I should delete it.
>
This is the primary entry point to the driver. It is configured by the
user when they want to use this.

I think XXX_attach methods must stay global with the current network
stack.
> But this function rtems_3c509_driver_attach() is neither called 
> locally , nor globally.
>
> If I were to treat it as global function, I think it should be 
> declared in a header file, because declaring a global function locally 
> seems bad.
> If I were to treat it as static, then I get this warning of unused 
> function during compilation. How should I proceed ?
>
It should be in a global .h file and likely the only candidate in this
case is the bsp.h for the pc386.
> Regards
> Vipul Nayyar
>


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20130715/02aca40f/attachment-0001.html>


More information about the devel mailing list