[PATCH] score: Remove unused return value

Joel Sherrill joel at rtems.org
Tue Jan 24 15:56:56 UTC 2023


I looked at this issue earlier this morning and this fix looks ok.

On Tue, Jan 24, 2023 at 9:56 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> Several SMP message processing functions returned a value.  This value
> was always unused.
>
> Close #4822.
> ---
>  cpukit/include/rtems/score/smpimpl.h | 15 ++++-----------
>  cpukit/score/src/smp.c               |  7 +------
>  2 files changed, 5 insertions(+), 17 deletions(-)
>
> diff --git a/cpukit/include/rtems/score/smpimpl.h
> b/cpukit/include/rtems/score/smpimpl.h
> index ef32687bec..2ffc047070 100644
> --- a/cpukit/include/rtems/score/smpimpl.h
> +++ b/cpukit/include/rtems/score/smpimpl.h
> @@ -166,12 +166,9 @@ RTEMS_NO_RETURN void
> _SMP_Start_multitasking_on_secondary_processor(
>   * @param[in, out] cpu_self is the processor control of the processor
> executing
>   *   this function.
>   *
> - * @return Returns the processed message.
> + * @param message is the message to process.
>   */
> -long unsigned _SMP_Process_message(
> -  Per_CPU_Control *cpu_self,
> -  long unsigned    message
> -);
> +void _SMP_Process_message( Per_CPU_Control *cpu_self, long unsigned
> message );
>
>  /**
>   * @brief Tries to process the current SMP message.
> @@ -200,10 +197,8 @@ void _SMP_Try_to_process_message(
>   *
>   * @param[in, out] cpu_self is the processor control of the processor
> executing
>   *   this function.
> - *
> - * @return Returns the processed message.
>   */
> -static inline long unsigned _SMP_Inter_processor_interrupt_handler(
> +static inline void _SMP_Inter_processor_interrupt_handler(
>    Per_CPU_Control *cpu_self
>  )
>  {
> @@ -222,10 +217,8 @@ static inline long unsigned
> _SMP_Inter_processor_interrupt_handler(
>    );
>
>    if ( RTEMS_PREDICT_FALSE( message != 0 ) ) {
> -    return _SMP_Process_message( cpu_self, message );
> +    _SMP_Process_message( cpu_self, message );
>    }
> -
> -  return message;
>  }
>
>  /**
> diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c
> index 7c068f3c51..75520829e1 100644
> --- a/cpukit/score/src/smp.c
> +++ b/cpukit/score/src/smp.c
> @@ -311,10 +311,7 @@ void _SMP_Request_shutdown( void )
>    }
>  }
>
> -long unsigned _SMP_Process_message(
> -  Per_CPU_Control *cpu_self,
> -  long unsigned    message
> -)
> +void _SMP_Process_message( Per_CPU_Control *cpu_self, long unsigned
> message )
>  {
>    if ( ( message & SMP_MESSAGE_SHUTDOWN ) != 0 ) {
>      ISR_Level level;
> @@ -332,8 +329,6 @@ long unsigned _SMP_Process_message(
>    if ( ( message & SMP_MESSAGE_PERFORM_JOBS ) != 0 ) {
>      _Per_CPU_Perform_jobs( cpu_self );
>    }
> -
> -  return message;
>  }
>
>  void _SMP_Try_to_process_message(
> --
> 2.35.3
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20230124/abd507d4/attachment.htm>


More information about the devel mailing list