<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 7/15/2013 11:47 AM, Vipul Nayyar
wrote:<br>
</div>
<blockquote
cite="mid:1373906839.69086.YahooMailNeo@web194901.mail.sg3.yahoo.com"
type="cite">
<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>I'm currently working on i386 pc386
BSP. This problem concerns the 3c509/3c509.c file.</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>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.</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>
</blockquote>
This is the primary entry point to the driver. It is configured by
the<br>
user when they want to use this. <br>
<br>
I think XXX_attach methods must stay global with the current network<br>
stack.<br>
<blockquote
cite="mid:1373906839.69086.YahooMailNeo@web194901.mail.sg3.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff; font-family:arial,
helvetica, sans-serif;font-size:10pt">
<div style="color: rgb(0, 0, 0); font-size: 13px; font-family:
arial, helvetica, sans-serif; background-color: transparent;
font-style: normal;"><span>But this function </span><span
style="font-size: 10pt;">rtems_3c509_driver_attach() is
neither called locally , nor globally.</span></div>
<div style="color: rgb(0, 0, 0); font-size: 10pt; font-family:
arial, helvetica, sans-serif; background-color: transparent;
font-style: normal;"><span style="font-size: 10pt;"><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 style="font-size: 10pt;">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.</span></div>
<div style="color: rgb(0, 0, 0); font-size: 10pt; font-family:
arial, helvetica, sans-serif; background-color: transparent;
font-style: normal;"><span style="font-size: 10pt;">If I were
to treat it as static, then I get this warning of unused
function during compilation. How should I proceed ?</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;"><br>
</div>
</div>
</blockquote>
It should be in a global .h file and likely the only candidate in
this<br>
case is the bsp.h for the pc386.<br>
<blockquote
cite="mid:1373906839.69086.YahooMailNeo@web194901.mail.sg3.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff; font-family:arial,
helvetica, sans-serif;font-size:10pt">
<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>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Joel Sherrill, Ph.D. Director of Research & Development
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a> On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985 </pre>
</body>
</html>