Skip to content

Commit

Permalink
cpu/cortexm_common: Make cpu.h IWYU clean
Browse files Browse the repository at this point in the history
There is clearly no reason `cpu.h` should `#include <stdio.h>`.

Also add an export pragma to `cpu_conf.h`, as portable code is
expected to include `cpu.h` (which exists across MCU families in RIOT),
and not `cpu_conf.h` (which only exists for some MCU families).
  • Loading branch information
maribu committed Nov 27, 2024
1 parent 0dfd839 commit 52e1d02
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cpu/cortexm_common/include/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@
#ifndef CPU_H
#define CPU_H

#include <stdio.h>

#include "irq.h"
#include "sched.h"
#include "thread.h"
#include "cpu_conf.h"
#include "cpu_conf.h" /* IWYU pragma: export */

#ifdef __cplusplus
extern "C" {
Expand Down

0 comments on commit 52e1d02

Please sign in to comment.