From patchwork Wed Sep 9 21:09:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 53340 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by patches.linaro.org (Postfix) with ESMTPS id 5151922B05 for ; Wed, 9 Sep 2015 21:10:26 +0000 (UTC) Received: by wicuu12 with SMTP id uu12sf367824wic.2 for ; Wed, 09 Sep 2015 14:10:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=6vKWxAdm6CilA4PvZ63AS4V6EN82nXnKKYtgpjpLd2A=; b=bNzii9FztIpvSgUGZGfUFMKyo/1dcw9mynjQt42u+BQrGRFRugt/HLsp4tTnczfK3V D8V0oSTB5iQ+I/xyUgEnhnoWvw2VZnKIeKM+JFNpxaMJimYK/7VzzRqnZQiGFhy3p8VM GH9nwk/VLhP4MtYgQMvhYLhtRmOF0FHFwAJoklrIUDCO7X5YYQynFAtdkhRIRFknEsuU dhDx41H72+n4DW6nXEcyWcQOjeSjetw9iv7tYec1xsJvhmAaPxZV6QWyTkvxOVl66Ql9 Ou4c5uyyr0AQWSyMukcktnCuxWTTiiDX4IIdss98AqWQXcQTrFg9yn/75kxR9vRiXMW/ DVTg== X-Gm-Message-State: ALoCoQkAYFt9/wBvvHat5RSHMKB+H/j9kbjvPSebSUXRKzjc64RzYvDT/e2gG/vBwbVy3fi4KHoo X-Received: by 10.112.167.201 with SMTP id zq9mr8763473lbb.2.1441833025661; Wed, 09 Sep 2015 14:10:25 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.66 with SMTP id x2ls59140laa.107.gmail; Wed, 09 Sep 2015 14:10:25 -0700 (PDT) X-Received: by 10.112.53.66 with SMTP id z2mr31242823lbo.121.1441833025483; Wed, 09 Sep 2015 14:10:25 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id as1si6626889lbc.94.2015.09.09.14.10.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Sep 2015 14:10:25 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbpo4 with SMTP id o4so12920720lbp.2 for ; Wed, 09 Sep 2015 14:10:25 -0700 (PDT) X-Received: by 10.112.77.10 with SMTP id o10mr31351438lbw.73.1441833025379; Wed, 09 Sep 2015 14:10:25 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.59.35 with SMTP id w3csp559579lbq; Wed, 9 Sep 2015 14:10:24 -0700 (PDT) X-Received: by 10.107.6.73 with SMTP id 70mr39275248iog.158.1441833013210; Wed, 09 Sep 2015 14:10:13 -0700 (PDT) Received: from mail-ig0-f177.google.com (mail-ig0-f177.google.com. [209.85.213.177]) by mx.google.com with ESMTPS id o9si3407104igj.38.2015.09.09.14.10.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Sep 2015 14:10:13 -0700 (PDT) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 209.85.213.177 as permitted sender) client-ip=209.85.213.177; Received: by igcrk20 with SMTP id rk20so878267igc.1 for ; Wed, 09 Sep 2015 14:10:12 -0700 (PDT) X-Received: by 10.50.2.39 with SMTP id 7mr52338647igr.86.1441833012791; Wed, 09 Sep 2015 14:10:12 -0700 (PDT) Received: from fidelio.ahs3.com (c-50-134-239-249.hsd1.co.comcast.net. [50.134.239.249]) by smtp.googlemail.com with ESMTPSA id n188sm5503348ion.27.2015.09.09.14.10.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Sep 2015 14:10:11 -0700 (PDT) From: Al Stone To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-pm@vger.kernel.org, linaro-acpi@lists.linaro.org, linaro-kernel@lists.linaro.org, patches@linaro.org, Al Stone , "Rafael J. Wysocki" , Len Brown , Pavel Machek , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org Subject: [PATCH v3 4/5] ACPI / X86: remove usage of BAD_MADT_ENTRY Date: Wed, 9 Sep 2015 15:09:50 -0600 Message-Id: <1441832991-28200-5-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1441832991-28200-1-git-send-email-al.stone@linaro.org> References: <1441832991-28200-1-git-send-email-al.stone@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: al.stone@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Now that we have introduced the bad_madt_entry() function, and that function is being invoked in acpi_table_parse_madt() for us, there is no longer any need to use the BAD_MADT_ENTRY macro. Signed-off-by: Al Stone Cc: Rafael J. Wysocki Cc: Len Brown Cc: Pavel Machek Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: x86@kernel.org --- arch/x86/kernel/acpi/boot.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index ded848c..d37b84d 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -194,9 +194,6 @@ acpi_parse_x2apic(struct acpi_subtable_header *header, const unsigned long end) processor = (struct acpi_madt_local_x2apic *)header; - if (BAD_MADT_ENTRY(processor, end)) - return -EINVAL; - acpi_table_print_madt_entry(header); apic_id = processor->local_apic_id; @@ -227,9 +224,6 @@ acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end) processor = (struct acpi_madt_local_apic *)header; - if (BAD_MADT_ENTRY(processor, end)) - return -EINVAL; - acpi_table_print_madt_entry(header); /* @@ -252,9 +246,6 @@ acpi_parse_sapic(struct acpi_subtable_header *header, const unsigned long end) processor = (struct acpi_madt_local_sapic *)header; - if (BAD_MADT_ENTRY(processor, end)) - return -EINVAL; - acpi_table_print_madt_entry(header); acpi_register_lapic((processor->id << 8) | processor->eid,/* APIC ID */ @@ -271,9 +262,6 @@ acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header, lapic_addr_ovr = (struct acpi_madt_local_apic_override *)header; - if (BAD_MADT_ENTRY(lapic_addr_ovr, end)) - return -EINVAL; - acpi_lapic_addr = lapic_addr_ovr->address; return 0; @@ -287,9 +275,6 @@ acpi_parse_x2apic_nmi(struct acpi_subtable_header *header, x2apic_nmi = (struct acpi_madt_local_x2apic_nmi *)header; - if (BAD_MADT_ENTRY(x2apic_nmi, end)) - return -EINVAL; - acpi_table_print_madt_entry(header); if (x2apic_nmi->lint != 1) @@ -305,9 +290,6 @@ acpi_parse_lapic_nmi(struct acpi_subtable_header * header, const unsigned long e lapic_nmi = (struct acpi_madt_local_apic_nmi *)header; - if (BAD_MADT_ENTRY(lapic_nmi, end)) - return -EINVAL; - acpi_table_print_madt_entry(header); if (lapic_nmi->lint != 1) @@ -411,9 +393,6 @@ acpi_parse_ioapic(struct acpi_subtable_header * header, const unsigned long end) ioapic = (struct acpi_madt_io_apic *)header; - if (BAD_MADT_ENTRY(ioapic, end)) - return -EINVAL; - acpi_table_print_madt_entry(header); /* Statically assign IRQ numbers for IOAPICs hosting legacy IRQs */ @@ -463,9 +442,6 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header, intsrc = (struct acpi_madt_interrupt_override *)header; - if (BAD_MADT_ENTRY(intsrc, end)) - return -EINVAL; - acpi_table_print_madt_entry(header); if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) { @@ -504,9 +480,6 @@ acpi_parse_nmi_src(struct acpi_subtable_header * header, const unsigned long end nmi_src = (struct acpi_madt_nmi_source *)header; - if (BAD_MADT_ENTRY(nmi_src, end)) - return -EINVAL; - acpi_table_print_madt_entry(header); /* TBD: Support nimsrc entries? */