diff mbox series

[v5,3/4] ata: libata: Change ata_dev_knobble() to return a bool

Message ID 20240724054539.182655-4-dlemoal@kernel.org
State New
Headers show
Series Some cleanup, renaming and horkage improvements | expand

Commit Message

Damien Le Moal July 24, 2024, 5:45 a.m. UTC
Change the function ata_dev_knobble() to return a boolean instead of a
u8.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
 drivers/ata/libata-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Igor Pylypiv July 24, 2024, 5:34 p.m. UTC | #1
On Wed, Jul 24, 2024 at 02:45:38PM +0900, Damien Le Moal wrote:
> Change the function ata_dev_knobble() to return a boolean instead of a
> u8.
> 
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>

Reviewed-by: Igor Pylypiv <ipylypiv@google.com>

Thanks,
Igor
> ---
>  drivers/ata/libata-core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 272770f09609..4ef1d14aba1e 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -2219,12 +2219,12 @@ static int ata_do_link_spd_horkage(struct ata_device *dev)
>  	return 0;
>  }
>  
> -static inline u8 ata_dev_knobble(struct ata_device *dev)
> +static inline bool ata_dev_knobble(struct ata_device *dev)
>  {
>  	struct ata_port *ap = dev->link->ap;
>  
>  	if (ata_dev_horkage(dev) & ATA_HORKAGE_BRIDGE_OK)
> -		return 0;
> +		return false;
>  
>  	return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id)));
>  }
> -- 
> 2.45.2
> 
>
Niklas Cassel July 25, 2024, 4:43 p.m. UTC | #2
On Wed, Jul 24, 2024 at 02:45:38PM +0900, Damien Le Moal wrote:
> Change the function ata_dev_knobble() to return a boolean instead of a
> u8.
> 
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
>  drivers/ata/libata-core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 272770f09609..4ef1d14aba1e 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -2219,12 +2219,12 @@ static int ata_do_link_spd_horkage(struct ata_device *dev)
>  	return 0;
>  }
>  
> -static inline u8 ata_dev_knobble(struct ata_device *dev)
> +static inline bool ata_dev_knobble(struct ata_device *dev)
>  {
>  	struct ata_port *ap = dev->link->ap;
>  
>  	if (ata_dev_horkage(dev) & ATA_HORKAGE_BRIDGE_OK)
> -		return 0;
> +		return false;
>  
>  	return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id)));
>  }
> -- 
> 2.45.2
> 

Reviewed-by: Niklas Cassel <cassel@kernel.org>
diff mbox series

Patch

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 272770f09609..4ef1d14aba1e 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2219,12 +2219,12 @@  static int ata_do_link_spd_horkage(struct ata_device *dev)
 	return 0;
 }
 
-static inline u8 ata_dev_knobble(struct ata_device *dev)
+static inline bool ata_dev_knobble(struct ata_device *dev)
 {
 	struct ata_port *ap = dev->link->ap;
 
 	if (ata_dev_horkage(dev) & ATA_HORKAGE_BRIDGE_OK)
-		return 0;
+		return false;
 
 	return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id)));
 }