[GSOC] Help regarding pc386 3c509.c file

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Jul 16 17:41:58 UTC 2013


Hello Vipur,

its good that you ask.  Actually you found a bug in the BSPs using 
3c509.c.  As Joel already said this rtems_3c509_driver_attach() is the 
main entry point of the network interface driver and can be used by 
applications to use this interface.

So lets have a look which BSP is affected:

~/git-rtems $ grep -r 3c509.c c | grep 'am:'
c/src/lib/libbsp/i386/pc386/Makefile.am:3c509_rel_SOURCES = 3c509/3c509.c

So luckily only the pc386 BSP.  You can now add the prototype to 
"c/src/lib/libbsp/i386/pc386/include/bsp.h" line 83.  Just have a look 
at the other network interface definitions.

On 15.07.2013 18:47, 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.
>
> 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 ?
>
> Regards
> Vipul Nayyar
>


-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the devel mailing list