linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] EDAC: sb_edac: remove null pointer check on array pci_tad
@ 2016-09-08  8:38 Colin King
  2016-09-09 12:50 ` Borislav Petkov
  2016-09-12 18:32 ` Borislav Petkov
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2016-09-08  8:38 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Doug Thompson, Borislav Petkov, linux-edac
  Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

pvt->pci_tad is a NUM_CHANNELS array of struct pci_dev pointers and
hence cannot be null, so the pull pointer check on pci_tad is
redundant.  Remove it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/edac/sb_edac.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index ce0067b..5477522 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -2474,7 +2474,7 @@ static int sbridge_mci_bind_devs(struct mem_ctl_info *mci,
 
 	/* Check if everything were registered */
 	if (!pvt->pci_sad0 || !pvt->pci_sad1 || !pvt->pci_ha0 ||
-	    !pvt-> pci_tad || !pvt->pci_ras  || !pvt->pci_ta)
+	    !pvt->pci_ras || !pvt->pci_ta)
 		goto enodev;
 
 	if (saw_chan_mask != 0x0f)
@@ -2563,8 +2563,7 @@ static int ibridge_mci_bind_devs(struct mem_ctl_info *mci,
 
 	/* Check if everything were registered */
 	if (!pvt->pci_sad0 || !pvt->pci_ha0 || !pvt->pci_br0 ||
-	    !pvt->pci_br1 || !pvt->pci_tad || !pvt->pci_ras  ||
-	    !pvt->pci_ta)
+	    !pvt->pci_br1 || !pvt->pci_ras || !pvt->pci_ta)
 		goto enodev;
 
 	if (saw_chan_mask != 0x0f && /* -EN */
-- 
2.9.3

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

* Re: [PATCH] EDAC: sb_edac: remove null pointer check on array pci_tad
  2016-09-08  8:38 [PATCH] EDAC: sb_edac: remove null pointer check on array pci_tad Colin King
@ 2016-09-09 12:50 ` Borislav Petkov
  2016-09-12 18:32 ` Borislav Petkov
  1 sibling, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2016-09-09 12:50 UTC (permalink / raw)
  To: Colin King, Tony Luck
  Cc: Mauro Carvalho Chehab, Doug Thompson, linux-edac, linux-kernel

+ Tony.

On Thu, Sep 08, 2016 at 09:38:01AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> pvt->pci_tad is a NUM_CHANNELS array of struct pci_dev pointers and
> hence cannot be null, so the pull pointer check on pci_tad is
> redundant.  Remove it.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/edac/sb_edac.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
> index ce0067b..5477522 100644
> --- a/drivers/edac/sb_edac.c
> +++ b/drivers/edac/sb_edac.c
> @@ -2474,7 +2474,7 @@ static int sbridge_mci_bind_devs(struct mem_ctl_info *mci,
>  
>  	/* Check if everything were registered */
>  	if (!pvt->pci_sad0 || !pvt->pci_sad1 || !pvt->pci_ha0 ||
> -	    !pvt-> pci_tad || !pvt->pci_ras  || !pvt->pci_ta)
> +	    !pvt->pci_ras || !pvt->pci_ta)
>  		goto enodev;
>  
>  	if (saw_chan_mask != 0x0f)
> @@ -2563,8 +2563,7 @@ static int ibridge_mci_bind_devs(struct mem_ctl_info *mci,
>  
>  	/* Check if everything were registered */
>  	if (!pvt->pci_sad0 || !pvt->pci_ha0 || !pvt->pci_br0 ||
> -	    !pvt->pci_br1 || !pvt->pci_tad || !pvt->pci_ras  ||
> -	    !pvt->pci_ta)
> +	    !pvt->pci_br1 || !pvt->pci_ras || !pvt->pci_ta)
>  		goto enodev;
>  
>  	if (saw_chan_mask != 0x0f && /* -EN */
> -- 
> 2.9.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-edac" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.

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

* Re: [PATCH] EDAC: sb_edac: remove null pointer check on array pci_tad
  2016-09-08  8:38 [PATCH] EDAC: sb_edac: remove null pointer check on array pci_tad Colin King
  2016-09-09 12:50 ` Borislav Petkov
@ 2016-09-12 18:32 ` Borislav Petkov
  1 sibling, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2016-09-12 18:32 UTC (permalink / raw)
  To: Colin King; +Cc: Mauro Carvalho Chehab, Doug Thompson, linux-edac, linux-kernel

On Thu, Sep 08, 2016 at 09:38:01AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> pvt->pci_tad is a NUM_CHANNELS array of struct pci_dev pointers and
> hence cannot be null, so the pull pointer check on pci_tad is
> redundant.  Remove it.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/edac/sb_edac.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.

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

end of thread, other threads:[~2016-09-12 18:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08  8:38 [PATCH] EDAC: sb_edac: remove null pointer check on array pci_tad Colin King
2016-09-09 12:50 ` Borislav Petkov
2016-09-12 18:32 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).