From patchwork Sat Aug 31 10:16:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 19654 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A29FE25E41 for ; Sat, 31 Aug 2013 10:20:48 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id w8sf506713qac.0 for ; Sat, 31 Aug 2013 03:20:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state: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=Ie5L2iSHgZ8EYyJ6wAPipOGfAvNn8GWHLSOGGa8NY4A=; b=JjyNtzXLeHY05ckxjGmf+g6ccIL5xDVkt/ynP8ZcodzXUXVVorZx/ZZT0TFFv4RtH1 RWsizVVxcdSZwf88iwK2XlbPjWU3j5DEwKY2oabYSBb+cZsZTBtRnkssrJvoC1axJKci 3+nJCsy5c5ipkO6jLw7XGP5LrlyVkiRgAgvTYVxJgxSqfHU9YUxIKlu7VNGQbDaKKo/J U5vQIU+rCsWUXeZfJ7ThCMNRTO6KWjlOpyR5UrYq9Jzd5zTdrFdAtDJVg99dr+G7qMuj LLHCM6ZyHLP9NGi8w+NKmhviZDkNm/y+cxsHALNaiaQWy2p6KTNiY0wZGHACmgxpP0YA aNiA== X-Received: by 10.236.68.2 with SMTP id k2mr4732784yhd.16.1377944448125; Sat, 31 Aug 2013 03:20:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.53.103 with SMTP id a7ls1552857qep.90.gmail; Sat, 31 Aug 2013 03:20:48 -0700 (PDT) X-Received: by 10.58.108.8 with SMTP id hg8mr12159885veb.6.1377944448018; Sat, 31 Aug 2013 03:20:48 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id tj1si694215vdc.92.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 31 Aug 2013 03:20:48 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id kw10so1928751vcb.15 for ; Sat, 31 Aug 2013 03:20:47 -0700 (PDT) X-Gm-Message-State: ALoCoQmdzEdfez9JYl/4XedXkQ2YEFIehkbQm/wzhdWO7DS1zFRr6MH/Vb7f8UjkYco+meWW+dyR X-Received: by 10.221.56.194 with SMTP id wd2mr12805128vcb.7.1377944447940; Sat, 31 Aug 2013 03:20:47 -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.220.174.196 with SMTP id u4csp16084vcz; Sat, 31 Aug 2013 03:20:47 -0700 (PDT) X-Received: by 10.68.170.227 with SMTP id ap3mr868346pbc.162.1377944447122; Sat, 31 Aug 2013 03:20:47 -0700 (PDT) Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by mx.google.com with ESMTPS id zp6si2278093pbc.127.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 31 Aug 2013 03:20:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.46 is neither permitted nor denied by best guess record for domain of hanjun.guo@linaro.org) client-ip=209.85.160.46; Received: by mail-pb0-f46.google.com with SMTP id rq2so2818149pbb.5 for ; Sat, 31 Aug 2013 03:20:46 -0700 (PDT) X-Received: by 10.66.121.234 with SMTP id ln10mr15349871pab.20.1377944446722; Sat, 31 Aug 2013 03:20:46 -0700 (PDT) Received: from localhost ([218.17.215.175]) by mx.google.com with ESMTPSA id 7sm3693960paf.22.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 31 Aug 2013 03:20:46 -0700 (PDT) From: Hanjun Guo To: "Rafael J. Wysocki" Cc: Thomas Gleixner , Tony Luck , Ingo Molnar , linux-acpi@vger.kernel.org, x86@kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org, linaro-acpi@lists.linaro.org, Hanjun Guo Subject: [PATCH 5/6] ACPI / processor: remove unnecessary if (!pr) check Date: Sat, 31 Aug 2013 18:16:00 +0800 Message-Id: <1377944162-18574-5-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1377944162-18574-1-git-send-email-hanjun.guo@linaro.org> References: <1377944162-18574-1-git-send-email-hanjun.guo@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , acpi_processor_errata() is only called in acpi_processor_get_info(), and the argument 'pr' passed to acpi_processor_errata() will be never NULL, so the if (!pr) check is unnecessary. Since the 'pr' argument is not used by acpi_processor_errata() any more, so change the argument into void. Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_processor.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index a2a71d0..d1cabe5 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -140,15 +140,11 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev) return 0; } -static int acpi_processor_errata(struct acpi_processor *pr) +static int acpi_processor_errata(void) { int result = 0; struct pci_dev *dev = NULL; - - if (!pr) - return -EINVAL; - /* * PIIX4 */ @@ -220,7 +216,7 @@ static int acpi_processor_get_info(struct acpi_device *device) acpi_status status = AE_OK; static int cpu0_initialized; - acpi_processor_errata(pr); + acpi_processor_errata(); /* * Check to see if we have bus mastering arbitration control. This