Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1301439 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2016-01-05 12:00 +0100 |
| Last post | 2016-01-08 01:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ACPI, PCI, irq: remove redundant check for null string pointer Colin King <colin.king@canonical.com> - 2016-01-05 12:00 +0100
Re: [PATCH] ACPI, PCI, irq: remove redundant check for null string pointer "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-01-08 01:20 +0100
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2016-01-05 12:00 +0100 |
| Subject | [PATCH] ACPI, PCI, irq: remove redundant check for null string pointer |
| Message-ID | <qNxvm-Wb-53@gated-at.bofh.it> |
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> --- 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 && -- 2.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2016-01-08 01:20 +0100 |
| Message-ID | <qOsWD-7b8-19@gated-at.bofh.it> |
| In reply to | #1301439 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web