<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span>Hello Andreas,</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>Thanks Andreas for pointing out that silly mistake. I didn't focus on other variables being used. I've updated the patch, and wanted to ask, what should be done when status code returned is not successful ?</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="background-color:
 transparent;"><div style="background-color: transparent;"><font size="2">commit 9b21c1effe34cb716c00ea1c11777ef16ce9c7cc</font></div><div style="background-color: transparent;"><font size="2">Author: Vipul Nayyar <nayyar_vipul@yahoo.com></font></div><div style="background-color: transparent;"><font size="2">Date:   Tue Jul 2 12:20:49 2013 +0530</font></div><div style="background-color: transparent;"><font size="2"><br></font></div><div style="background-color: transparent;"><font size="2">    Updated Legacy code in arm csb337</font></div><div style="background-color: transparent;"><font size="2"><br></font></div><div style="background-color: transparent;"><font size="2">diff --git a/c/src/lib/libbsp/arm/csb337/network/network.c b/c/src/lib/libbsp/arm/csb337/network/network.c</font></div><div style="background-color: transparent;"><font size="2">index e31bcc0..53d60d2 100644</font></div><div style="background-color:
 transparent;"><font size="2">--- a/c/src/lib/libbsp/arm/csb337/network/network.c</font></div><div style="background-color: transparent;"><font size="2">+++ b/c/src/lib/libbsp/arm/csb337/network/network.c</font></div><div style="background-color: transparent;"><font size="2">@@ -358,6 +358,7 @@ void at91rm9200_emac_init(void *arg)</font></div><div style="background-color: transparent;"><font size="2"> {</font></div><div style="background-color: transparent;"><font size="2">     at91rm9200_emac_softc_t     *sc = arg;</font></div><div style="background-color: transparent;"><font size="2">     struct ifnet *ifp = &sc->arpcom.ac_if;</font></div><div style="background-color: transparent;"><font size="2">+    rtems_status_code stc = RTEMS_SUCCESSFUL;</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font
 size="2">     /*</font></div><div style="background-color: transparent;"><font size="2">      *This is for stuff that only gets done once (at91rm9200_emac_init()</font></div><div style="background-color: transparent;"><font size="2">@@ -382,7 +383,16 @@ void at91rm9200_emac_init(void *arg)</font></div><div style="background-color: transparent;"><font size="2">     AIC_SMR_REG(AIC_SMR_EMAC) = AIC_SMR_PRIOR(EMAC_INT_PRIORITY);</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2">     /* install the interrupt handler */</font></div><div style="background-color: transparent;"><font size="2">-    BSP_install_rtems_irq_handler(&at91rm9200_emac_isr_data);</font></div><div style="background-color: transparent;"><font size="2">+    stc =
 rtems_interrupt_handler_install(</font></div><div style="background-color: transparent;"><font size="2">+      at91rm9200_emac_isr_data.name,</font></div><div style="background-color: transparent;"><font size="2">+      "Network",</font></div><div style="background-color: transparent;"><font size="2">+      RTEMS_INTERRUPT_UNIQUE,</font></div><div style="background-color: transparent;"><font size="2">+      at91rm9200_emac_isr_data.hdl,</font></div><div style="background-color: transparent;"><font size="2">+      at91rm9200_emac_isr_data.handle</font></div><div style="background-color: transparent;"><font size="2">+    );</font></div><div style="background-color: transparent;"><font size="2">+    if (stc != RTEMS_SUCCESSFUL) {</font></div><div style="background-color: transparent;"><font size="2">+    printk("RTEMS Interrupt handler not
 installed");</font></div><div style="background-color: transparent;"><font size="2">+    }</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2">     /* EMAC doesn't support promiscuous, so ignore requests */</font></div><div style="background-color: transparent;"><font size="2">     if (ifp->if_flags & IFF_PROMISC) {</font></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal;"><br></div></div><div style="font-family: arial, helvetica, clean, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, clean, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">Regards</div><div style="font-family: arial,
 helvetica, clean, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="background-color:transparent;line-height:1.22;">Vipul Nayyar </span></div><div style="font-family: arial, helvetica, clean, sans-serif; font-size: 12.727272033691406px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><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> Andreas Heinig <andreas.heinig@cs.tu-dortmund.de><br> <b><span style="font-weight: bold;">To:</span></b> rtems-devel@rtems.org; Vipul Nayyar <nayyar_vipul@yahoo.com> <br> <b><span style="font-weight:
 bold;">Sent:</span></b> Tuesday, 2 July 2013 12:11 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Patch] Removing legacy method from arm csb337<br> </font> </div> <div class="y_msg_container"><br>Hello Vipul,<br><br>> diff --git a/c/src/lib/libbsp/arm/csb337/network/network.c<br>> b/c/src/lib/libbsp/arm/csb337/network/network.c index e31bcc0..3a02073<br>> 100644<br>> --- a/c/src/lib/libbsp/arm/csb337/network/network.c<br>> +++ b/c/src/lib/libbsp/arm/csb337/network/network.c<br>> @@ -358,6 +358,7 @@ void at91rm9200_emac_init(void *arg)<br>>  {<br>>      at91rm9200_emac_softc_t     *sc = arg;<br>>      struct ifnet *ifp = &sc->arpcom.ac_if;<br>> +    rtems_status_code sc = RTEMS_SUCCESSFUL;<br><br>Hello,<br><br>you used 'sc' twice:<br>1) at91rm9200_emac_softc_t<br>2) rtems_status_code<br><br>Cheers<br>Andreas<br><br><br><br></div> </div> </div>
  </div></body></html>