[U-Boot] [PATCH] arm: zynq: Remove double const qualifier
Alex Sadovsky
nable.maininbox at googlemail.com
Tue Nov 21 08:34:11 UTC 2017
Hi Michal,
I'm sorry to disturb you and others but it looks like you've removed a
bit too much. There are two different types of usage of the "const"
modifier in the areas that are touched by your patch:
1) for function prototypes/implementation - "const" before the
function name is senseless, function bodies are always immutable in C
and compiler is issuing a warning about such lines
2) for variables (pointers) - it makes sense as these two "const"
keywords have different meaning: the first one means that the
referenced data cannot be modified via this pointer and the second one
means that the pointer itself is constant too. Compiler shouldn't
complain about lines like this one:
const fpga_desc * const desc = fpga_get_desc(devnum);
Cheers, Alex.
More information about the U-Boot
mailing list