diff options
| author | Marek BehĂșn <[email protected]> | 2022-04-07 00:33:04 +0200 |
|---|---|---|
| committer | Ramon Fried <[email protected]> | 2022-04-10 08:44:13 +0300 |
| commit | c677fb1e3196e1be1fcbbdb04650eed262708317 (patch) | |
| tree | 533645f460f73b67a9444c2325083ed35bd6b1dc /scripts/const_structs.checkpatch | |
| parent | ffb0f6f488b9eee2822c3c691778a26e1590694c (diff) | |
phy: Move PHY_INTERFACE_MODE_NA to the beginning of the enum definition
Move PHY_INTERFACE_MODE_NA to the beginning of the enum definition to
make it have zero value. This makes it possible (although not
encouraged) to test for invalid/nonexistent interface mode with !val
instead of val == PHY_INTERFACE_MODE_NA.
The comment near the definition says "Must be last", because when the
constant was introduced in commit 5f184715ecd3 ("Create PHY Lib for
U-Boot"), it was used as the maximum value when interating over the
constants. But this is no longer true - we use PHY_INTERFACE_MODE_MAX
for that now, and so we can move it.
Signed-off-by: Marek BehĂșn <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions
