<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>I'll keep that in mind to closely look for warnings & errors while sending patches. But I might also add, that warnings for unused functions might be present in my patches, since you suggested to remove unused functions, if they're affected by change in API methods. Well, from what I saw, the warnings for unused functions encountered are not due to the work I'm doing. So, either I can stop touching those functions(& a couple of warnings will stay there), or remove all of these inter-related
 functions from the file. What say ?</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'll remove the </span><span style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px;">clock_driver_get_nanoseconds_since_last_tick() function & the </span><span style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px;">Clock_driver_nanoseconds_since_last_tick macro</span><span style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; background-color: transparent;">  in edb7312. Is there a need to modify the clockdrv_shell.h file ?</span></div><div style="color: rgb(0, 0, 0); font-size: 16px;
 font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px;"><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 <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, 15 July 2013 3:38 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [PATCH] Updated legacy code in arm edb7312<br> </font> </div> <div class="y_msg_container"><br>Hello Vipul,<br><br>your patches are getting better, but please review them carefully before you <br>submit them and fix all obvious problems:<br><br>gmake[6]: Entering directory <br>`/scratch/git-build/b-edb7312/arm-rtems4.11/c/edb7312/lib/libbsp/arm/edb7312'<br>arm-rtems4.11-gcc --pipe -B../../../../../.././lib/ <br>-B../../../../../.././edb7312/lib/ -specs bsp_specs -qrtems -DHAVE_CONFIG_H <br>-isystem
 ../../../../../.././edb7312/lib/include   -O2 -g -Wall <br>-Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes <br>-Wnested-externs -MT clockdrv.o -MD -MP -MF .deps/clockdrv.Tpo -c -o clockdrv.o <br>`test -f 'clock/clockdrv.c' || echo <br>'/home/sh/rtems-4.11/c/src/lib/libbsp/arm/edb7312/'`clock/clockdrv.c<br>/home/sh/rtems-4.11/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c:74:10: <br>warning: no previous prototype for <br>'clock_driver_get_nanoseconds_since_last_tick' [-Wmissing-prototypes]<br>  uint32_t clock_driver_get_nanoseconds_since_last_tick(void)<br>           ^<br><br>The next patch from you with compiler warnings is the last patch I review from you.<br><br>If you are unsure, how to deal with a warning, then ask on the list, but don't <br>expect that reviewers solve the problems for you.<br><br>In this particular case you can completely remove the nanoseconds support.  See <br>also
 clockdrv_shell.h:<br><br>[...]<br>   #if defined(Clock_driver_nanoseconds_since_last_tick)<br>     rtems_clock_set_nanoseconds_extension(<br>       Clock_driver_nanoseconds_since_last_tick<br>     );<br>   #endif<br>[...]<br><br>So this nanoseconds handler is optional.  All BSPs defining<br><br>uint32_t clock_driver_get_nanoseconds_since_last_tick(void)<br>{<br>   return 0;<br>}<br><br>have this problem.<br><br>On 07/15/2013 11:32 AM, Vipul Nayyar wrote:<br>> ---<br>>   c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c  |  3 +--<br>>   c/src/lib/libbsp/arm/edb7312/network/network.c | 12 +++++-------<br>>   2 files changed, 6 insertions(+), 9 deletions(-)<br>><br>> diff --git a/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c b/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c<br>> index af0448ff7..761387f 100644<br>> ---
 a/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c<br>> +++ b/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c<br>> @@ -18,8 +18,7 @@<br>>     #define CLOCK_DRIVER_USE_FAST_IDLE<br>>   #endif<br>><br>> -void Clock_isr(rtems_irq_hdl_param arg);<br>> -uint32_t clock_driver_get_nanoseconds_since_last_tick(void);<br>> +void Clock_isr(void * arg);<br>><br>>   #define Clock_driver_support_at_tick()                \<br>>     do {                                                \<br>> diff --git a/c/src/lib/libbsp/arm/edb7312/network/network.c b/c/src/lib/libbsp/arm/edb7312/network/network.c<br>> index ce139ec..468fb61 100644<br>> --- a/c/src/lib/libbsp/arm/edb7312/network/network.c<br>> +++
 b/c/src/lib/libbsp/arm/edb7312/network/network.c<br>> @@ -7,14 +7,13 @@<br>>   #define CS8900_BASE 0x20000300<br>>   unsigned int bsp_cs8900_io_base = 0;<br>>   unsigned int bsp_cs8900_memory_base = 0;<br>> -cs8900_device *g_cs;<br>> -void cs8900_isr(rtems_irq_hdl_param unused);<br>> +static void cs8900_isr(void *);<br>><br>>   char g_enetbuf[1520];<br>><br>> -void cs8900_isr(rtems_irq_hdl_param unused)<br>> +static void cs8900_isr(void *arg)<br>>   {<br>> -    cs8900_interrupt(BSP_EINT3, g_cs);<br>> +    cs8900_interrupt(BSP_EINT3, arg);<br>>   }<br>><br>>   /* cs8900_io_set_reg - set one of the I/O addressed registers */<br>> @@ -64,14 +63,13 @@ unsigned short cs8900_mem_get_reg (cs8900_device *cs, unsigned long reg)<br>>   void cs8900_attach_interrupt (cs8900_device *cs)<br>>   {<br>>      
 rtems_status_code status = RTEMS_SUCCESSFUL;<br>> -    g_cs = cs;<br>><br>>       status = rtems_interrupt_handler_install(<br>>           BSP_EINT3,<br>>           "Network",<br>>           RTEMS_INTERRUPT_UNIQUE,<br>>           cs8900_isr,<br>> -        NULL<br>> +        cs<br>>       );<br>>       assert(status == RTEMS_SUCCESSFUL);<br>>   }<br>> @@ -83,7 +81,7 @@ void cs8900_detach_interrupt (cs8900_device *cs)<br>>       status = rtems_interrupt_handler_remove(<br>>           BSP_EINT3,<br>>           cs8900_isr,<br>> -        NULL<br>> +        cs<br>>       );<br>> 
      assert(status == RTEMS_SUCCESSFUL);<br>>   }<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>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></div> </div> </div>  </div></body></html>