All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] staging: mt7621-pci: remove comparison to null to fix checkpatch warning
@ 2019-04-01 23:18 Jules Irenge
  2019-04-02  5:57 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Jules Irenge @ 2019-04-01 23:18 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

remove comparison to null to fix warning
reported by checkpatch.pl tool
"CHECK: Comparison to NULL could be written "res""

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 drivers/staging/mt7621-pci/pci-mt7621.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
index 379ae780c691..03d919a94552 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -275,7 +275,7 @@ static int mt7621_pci_parse_request_of_pci_ranges(struct mt7621_pcie *pcie)
 			break;
 		}
 
-		if (res != NULL)
+		if (res)
 			of_pci_range_to_resource(&range, node, res);
 	}
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] staging: mt7621-pci: remove comparison to null to fix checkpatch warning
  2019-04-01 23:18 [PATCH v1] staging: mt7621-pci: remove comparison to null to fix checkpatch warning Jules Irenge
@ 2019-04-02  5:57 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2019-04-02  5:57 UTC (permalink / raw)
  To: Jules Irenge; +Cc: outreachy-kernel

On Tue, Apr 02, 2019 at 12:18:43AM +0100, Jules Irenge wrote:
> remove comparison to null to fix warning
> reported by checkpatch.pl tool
> "CHECK: Comparison to NULL could be written "res""
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
> ---
>  drivers/staging/mt7621-pci/pci-mt7621.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
> index 379ae780c691..03d919a94552 100644
> --- a/drivers/staging/mt7621-pci/pci-mt7621.c
> +++ b/drivers/staging/mt7621-pci/pci-mt7621.c
> @@ -275,7 +275,7 @@ static int mt7621_pci_parse_request_of_pci_ranges(struct mt7621_pcie *pcie)
>  			break;
>  		}
>  
> -		if (res != NULL)
> +		if (res)
>  			of_pci_range_to_resource(&range, node, res);
>  	}
>  

This patch does not apply to my staging-testing branch at all :(


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-02  5:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-01 23:18 [PATCH v1] staging: mt7621-pci: remove comparison to null to fix checkpatch warning Jules Irenge
2019-04-02  5:57 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.