From patchwork Thu Aug 6 20:59:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 52016 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 28E0620539 for ; Thu, 6 Aug 2015 21:00:07 +0000 (UTC) Received: by lbbyj8 with SMTP id yj8sf27562760lbb.3 for ; Thu, 06 Aug 2015 14:00:06 -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=FlDz0xTtXRfdYX3oX8etOLY5NAWiuZ9FbnZkuUI3vFU=; b=m/8/+3Wz3IIOBlONmlht6+bbQQ+5LZ56O7g5S3+x9ItFF00W1+0dBMWeSoWUrAAA4N H7Xs+rcVaVHmhBFjG/memZ4Vk8Gak3vhDOghueF2lYk5ClGM7AuDLIGQn0DqvY997LlJ fwUGdk391jkaAY01V5WOosVRxwC3FTg8+vvevzvvFsZSwuZEzMivFbv9sn10iIP6x2Wc it/qiNqAx2+IW9Q9Px3rT+XmyyUmk34wN/tUQNLhCsqUCoj7ytJD3ENO9ieSKg5O0h3q O8G1XbOq5oOCNMSxxZOOyx2aY7zFOXOA/J/Jh3VRPEkV5uibOTM5gnhs1KYh/7iI8lw9 EFWg== X-Gm-Message-State: ALoCoQnXKvrFDxjVvok1Mx1eip9fbZZ6WdWoeFjC5uBYYBxG7bm05evJPRUbc6X2+Ln/V9JsxNIy X-Received: by 10.180.79.66 with SMTP id h2mr165609wix.3.1438894806210; Thu, 06 Aug 2015 14:00:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.40 with SMTP id kz8ls396403lab.24.gmail; Thu, 06 Aug 2015 14:00:06 -0700 (PDT) X-Received: by 10.112.91.196 with SMTP id cg4mr4372686lbb.10.1438894806041; Thu, 06 Aug 2015 14:00:06 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id m1si5822438lag.129.2015.08.06.14.00.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Aug 2015 14:00:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbbyj8 with SMTP id yj8so49962119lbb.0 for ; Thu, 06 Aug 2015 14:00:05 -0700 (PDT) X-Received: by 10.152.121.4 with SMTP id lg4mr4261865lab.112.1438894805758; Thu, 06 Aug 2015 14:00:05 -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.7.198 with SMTP id l6csp1158328lba; Thu, 6 Aug 2015 14:00:04 -0700 (PDT) X-Received: by 10.107.170.77 with SMTP id t74mr4998521ioe.107.1438894800729; Thu, 06 Aug 2015 14:00:00 -0700 (PDT) Received: from mail-ig0-f173.google.com (mail-ig0-f173.google.com. [209.85.213.173]) by mx.google.com with ESMTPS id l10si2736394igx.31.2015.08.06.14.00.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Aug 2015 14:00:00 -0700 (PDT) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 209.85.213.173 as permitted sender) client-ip=209.85.213.173; Received: by igbpg9 with SMTP id pg9so19919675igb.0 for ; Thu, 06 Aug 2015 14:00:00 -0700 (PDT) X-Received: by 10.50.137.100 with SMTP id qh4mr6219737igb.1.1438894799880; Thu, 06 Aug 2015 13:59:59 -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 7sm5345121iot.6.2015.08.06.13.59.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Aug 2015 13:59:58 -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 4/5] ACPI / X86: remove usage of BAD_MADT_ENTRY Date: Thu, 6 Aug 2015 14:59:29 -0600 Message-Id: <1438894770-31163-5-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1438894770-31163-1-git-send-email-al.stone@linaro.org> References: <1438894770-31163-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.175 as permitted sender) smtp.mail=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 e49ee24..9bdf786 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 */ @@ -462,9 +441,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) { @@ -503,9 +479,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? */