From patchwork Thu Jun 13 16:32:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 2717691 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2AA21C0AB1 for ; Thu, 13 Jun 2013 16:36:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B0C9F20461 for ; Thu, 13 Jun 2013 16:36:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A5F3F2043B for ; Thu, 13 Jun 2013 16:36:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758802Ab3FMQf7 (ORCPT ); Thu, 13 Jun 2013 12:35:59 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:54206 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758690Ab3FMQf5 (ORCPT ); Thu, 13 Jun 2013 12:35:57 -0400 Received: by mail-pd0-f179.google.com with SMTP id q10so5527664pdj.24 for ; Thu, 13 Jun 2013 09:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=G8edd89MT9GSV7qwXdbpExuWAgHE0JeeYr6oDSqGvJQ=; b=ZRWUB+0LmRy4pYX+Vd3Tq3n+lllZBFr5VBKvFEnJ1affCaeNzYUIrdIXCNTk15yPTF lnh1WOKSgxtJBK51F/sqMJ2anbjisHzrqVBB2mqH13aviz2xhNPfrn3lYykqIS77Uxwf BiOKf6/paOFppGT2Hfxszhva/bMhJPCl6JRy5pdvKW6hAAv5P9PJsrQNOnRQ2UpwGTgy sR80k9GhbZuNPgYdOuVcWbk1Ob0O6U0y5VX/K6kmYx/fYgdytUfmkMVzMAF4QAiYz2UP 4WD4/KLAD+T5BPnbINRMQ7p1+ADBsyG6rgrQhXOHJ9qPx7TGvTRXWYG9Q/wQasZ1OEYi I1sA== X-Received: by 10.68.185.162 with SMTP id fd2mr1571916pbc.176.1371141357348; Thu, 13 Jun 2013 09:35:57 -0700 (PDT) Received: from localhost.localdomain ([114.250.95.159]) by mx.google.com with ESMTPSA id ty8sm176964pac.8.2013.06.13.09.35.52 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Jun 2013 09:35:56 -0700 (PDT) From: Jiang Liu To: "Rafael J . Wysocki" , Bjorn Helgaas , Yinghai Lu , "Alexander E . Patrakov" Cc: Jiang Liu , Greg Kroah-Hartman , Yijing Wang , Jiang Liu , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Shaohua Li , Len Brown , linux-acpi@vger.kernel.org Subject: [BUGFIX 7/9] ACPI, DOCK: simplify implementation of dock_create_acpi_device() Date: Fri, 14 Jun 2013 00:32:30 +0800 Message-Id: <1371141152-9468-8-git-send-email-jiang.liu@huawei.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1371141152-9468-1-git-send-email-jiang.liu@huawei.com> References: <1371141152-9468-1-git-send-email-jiang.liu@huawei.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The return value of dock_create_acpi_device() is unused, so simplify it by returning void. Signed-off-by: Jiang Liu Cc: Shaohua Li Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/acpi/dock.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index da3314d..72cf97e 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -299,10 +299,8 @@ static int dock_present(struct dock_station *ds) * handle if one does not exist already. This should cause * acpi to scan for drivers for the given devices, and call * matching driver's add routine. - * - * Returns a pointer to the acpi_device corresponding to the handle. */ -static struct acpi_device * dock_create_acpi_device(acpi_handle handle) +static void dock_create_acpi_device(acpi_handle handle) { struct acpi_device *device; int ret; @@ -315,10 +313,7 @@ static struct acpi_device * dock_create_acpi_device(acpi_handle handle) ret = acpi_bus_scan(handle); if (ret) pr_debug("error adding bus, %x\n", -ret); - - acpi_bus_get_device(handle, &device); } - return device; } /**