Skip to contentSkip to conversation

void __iomem *addr should be const

DISCUSSION Hugo Lefeuvre 2 participants 3 messages Feb 10, 2019 – Feb 16, 2019 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

Hi,

__iomem *addr seems to lack a const qualifier in the ioread* definitions from include/asm-generic/iomap.h (other definitions such as asm-generic/io.h do have the const).

This issue was briefly discussed a while ago[0] but the outcome is not quite clear to me. Should I submit a patch addressing this issue or is it a definitive wontfix?

This issue triggers warnings in my current work but I would like to avoid dropping the const if possible.

regards,
Hugo

[0] https://patchwork.kernel.org/patch/5742881/

Signature · 3 lines
                Hugo Lefeuvre (hle)    |    www.owl.eu.com
RSA4096_ 360B 03B3 BF27 4F4D 7A3F D5E8 14AA 1EB8 A247 3DFD
ed25519_ 37B2 6D38 0B25 B8A2 6B9F 3A65 A36F 5357 5F2D DC4C
#1 lore raw
Quoted 10 lines · Hugo Lefeuvre

__iomem *addr seems to lack a const qualifier in the ioread* definitions from include/asm-generic/iomap.h (other definitions such as asm-generic/io.h do have the const).

This issue was briefly discussed a while ago[0] but the outcome is not quite clear to me. Should I submit a patch addressing this issue or is it a definitive wontfix?

This issue triggers warnings in my current work but I would like to avoid dropping the const if possible.

The const makes perfectly sense and we should have consistent state all over the place.

Thanks,

tglx

#2 lore raw

Hi,

Quoted 2 lines

The const makes perfectly sense and we should have consistent state all over the place.

Thanks, I will submit a patch addressing this issue soon.

regards,
Hugo

Signature · 3 lines
                Hugo Lefeuvre (hle)    |    www.owl.eu.com
RSA4096_ 360B 03B3 BF27 4F4D 7A3F D5E8 14AA 1EB8 A247 3DFD
ed25519_ 37B2 6D38 0B25 B8A2 6B9F 3A65 A36F 5357 5F2D DC4C