mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Colin King <colin.king@canonical.com>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	Len Brown <len.brown@intel.com>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI, PCI, irq: remove redundant check for null string pointer
Date: Fri, 08 Jan 2016 01:45:32 +0100	[thread overview]
Message-ID: <1690153.ze76fKGfdG@vostro.rjw.lan> (raw)
In-Reply-To: <1451991431-8342-1-git-send-email-colin.king@canonical.com>

On Tuesday, January 05, 2016 10:57:11 AM Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> source is decleared as a 4 byte char array in struct acpi_pci_routing_table
> so !prt->source is a redundant null string pointer check. Detected with
> smatch:
> 
> drivers/acpi/pci_irq.c:134 do_prt_fixups() warn: this array is probably
>   non-NULL. 'prt->source'
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied, thanks!

> ---
>  drivers/acpi/pci_irq.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
> index c933675..d30184c 100644
> --- a/drivers/acpi/pci_irq.c
> +++ b/drivers/acpi/pci_irq.c
> @@ -131,9 +131,6 @@ static void do_prt_fixups(struct acpi_prt_entry *entry,
>  		quirk = &prt_quirks[i];
>  
>  		/* All current quirks involve link devices, not GSIs */
> -		if (!prt->source)
> -			continue;
> -
>  		if (dmi_check_system(quirk->system) &&
>  		    entry->id.segment == quirk->segment &&
>  		    entry->id.bus == quirk->bus &&
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

      reply	other threads:[~2016-01-08  0:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 10:57 Colin King
2016-01-08  0:45 ` Rafael J. Wysocki [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=1690153.ze76fKGfdG@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=colin.king@canonical.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®