Skip to content

arch/xtensa/espressif: Include nuttx/kmalloc.h in esp_temperature_sensor.c. - #20678

Merged
xiaoxiang781216 merged 2 commits into
apache:masterfrom
casaroli:xtensa-esptemp-kmalloc
Oct 15, 2026
Merged

xiaoxiang781216 merged 2 commits into
apache:masterfrom
casaroli:xtensa-esptemp-kmalloc

Conversation

@casaroli

@casaroli casaroli commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

depends-on: apache/nuttx-apps/pull/3850

Summary

esp_temperature_sensor_initialize() calls kmm_free(), but arch/xtensa/src/common/espressif/esp_temperature_sensor.c does not include nuttx/kmalloc.h. The declaration used to come in through stdio.h, which no longer includes it (#20565), so esp32s3-ws-lcd128:imu-qmi8658 fails to build:

common/espressif/esp_temperature_sensor.c:871:7: error: implicit declaration of function 'kmm_free' [-Wimplicit-function-declaration]

This stops the xtensa-03 CI job (found on apache/nuttx-apps#3850). The risc-v copy of the file already includes nuttx/kmalloc.h.

Two commits:

  • Fix the old nxstyle error in the file (one line indented by eight spaces instead of six), so that checkpatch passes.
  • Include nuttx/kmalloc.h.

Impact

Build fix only. No change in behaviour.

Testing

esp32s3-ws-lcd128:imu-qmi8658 with xtensa-esp-elf 14.2.0, -Werror, apps master 467e22088 + apache/nuttx-apps#3850:

  • master b3418f0: fails with the error above.
  • with this PR: builds.

tools/checkpatch.sh -c -u -m -g passes.

…r.c.

Indent esp_temperature_sensor_disable() by six spaces, as the rest of
the block.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
…sor.c.

esp_temperature_sensor_initialize() calls kmm_free(), but the file does
not include nuttx/kmalloc.h.  It used to come in through stdio.h, which
no longer includes it, so esp32s3-ws-lcd128:imu-qmi8658 fails to build:

  esp_temperature_sensor.c:871:7: error: implicit declaration of
  function 'kmm_free'

Include nuttx/kmalloc.h, as the risc-v copy of the file does.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
@github-actions github-actions Bot added Arch: xtensa Issues related to the Xtensa architecture Size: XS The size of the change in this PR is very small labels Oct 15, 2026
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@xiaoxiang781216
xiaoxiang781216 merged commit 5d8c744 into apache:master Oct 15, 2026
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: xtensa Issues related to the Xtensa architecture Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants