From patchwork Thu Dec 5 16:03:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 22080 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9B878202E0 for ; Thu, 5 Dec 2013 16:03:55 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wo20sf56133107obc.9 for ; Thu, 05 Dec 2013 08:03:55 -0800 (PST) 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=mPK2snEXk4EDxgTvvtwSa0p/poWfQDDBbaYB2Td5IPg=; b=fMnI3amOGrp/TvAQhlNEcphVW8CN9WFyFV9d58b2xzzksdRdxvg6ulZDnVqiPVz79D OLvdcX8HOeQmcIffMOposFtuisrFL6fHUCgSECBhqJK3auWHrtVryad8+xEarbLq3Q8J zYveIe7ftgEeFm5KL2r9k4Y9uf8qqmbsxdiJAvcf7mn5keEb/qKPO8pKB7aRgUjisCLm hUMwlw7rN75QU8vhMEffh1sJPStbdCBLLzSaKAx+lCZnXTO4+M8OJhN5uJz0C7tZatsG Fw7KfiLpy2qClukmGP9h841XkTeHKbhhFkMeGMuQ487bm6O7MOOg6ohZ1Wn4c4W42B/M 6UOA== X-Gm-Message-State: ALoCoQneP3SIFXbeiwHbShMkpL64j38FxkI/NtogryOimmlFgB4dYdy6fjCt763TjlIIyGbii2XB X-Received: by 10.182.246.225 with SMTP id xz1mr27152984obc.14.1386259434880; Thu, 05 Dec 2013 08:03:54 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.121.98 with SMTP id lj2ls935977qeb.45.gmail; Thu, 05 Dec 2013 08:03:54 -0800 (PST) X-Received: by 10.58.96.15 with SMTP id do15mr1476311veb.56.1386259434478; Thu, 05 Dec 2013 08:03:54 -0800 (PST) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id dl10si34926756veb.19.2013.12.05.08.03.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 08:03:54 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.175 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.175; Received: by mail-vc0-f175.google.com with SMTP id ld13so13245222vcb.34 for ; Thu, 05 Dec 2013 08:03:54 -0800 (PST) X-Received: by 10.52.230.35 with SMTP id sv3mr12088836vdc.27.1386259434129; Thu, 05 Dec 2013 08:03:54 -0800 (PST) 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 u4csp26507vcz; Thu, 5 Dec 2013 08:03:53 -0800 (PST) X-Received: by 10.68.6.99 with SMTP id z3mr53662470pbz.114.1386259433251; Thu, 05 Dec 2013 08:03:53 -0800 (PST) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id kn3si58371573pbc.334.2013.12.05.08.03.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 08:03:53 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of hanjun.guo@linaro.org) client-ip=209.85.160.50; Received: by mail-pb0-f50.google.com with SMTP id rr13so25969532pbb.23 for ; Thu, 05 Dec 2013 08:03:52 -0800 (PST) X-Received: by 10.69.11.194 with SMTP id ek2mr4890034pbd.111.1386259432791; Thu, 05 Dec 2013 08:03:52 -0800 (PST) Received: from localhost ([61.148.199.138]) by mx.google.com with ESMTPSA id ql10sm145563952pbc.44.2013.12.05.08.03.49 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 05 Dec 2013 08:03:51 -0800 (PST) From: Hanjun Guo To: "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org, Rob Herring , patches@linaro.org, linaro-acpi@lists.linaro.org, Hanjun Guo Subject: [PATCH 1/2] ACPI / dock: Remove the redundant if (acpi_disabled) check Date: Fri, 6 Dec 2013 00:03:40 +0800 Message-Id: <1386259421-10320-1-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 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.175 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_dock_init() will only be called in acpi_scan_init(), and the code logic shows that if (acpi_disabled) is redundant: acpi_init(); if (acpi_disabled) return; acpi_scan_init(); acpi_dock_init(); if (acpi_disabled) /* redundant */ return; Signed-off-by: Hanjun Guo --- This patch set is inspired by Rob's question for my ACPI ARM64 core patches :) drivers/acpi/dock.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 8da6be9..61d0c3f 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -893,9 +893,6 @@ find_dock_and_bay(acpi_handle handle, u32 lvl, void *context, void **rv) void __init acpi_dock_init(void) { - if (acpi_disabled) - return; - /* look for dock stations and bays */ acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, find_dock_and_bay, NULL, NULL, NULL);