]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
spi: fsl-qspi: switch predicates to bool
authorAlex Elder <elder@riscstar.com>
Mon, 27 Oct 2025 13:30:02 +0000 (08:30 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 6 Nov 2025 16:57:33 +0000 (16:57 +0000)
Change all the needs_*() functions so they are no longer inline, and return
bool rather than int.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Alex Elder <elder@riscstar.com>
Link: https://patch.msgid.link/20251027133008.360237-5-elder@riscstar.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-qspi.c

index 1e27647dd2a092c540f5535cd83205a5e8e99ab1..1944e63169d36f0db7916f2546f6fe0b1295cc85 100644 (file)
@@ -276,34 +276,34 @@ struct fsl_qspi {
        u32 memmap_phy;
 };
 
-static inline int needs_swap_endian(struct fsl_qspi *q)
+static bool needs_swap_endian(struct fsl_qspi *q)
 {
-       return q->devtype_data->quirks & QUADSPI_QUIRK_SWAP_ENDIAN;
+       return !!(q->devtype_data->quirks & QUADSPI_QUIRK_SWAP_ENDIAN);
 }
 
-static inline int needs_4x_clock(struct fsl_qspi *q)
+static bool needs_4x_clock(struct fsl_qspi *q)
 {
-       return q->devtype_data->quirks & QUADSPI_QUIRK_4X_INT_CLK;
+       return !!(q->devtype_data->quirks & QUADSPI_QUIRK_4X_INT_CLK);
 }
 
-static inline int needs_fill_txfifo(struct fsl_qspi *q)
+static bool needs_fill_txfifo(struct fsl_qspi *q)
 {
-       return q->devtype_data->quirks & QUADSPI_QUIRK_TKT253890;
+       return !!(q->devtype_data->quirks & QUADSPI_QUIRK_TKT253890);
 }
 
-static inline int needs_wakeup_wait_mode(struct fsl_qspi *q)
+static bool needs_wakeup_wait_mode(struct fsl_qspi *q)
 {
-       return q->devtype_data->quirks & QUADSPI_QUIRK_TKT245618;
+       return !!(q->devtype_data->quirks & QUADSPI_QUIRK_TKT245618);
 }
 
-static inline int needs_amba_base_offset(struct fsl_qspi *q)
+static bool needs_amba_base_offset(struct fsl_qspi *q)
 {
        return !(q->devtype_data->quirks & QUADSPI_QUIRK_BASE_INTERNAL);
 }
 
-static inline int needs_tdh_setting(struct fsl_qspi *q)
+static bool needs_tdh_setting(struct fsl_qspi *q)
 {
-       return q->devtype_data->quirks & QUADSPI_QUIRK_USE_TDH_SETTING;
+       return !!(q->devtype_data->quirks & QUADSPI_QUIRK_USE_TDH_SETTING);
 }
 
 /*