Hi Jacopo, On Mon, May 1, 2017 at 4:37 PM, jmondi <jacopo@xxxxxxxxxx> wrote: >> > + struct sh_ceu_fmt **active_fmts; >> > + struct sh_ceu_fmt *current_fmt; >> >> These two should be const. >> > > Why both of them? I understand the list of active formats is built > during driver initilization, but the "current_fmt" is set during > "set_fmt" and can change at run time, right? I guess Laurent meant: const struct sh_ceu_fmt *current_fmt; This means the current_fmt pointer is not const, and thus can be changed, while the data pointed to is const, and cannot be changed (through this pointer). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds