Skip to content

Conversation

PascalReich
Copy link
Contributor

Remove Unused Code and Preprocessor Directives in RP2040 Port

Description

#if ( configNUMBER_OF_CORES == 1 )
// some code
#else // implicitly configNUMBER_OF_CORES != 1 
    #if ( configNUMBER_OF_CORES != 1 )
        // always selected
    #else 
        // never selected (redundant/unnecessary)
    #endif
#endif
  • In this case, the entire second set of preprocessor directives can be removed, with the always selected code staying and the redundant code also being deleted.
  • Most of this was done for inline assembly code, in total for 4 instances total.
  • Open to any feedback

Test Steps

N/A

Checklist:

  • I have run limited compilation tests locally, tbh unsure of how to run the full test suite but happy to do so.
  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

None

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@PascalReich PascalReich marked this pull request as ready for review September 30, 2025 04:55
@aggarg
Copy link
Member

aggarg commented Sep 30, 2025

@kilograham Would you please take a quick look? Thanks.

Copy link

sonarqubecloud bot commented Oct 8, 2025

@aggarg aggarg merged commit e5987bb into FreeRTOS:main Oct 8, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants