Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Alex Elder <elder@riscstar.com>
Cc: han.xu@nxp.com, broonie@kernel.org, dlan@gentoo.org,
	guodong@riscstar.com, linux-spi@vger.kernel.org,
	imx@lists.linux.dev, spacemit@lists.linux.dev,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/9] spi: fsl-qspi: switch predicates to bool
Date: Fri, 24 Oct 2025 17:24:14 -0400	[thread overview]
Message-ID: <aPvufqRVtkGMVdR+@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20251024191550.194946-5-elder@riscstar.com>

On Fri, Oct 24, 2025 at 02:15:44PM -0500, Alex Elder wrote:
> Change all the needs_*() functions so they are no longer inline, and return
> bool rather than int.
>
> Signed-off-by: Alex Elder <elder@riscstar.com>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>  drivers/spi/spi-fsl-qspi.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
> index 1e27647dd2a09..1944e63169d36 100644
> --- a/drivers/spi/spi-fsl-qspi.c
> +++ b/drivers/spi/spi-fsl-qspi.c
> @@ -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);
>  }
>
>  /*
> --
> 2.48.1
>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2025-10-24 21:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-24 19:15 [PATCH v3 0/9] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
2025-10-24 19:15 ` [PATCH v3 1/9] dt-bindings: spi: fsl-qspi: support SpacemiT K1 Alex Elder
2025-10-24 19:15 ` [PATCH v3 2/9] dt-bindings: spi: fsl-qspi: add optional resets Alex Elder
2025-10-24 21:23   ` Frank Li
2025-10-24 19:15 ` [PATCH v3 3/9] spi: fsl-qspi: add optional reset support Alex Elder
2025-10-24 19:15 ` [PATCH v3 4/9] spi: fsl-qspi: switch predicates to bool Alex Elder
2025-10-24 21:24   ` Frank Li [this message]
2025-10-24 19:15 ` [PATCH v3 5/9] spi: fsl-qspi: add a clock disable quirk Alex Elder
2025-10-24 21:25   ` Frank Li
2025-10-24 19:15 ` [PATCH v3 6/9] spi: fsl-qspi: introduce sfa_size devtype data Alex Elder
2025-10-24 19:15 ` [PATCH v3 7/9] spi: fsl-qspi: support the SpacemiT K1 SoC Alex Elder
2025-10-24 19:15 ` [PATCH v3 8/9] riscv: dts: spacemit: enable K1 SoC QSPI on BPI-F3 Alex Elder
2025-10-24 19:15 ` [PATCH v3 9/9] riscv: defconfig: enable SPI_FSL_QUADSPI as a module Alex Elder
2025-10-25  7:06   ` Paul Walmsley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aPvufqRVtkGMVdR+@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=broonie@kernel.org \
    --cc=dlan@gentoo.org \
    --cc=elder@riscstar.com \
    --cc=guodong@riscstar.com \
    --cc=han.xu@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=spacemit@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox