From patchwork Wed Sep 16 23:26:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 53764 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id EFF0322DB2 for ; Wed, 16 Sep 2015 23:27:11 +0000 (UTC) Received: by lanb10 with SMTP id b10sf406651lan.3 for ; Wed, 16 Sep 2015 16:27:10 -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=i3GfGVCZDLLTa0V/QNEG6HckVkLZCoyiQncPgoqpb879Euwm7ofW+9xK3kH8v4TitI QRuuZZ1D0wyFItfIaw6RrNukqMrAhABhcH2m/eS+XqvPc3ZBo1Odem2FxhE3Za0ANcPW GIP7QmII0keHFG9OsTYpt2+F/qlypt8qPpS8fnW5aBOzKWrdxV2N3ZXv+RFN7BKXYJQq wa/USwhyEHp3zEhySJxmzTYC4p8Rfxy4VWiOmuDsziqLKiXPSnqfFZRd5o1gM81vhMNF 7AxkjZt0IfHhXsMNVLDqjpF5Ebh/A7pylKJ1/acXPgMleHkuwmhfxMgJnmEYGPYPFnmX Pr4A== X-Gm-Message-State: ALoCoQl8a//aBGEkzmgA/EZ0u2VsPnomKsvU/JNNI1ZuOl+HcmX7gmpolriK2Vb4l3uJZTYPlsrc X-Received: by 10.194.59.166 with SMTP id a6mr5971771wjr.6.1442446030824; Wed, 16 Sep 2015 16:27:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.164 with SMTP id t4ls9697lat.84.gmail; Wed, 16 Sep 2015 16:27:10 -0700 (PDT) X-Received: by 10.152.204.39 with SMTP id kv7mr33148066lac.31.1442446030656; Wed, 16 Sep 2015 16:27:10 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id ja2si147885lbc.7.2015.09.16.16.27.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2015 16:27:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by lanb10 with SMTP id b10so844465lan.3 for ; Wed, 16 Sep 2015 16:27:10 -0700 (PDT) X-Received: by 10.112.135.9 with SMTP id po9mr27847612lbb.56.1442446030548; Wed, 16 Sep 2015 16:27:10 -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 w3csp2745358lbq; Wed, 16 Sep 2015 16:27:09 -0700 (PDT) X-Received: by 10.107.6.65 with SMTP id 62mr1155209iog.147.1442446025656; Wed, 16 Sep 2015 16:27:05 -0700 (PDT) Received: from mail-ig0-f174.google.com (mail-ig0-f174.google.com. [209.85.213.174]) by mx.google.com with ESMTPS id c13si99307igo.41.2015.09.16.16.27.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2015 16:27:05 -0700 (PDT) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 209.85.213.174 as permitted sender) client-ip=209.85.213.174; Received: by igxx6 with SMTP id x6so2856864igx.1 for ; Wed, 16 Sep 2015 16:27:05 -0700 (PDT) X-Received: by 10.50.111.83 with SMTP id ig19mr1104535igb.82.1442446025357; Wed, 16 Sep 2015 16:27:05 -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 ht6sm2983562igb.11.2015.09.16.16.27.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2015 16:27:04 -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 v4 4/5] ACPI / X86: remove usage of BAD_MADT_ENTRY Date: Wed, 16 Sep 2015 17:26:44 -0600 Message-Id: <1442446005-19799-5-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1442446005-19799-1-git-send-email-al.stone@linaro.org> References: <1442446005-19799-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.215.42 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? */