<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>Hello,</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span>Thanks for the guidance. As in the case of 3c509, there is I believe only one method, that need to be added to bsp.h . But for other files, there are multiple methods for example in ckinit, that are not internally used, but I feel they definitely cannot be removed(like a method to install interrupt handler, etc). So, I hope having multiple prototypes in bsp.h from a single file should not be a problem. Right ?</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial,
helvetica, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;">Regards</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;"><span style="background-color:transparent;line-height:1.22;">Vipul Nayyar </span></div><div style="color: rgb(0, 0, 0); font-size: 12.727272033691406px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;"><br></div><div><br></div> <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"> <b><span
style="font-weight:bold;">From:</span></b> Sebastian Huber <sebastian.huber@embedded-brains.de><br> <b><span style="font-weight: bold;">To:</span></b> "rtems-devel@rtems.org" <rtems-devel@rtems.org> <br><b><span style="font-weight: bold;">Cc:</span></b> Vipul Nayyar <nayyar_vipul@yahoo.com> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, 16 July 2013 11:11 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [GSOC] Help regarding pc386 3c509.c file<br> </font> </div> <div class="y_msg_container"><br>Hello Vipur,<br><br>its good that you ask. Actually you found a bug in the BSPs using <br>3c509.c. As Joel already said this rtems_3c509_driver_attach() is the <br>main entry point of the network interface driver and can be used by <br>applications to use this interface.<br><br>So lets have a look which BSP is affected:<br><br>~/git-rtems $ grep -r 3c509.c c | grep
'am:'<br>c/src/lib/libbsp/i386/pc386/Makefile.am:3c509_rel_SOURCES = 3c509/3c509.c<br><br>So luckily only the pc386 BSP. You can now add the prototype to <br>"c/src/lib/libbsp/i386/pc386/include/bsp.h" line 83. Just have a look <br>at the other network interface definitions.<br><br>On 15.07.2013 18:47, Vipul Nayyar wrote:<br>> Hello,<br>><br>> I'm currently working on i386 pc386 BSP. This problem concerns the 3c509/3c509.c file.<br>><br>> 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.<br>><br>> But this
function rtems_3c509_driver_attach() is neither called locally , nor globally.<br>><br>> 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.<br>> If I were to treat it as static, then I get this warning of unused function during compilation. How should I proceed ?<br>><br>> Regards<br>> Vipul Nayyar<br>><br><br><br>-- <br>Sebastian Huber, embedded brains GmbH<br><br>Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>Phone : +49 89 189 47 41-16<br>Fax : +49 89 189 47 41-09<br>E-Mail : <a ymailto="mailto:sebastian.huber@embedded-brains.de" href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a><br>PGP : Public key available on request.<br><br>Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br><br><br><br></div> </div> </div> </div></body></html>