Re: [PATCH 03/17] spi: cadence_qspi: Use APB write protection
Ralph Siemsen <[email protected]> Sat, 1 Aug 2026 18:57:14 -0400
| Newsgroups | gmane.comp.boot-loaders.u-boot |
|---|---|
| Message-ID | <CANp-EDZON_QjoF+Y_E099TNxY-DGMH+sZYVtHTwe3mX14C6meQ@mail.gmail.com> |
On Sat, Aug 1, 2026 at 11:33 AM Kumar, Udit <[email protected]> wrote: > > Could you share your compiler details > > My compiler reports warning (gcc version 11.3.1 20220712) > > ../drivers/spi/cadence_qspi_apb.c:334:13: warning: > ‘cadence_qspi_apb_write_protect_enable’ defined but not used > [-Wunused-function] > 334 | static void cadence_qspi_apb_write_protect_enable(void *reg_base) I'm using arm-none-eabi-gcc (15:13.2.rel1-2) 13.2.1 20231009. I would also expect a warning, but none appears. Even when I change the "caller" to if (0) cadence_qspi_apb_write_protect_disable(priv->regbase); there is no warning. However if I remove those two "caller" lines completely, then I get the warning: drivers/spi/cadence_qspi_apb.c:334:13: warning: 'cadence_qspi_apb_write_protect_disable' defined but not used [-Wunused-function] I'm compiling with CONFIG_CC_OPTIMIZE_FOR_SIZE and # CONFIG_OPTIMIZE_INLINING is not set (eg. the default values). Either way, I am happy to add back an #ifdef around the function definitions. Regards, Ralph