[RFC,12/35] r8169: Tidy Success/Failure checks
diff mbox series

Message ID 20200713122247.10985-13-refactormyself@gmail.com
State Changes Requested
Headers show
Series
  • [RFC,01/35] xen-pciback: Change PCIBIOS_SUCCESSFUL to 0
Related show

Commit Message

Saheed Bolarinwa July 13, 2020, 12:22 p.m. UTC
Remove unnecessary check for 0.

Signed-off-by: "Saheed O. Bolarinwa" <refactormyself@gmail.com>
---
This patch depends on PATCH 11/35

 drivers/net/ethernet/realtek/r8169_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Saheed Bolarinwa July 13, 2020, 1:09 p.m. UTC | #1
Thank you for the review.

On 7/13/20 3:45 PM, Heiner Kallweit wrote:
>
> Patches 11 and 12 are both trivial, wouldn't it make sense to merge them?
> Apart from that: Acked-by: Heiner Kallweit <hkallweit1@gmail.com>

I separated them for easy review, I will merge them in the next version.

- Saheed
Heiner Kallweit July 13, 2020, 1:45 p.m. UTC | #2
On 13.07.2020 14:22, Saheed O. Bolarinwa wrote:
> Remove unnecessary check for 0.
> 
> Signed-off-by: "Saheed O. Bolarinwa" <refactormyself@gmail.com>
> ---
> This patch depends on PATCH 11/35
> 
>  drivers/net/ethernet/realtek/r8169_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index 206dac958cb2..79edbc0c4476 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -2656,7 +2656,7 @@ static void rtl_csi_access_enable(struct rtl8169_private *tp, u8 val)
>  	 * first and if it fails fall back to CSI.
>  	 */
>  	if (pdev->cfg_size > 0x070f &&
> -	    pci_write_config_byte(pdev, 0x070f, val) == 0)
> +	    !pci_write_config_byte(pdev, 0x070f, val))
>  		return;
>  
>  	netdev_notice_once(tp->dev,
> 
Patches 11 and 12 are both trivial, wouldn't it make sense to merge them?
Apart from that: Acked-by: Heiner Kallweit <hkallweit1@gmail.com>

Patch
diff mbox series

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 206dac958cb2..79edbc0c4476 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2656,7 +2656,7 @@  static void rtl_csi_access_enable(struct rtl8169_private *tp, u8 val)
 	 * first and if it fails fall back to CSI.
 	 */
 	if (pdev->cfg_size > 0x070f &&
-	    pci_write_config_byte(pdev, 0x070f, val) == 0)
+	    !pci_write_config_byte(pdev, 0x070f, val))
 		return;
 
 	netdev_notice_once(tp->dev,