From patchwork Mon Sep 2 03:57:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 19667 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A67625E41 for ; Mon, 2 Sep 2013 04:08:37 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id f11sf3942315yha.4 for ; Sun, 01 Sep 2013 21:08:37 -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=5ee8EW9v+iHu0wWgN87sSEiBigeQTQYuYKyHOngVMbo=; b=hV4/NzzsHq1Rct2igsSl5fURquoK+W43AsnpWc0bYCQOPcmrJu/YHMCoo0SUGwHHPQ +Tvif+vIqBwDRAbjeasXh3XHEKPxGg8u6G/1KMiQAD+lEcu2biTE3YRruNFdKuvxcklW S0NHiXEy+LgkzVROoRu0Wexn5TkzAQreHMjsmgANUulJ7WP2ZA6c0bhnzSX6yEmrssM4 dLsQeW3BUqbbv9k+1jLOJVkM1TULO2b3eFobevtVqEza8u8+ZVXBE7jsuMKAKHywk+dw EUPTOjSGhHrIaf55CfP4rfC6YiojpGPCH1Ii2J4XHbXobTGB8Raq+lxUQQHwj2Ekiz3+ FSIg== X-Received: by 10.236.51.9 with SMTP id a9mr7688968yhc.41.1378094917293; Sun, 01 Sep 2013 21:08:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.104.198 with SMTP id gg6ls2132330qeb.89.gmail; Sun, 01 Sep 2013 21:08:37 -0700 (PDT) X-Received: by 10.220.74.69 with SMTP id t5mr21348976vcj.18.1378094917218; Sun, 01 Sep 2013 21:08:37 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id fa1si2634441ved.89.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 01 Sep 2013 21:08:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 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.179; Received: by mail-vc0-f179.google.com with SMTP id ht10so2624857vcb.24 for ; Sun, 01 Sep 2013 21:08:37 -0700 (PDT) X-Gm-Message-State: ALoCoQmbmAoq+XEOdObb2uuRe5LTrIZJE0hNcjLCK8jnoEnm50DVEzT/Un4z3TBVZmzXnu3L6Irs X-Received: by 10.58.155.68 with SMTP id vu4mr985614veb.21.1378094917145; Sun, 01 Sep 2013 21:08:37 -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 u4csp92672vcz; Sun, 1 Sep 2013 21:08:36 -0700 (PDT) X-Received: by 10.66.122.40 with SMTP id lp8mr23844987pab.82.1378094916281; Sun, 01 Sep 2013 21:08:36 -0700 (PDT) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by mx.google.com with ESMTPS id hg4si8921647pbc.105.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 01 Sep 2013 21:08:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.45 is neither permitted nor denied by best guess record for domain of hanjun.guo@linaro.org) client-ip=209.85.220.45; Received: by mail-pa0-f45.google.com with SMTP id bg4so4673886pad.18 for ; Sun, 01 Sep 2013 21:08:35 -0700 (PDT) X-Received: by 10.68.196.138 with SMTP id im10mr5461283pbc.5.1378094915650; Sun, 01 Sep 2013 21:08:35 -0700 (PDT) Received: from localhost ([218.17.215.175]) by mx.google.com with ESMTPSA id uw6sm12908987pbc.8.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 01 Sep 2013 21:08:35 -0700 (PDT) From: Hanjun Guo To: "Rafael J. Wysocki" Cc: Thomas Gleixner , Tony Luck , Ingo Molnar , Jiang Liu , 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 v2 5/6] ACPI / processor: remove unnecessary if (!pr) check Date: Mon, 2 Sep 2013 11:57:38 +0800 Message-Id: <1378094259-5922-6-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1378094259-5922-1-git-send-email-hanjun.guo@linaro.org> References: <1378094259-5922-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.179 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 never be NULL, so the if (!pr) check is unnecessary and can be removed. Since the 'pr' argument is not used by acpi_processor_errata() any more, so change the argument into void too. 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 5364d02..7ce0750 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