<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,</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 for pointing out the mistakes in the previous patches. Updated the csb337 patch, and did away with the use of rtems_irq_connect_data structure in the file. Is this what you were suggesting ? Hoping I've followed the indentation rules.</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;"><span><div style="background-color: transparent;"><font size="2">commit d24fbcb472b0164ed4e6b51233155df7f6dd57b4</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 16:52:29 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..1c1dd0e 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">@@ -87,17 +87,6 @@ static void at91rm9200_emac_isr_on(const rtems_irq_connect_data *unused);</font></div><div style="background-color: transparent;"><font size="2"> static void at91rm9200_emac_isr_off(const rtems_irq_connect_data *unused);</font></div><div style="background-color: transparent;"><font size="2"> static int at91rm9200_emac_isr_is_on(const rtems_irq_connect_data *irq);</font></div><div style="background-color: transparent;"><font size="2"> </font></div><div style="background-color: transparent;"><font size="2">-/* Replace the first value with the clock's interrupt name. */</font></div><div style="background-color:
 transparent;"><font size="2">-rtems_irq_connect_data at91rm9200_emac_isr_data = {</font></div><div style="background-color: transparent;"><font size="2">-    AT91RM9200_INT_EMAC,</font></div><div style="background-color: transparent;"><font size="2">-    at91rm9200_emac_isr,</font></div><div style="background-color: transparent;"><font size="2">-    NULL,</font></div><div style="background-color: transparent;"><font size="2">-    at91rm9200_emac_isr_on,</font></div><div style="background-color: transparent;"><font size="2">-    at91rm9200_emac_isr_off,</font></div><div style="background-color: transparent;"><font size="2">-    at91rm9200_emac_isr_is_on</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">-</font></div><div
 style="background-color: transparent;"><font size="2"> /* use the values defined in linkcmds for our use of SRAM */</font></div><div style="background-color: transparent;"><font size="2"> extern void * at91rm9200_emac_rxbuf_hdrs;</font></div><div style="background-color: transparent;"><font size="2"> extern void * at91rm9200_emac_txbuf;</font></div><div style="background-color: transparent;"><font size="2">@@ -358,6 +347,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 status =
 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 +372,19 @@ 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">+    status = rtems_interrupt_handler_install(</font></div><div style="background-color: transparent;"><font size="2">+      AT91RM9200_INT_EMAC,</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,</font></div><div style="background-color: transparent;"><font size="2">+      NULL</font></div><div style="background-color: transparent;"><font size="2">+    );</font></div><div style="background-color: transparent;"><font size="2">+    if (status != RTEMS_SUCCESSFUL)
 {</font></div><div style="background-color: transparent;"><font size="2">+        rtems_fatal(</font></div><div style="background-color: transparent;"><font size="2">+          RTEMS_FATAL_SOURCE_BSP_SPECIFIC,</font></div><div style="background-color: transparent;"><font size="2">+          BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION</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"> </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></span></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> Sebastian Huber <sebastian.huber@embedded-brains.de><br> <b><span style="font-weight: bold;">To:</span></b> rtems-devel@rtems.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, 2 July 2013 1:00 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>On 07/02/2013 09:18 AM, Andreas Heinig wrote:<br>> On Tuesday 02 July 2013 14:52:52 Vipul Nayyar wrote:<br>>> >Hello Andreas,<br>>> ><br>>> >Thanks Andreas for pointing out that silly mistake. I didn't focus on other<br>>> >variables being used.
 I've updated the patch, and wanted to ask, what<br>>> >should be done when status code returned is not successful ?<br>>> ><br>>> >commit 9b21c1effe34cb716c00ea1c11777ef16ce9c7cc<br>>> >Author: Vipul Nayyar<<a ymailto="mailto:nayyar_vipul@yahoo.com" href="mailto:nayyar_vipul@yahoo.com">nayyar_vipul@yahoo.com</a>><br>>> >Date:   Tue Jul 2 12:20:49 2013 +0530<br>>> ><br>>> >     Updated Legacy code in arm csb337<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..53d60d2<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 stc = RTEMS_SUCCESSFUL;<br>> I think you should name the rtems_status_code either 'sc' or 'status'. These<br>> names are used by default in most of the RTEMS modules.<br><br>Yes, status is a good name.<br><br>><br>> In your case I suggest to rename the at91rm9200_emac_softc_t variable, because<br>> sc is confusing here anyway.<br><br>The "sc" is the standard name for this in BSD code.<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>rtems-devel mailing list<br><a ymailto="mailto:rtems-devel@rtems.org" href="mailto:rtems-devel@rtems.org">rtems-devel@rtems.org</a><br><a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-devel</a><br><br><br></div> </div> </div>  </div></body></html>