From patchwork Wed Aug 19 22:07:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 52566 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id 941932156D for ; Wed, 19 Aug 2015 22:08:10 +0000 (UTC) Received: by lbbpd10 with SMTP id pd10sf5201698lbb.3 for ; Wed, 19 Aug 2015 15:08:09 -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=EmKRqYsvvgr84O6u/rzkEGgKlYE5OaVB8rKFOTfGnc4=; b=EYhbVu6Qcb75vPRD7v34cp9VPa+pU0X77wpL1yxxyaqmQD+sC28in6VyVP/loGGky5 1nplAZX/z3rZ3/Q+j8JL5jJJh3kAjCXW/tRiRgu1wCurUIub9rC0B4Rey8vTcdKAgiTQ ckJGytDaW1yAZHOtbRoO2MDiF01ITo3XGFri4IjVdNLCi/2aG2PxKW2qD5L0rGSTXolu ExOapjFlza//cLpU55LmrZ9mkk60UU3i6ThEsyN3pFFXtPCQu/W+RX0g3LqyYrV36XBf hUwIjGPH19UsPXLP7+KnXb2LWRsQokhwIjzTzW0w8nme/Okrq6P4lZMo+GBp743/paf8 /1qQ== X-Gm-Message-State: ALoCoQnkELQKsL4hgRFIxmC+TjekTS8IkGD4M/pz7Ffb4v9k4powCTmv1GgTlik317R349aHFcID X-Received: by 10.112.167.201 with SMTP id zq9mr3809355lbb.2.1440022089515; Wed, 19 Aug 2015 15:08:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.3 with SMTP id r3ls101156lae.89.gmail; Wed, 19 Aug 2015 15:08:09 -0700 (PDT) X-Received: by 10.112.16.135 with SMTP id g7mr13680079lbd.19.1440022089371; Wed, 19 Aug 2015 15:08:09 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id g10si1945633laf.177.2015.08.19.15.08.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Aug 2015 15:08:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbbtg9 with SMTP id tg9so12383806lbb.1 for ; Wed, 19 Aug 2015 15:08:09 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr13734450lbb.36.1440022089203; Wed, 19 Aug 2015 15:08:09 -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.162.200 with SMTP id yc8csp636826lbb; Wed, 19 Aug 2015 15:08:08 -0700 (PDT) X-Received: by 10.50.64.244 with SMTP id r20mr29192639igs.33.1440022080910; Wed, 19 Aug 2015 15:08:00 -0700 (PDT) Received: from mail-ig0-f171.google.com (mail-ig0-f171.google.com. [209.85.213.171]) by mx.google.com with ESMTPS id 6si1754194ios.142.2015.08.19.15.08.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Aug 2015 15:08:00 -0700 (PDT) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 209.85.213.171 as permitted sender) client-ip=209.85.213.171; Received: by igbjg10 with SMTP id jg10so115766940igb.0 for ; Wed, 19 Aug 2015 15:08:00 -0700 (PDT) X-Received: by 10.50.143.12 with SMTP id sa12mr4184568igb.64.1440022080084; Wed, 19 Aug 2015 15:08:00 -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 f126sm1708666ioe.21.2015.08.19.15.07.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Aug 2015 15:07: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 v2 4/5] ACPI / X86: remove usage of BAD_MADT_ENTRY Date: Wed, 19 Aug 2015 16:07:27 -0600 Message-Id: <1440022048-6285-5-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1440022048-6285-1-git-send-email-al.stone@linaro.org> References: <1440022048-6285-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.170 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 75e8bad..f2a70b2 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? */