[PATCH] score/or1k/cpu.c: discard linker-symbols.h include and extern the related variable

Peter Dufault dufault at hda.com
Tue Feb 10 21:46:03 UTC 2015


> On Feb 10, 2015, at 15:30 , Joel Sherrill <Joel.Sherrill at oarcorp.com> wrote:
> 
> On 2/10/2015 2:26 PM, Hesham Moustafa wrote:
>> On Tue, Feb 10, 2015 at 8:21 PM, Joel Sherrill
>> <joel.sherrill at oarcorp.com> wrote:
>>> Thanks. One down.
>>> 
>>> Crap. It should have had a comment that closed the PR. :(
>> Who should add the comment? The ticket is now closed (fixed). In the
>> future patches, should I tag the ticket/PR number part of the commit
>> message?
> I think the procedure is to use the git commit message like this:
> 
> =======================
> or1k/cpu.c: Eliminate dependency on BSP provided .h file
> 
> close XXXX
> =======================
> 
> You just posted a patch and I did remember to add the --author
> info but forgot the PR.
>>> On 2/10/2015 2:04 PM, Hesham ALMatary wrote:
>>>> ---
>>>> cpukit/score/cpu/or1k/cpu.c | 7 ++++++-
>>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>> 
>>>> diff --git a/cpukit/score/cpu/or1k/cpu.c b/cpukit/score/cpu/or1k/cpu.c
>>>> index 9d1ae49..69845ff 100644
>>>> --- a/cpukit/score/cpu/or1k/cpu.c
>>>> +++ b/cpukit/score/cpu/or1k/cpu.c
>>>> @@ -14,9 +14,14 @@
>>>> #include <rtems/system.h>
>>>> #include <rtems/score/isr.h>
>>>> #include <rtems/score/wkspace.h>
>>>> -#include <bsp/linker-symbols.h>
>>>> #include <rtems/score/cpu.h>
>>>> 
>>>> +/* bsp_start_vector_table_begin is the start address of the vector table
>>>> + * containing addresses to ISR Handlers. It's defined at the BSP linkcmds
>>>> + * and may differ from one BSP to another.
>>>> + */
>>>> +extern char bsp_start_vector_table_begin[];
>>>> +
>>>> /**
>>>>  * @brief Performs processor dependent initialization.
>>>>  */
>>>> -- 2.1.0
>>> --
>>> Joel Sherrill, Ph.D.             Director of Research & Development
>>> joel.sherrill at OARcorp.com        On-Line Applications Research
>>> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
>>> Support Available                (256) 722-9985
>>> 
> 

I'm not sure what it fixes, but removing a header file and putting an "extern" declaration in a C file instead needs to be explained in a comment.  In general that's moving backwards, I guess the comment implies something (that it may differ from one BSP to another), but since an extern in C code is bad practice it should be better explained.

Peter
-----------------
Peter Dufault
HD Associates, Inc.      Software and System Engineering




More information about the devel mailing list