From: Bjorn Helgaas <helgaas@kernel.org>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org, Julia Lawall <julia.lawall@lip6.fr>,
Fengguang Wu <fengguang.wu@intel.com>,
Geliang Tang <geliangtang@163.com>
Subject: Re: [PATCH] PCI: ibmphp: Remove unneeded NULL test
Date: Mon, 11 Jan 2016 08:42:14 -0600 [thread overview]
Message-ID: <20160111144214.GA25540@localhost> (raw)
In-Reply-To: <20160111143157.25347.46282.stgit@bhelgaas-glaptop2.roam.corp.google.com>
On Mon, Jan 11, 2016 at 08:31:57AM -0600, Bjorn Helgaas wrote:
> From: Julia Lawall <julia.lawall@lip6.fr>
>
> Remove unneeded NULL test. The index variable of list_for_each_entry is
> never NULL, as it is the structure that contains the list pointer.
>
> Generated by: scripts/coccinelle/iterators/itnull.cocci
>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> CC: Geliang Tang <geliangtang@163.com>
I applied this to pci/hotplug and plan to include it for v4.5. I'm just
resending it so it's on the linux-pci list.
> ---
> drivers/pci/hotplug/ibmphp_core.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
> index 010e46a..49adf22 100644
> --- a/drivers/pci/hotplug/ibmphp_core.c
> +++ b/drivers/pci/hotplug/ibmphp_core.c
> @@ -503,9 +503,6 @@ static int __init init_ops(void)
> int rc;
>
> list_for_each_entry(slot_cur, &ibmphp_slot_head, ibm_slot_list) {
> - if (!slot_cur)
> - return -ENODEV;
> -
> debug("BEFORE GETTING SLOT STATUS, slot # %x\n",
> slot_cur->number);
> if (slot_cur->ctrl->revision == 0xFF)
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2016-01-11 14:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 14:31 [PATCH] PCI: ibmphp: Remove unneeded NULL test Bjorn Helgaas
2016-01-11 14:42 ` Bjorn Helgaas [this message]
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=20160111144214.GA25540@localhost \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=fengguang.wu@intel.com \
--cc=geliangtang@163.com \
--cc=julia.lawall@lip6.fr \
--cc=linux-pci@vger.kernel.org \
/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 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.