Sarthak-Pandey opened a new pull request, #20645: URL: https://github.com/apache/nuttx/pull/20645
## Summary Resolves #17249. The `callbackenable` function prototype and access macro in `include/nuttx/sdio.h` existed outside the `#if defined(CONFIG_SCHED_WORKQUEUE) && defined(CONFIG_SCHED_HPWORK)` guards, whereas `registercallback` was guarded. Because SDIO media change callbacks require the high-priority work queue (`HPWORK`) to be registered and scheduled, enabling callbacks without work queue support enables nothing and leaves an unnecessary function pointer in `struct sdio_dev_s`. This PR: 1. Guards `callbackenable` inside `struct sdio_dev_s` under `CONFIG_SCHED_WORKQUEUE && CONFIG_SCHED_HPWORK`. 2. Defines `SDIO_CALLBACKENABLE(dev, eventset)` as a no-op `((void)0)` when HPWORK is disabled to prevent compile errors in upper-half drivers (`drivers/mmcsd/mmcsd_sdio.c`). 3. Synchronizes `callbackenable` prototypes, ops tables, and implementations with HPWORK guards in `arch/arm/src/stm32l4/stm32l4_sdmmc.c` and `arch/arm64/src/bcm2711/bcm2711_sdio.c`. ## Impact - **Is new feature added?** No (Bug fix / Cleanup). - **Impact on user:** None. - **Impact on build:** Zero build breakage; upper-half driver safely no-ops callback enablement when HPWORK is disabled. - **Impact on hardware:** Saves 4 bytes (32-bit) / 8 bytes (64-bit) in `struct sdio_dev_s` when work queues are disabled. ## Testing - Verified coding style with `tools/nxstyle`. - Clean compilation and no-op expansion on non-HPWORK configurations. Fixes: #17249 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
