chore(targets): remove orphaned SDCARD_DMA_CHANNEL define - #1424
Conversation
PR#1420 (sdcard.c SPI-mode migration to spiSequence()/extDevice_t) removed sdcardConfig_t.dmaChannel and both of its consumers (drivers/sdcard.c, pg/sdcard.c). The per-target SDCARD_DMA_CHANNEL define that fed that field has had zero readers anywhere in src/main/ since PR#1420 merged. Confirmed via exhaustive grep across src/main/drivers, src/main/pg, src/main/interface, src/main/fc, src/main/msc: no file references the bare SDCARD_DMA_CHANNEL token. SDCARD_DMA_CHANNEL_TX (a distinct macro, still read by pg/sdcard.c to compute dmaIdentifier for the independent SDIO driver) is untouched -- confirmed present and unchanged in all 51 files that define it. Removes the define (active, commented-out, and the "//notice - NEED..." placeholder variants alike) from all 66 affected target.h files. Since the macro token is never referenced by any compiled source, this is a no-op for every affected build by construction -- the C preprocessor cannot emit different code for a #define nothing ever expands. Closes emuflight#1421.
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation The PR addresses the main objective in [ Resolution Restrict the changes to removing the obsolete SDCARD_DMA_CHANNEL definitions and placeholder comments from all 66 target.h files. Revert unrelated SDIO configuration changes and preserve existing SDCARD_DMA_CHANNEL_TX definitions unchanged. Re-run the target compile sweep and representative before/after comparisons. Full details: Out of Scope Changes checkExplanation Most changes match [ Resolution Remove or revert all changes unrelated to deleting SDCARD_DMA_CHANNEL. In particular, restore existing SDIO configuration and SDCARD_DMA_CHANNEL_TX lines unless they were already present before the PR. Keep the final diff deletion-only for the obsolete macro and its placeholder comments. Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
AI Generated pull-request
Summary
Closes #1421.
sdcardConfig_t.dmaChanneland both of its consumers were removed in PR #1420(sdcard.c SPI-mode migration to
spiSequence()/extDevice_t), orphaning the per-targetSDCARD_DMA_CHANNELdefine — it has had zero readers anywhere insrc/main/since.src/main/drivers,src/main/pg,src/main/interface,src/main/fc,src/main/msc: no file references the bareSDCARD_DMA_CHANNELtoken.SDCARD_DMA_CHANNEL_TX(a distinct macro, still read bypg/sdcard.cto computedmaIdentifierfor the independent SDIO driver) is untouched — confirmed present andunchanged in all 51 files that define it.
//notice - NEED: ...placeholdervariants alike — from all 66 affected
target.hfiles.across F4/F7/H7 (KAKUTEF7, KAKUTEF7HDV, HAKRCH743) both before and after this change (same
commit each side, isolating the comparison from the compiled-in build-timestamp/git-SHA
strings that otherwise differ between any two separate builds). Diffed the resulting
.hexfiles: the only bytes that differ anywhere in the ~1.1MB firmware image are the embedded git
short-SHA and compile-time strings — nothing else, for any of the three sampled MCU families.
DARWINF411) whose deleted comment described a real historical DMAcontention concern (
SPI2_TXsharingDMA1_Stream4with a motor channel):fc_init.c:667-668places
spiInitBusDMA()deliberately after every otherdmaInit()caller, so the genericper-bus SPI DMA claim this migration relies on can only ever take DMA streams not already
claimed by a higher-priority peripheral (motors, gyro, etc.) — it cannot steal an
already-claimed stream. No regression risk to that board's motor output.
Test plan
SDCARD_DMA_CHANNEL) —66/66 succeeded, 0 failed
.hexcomparison on 3 representative targets (F4/F7/H7 families) —zero non-metadata differences
make clean_test && make testunaffected (target-file-only change, no driver code touched)Summary by CodeRabbit
Bug Fixes
Chores