From patchwork Fri Apr 12 20:47:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2437931 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9C016DF2A1 for ; Fri, 12 Apr 2013 20:47:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753938Ab3DLUr4 (ORCPT ); Fri, 12 Apr 2013 16:47:56 -0400 Received: from mail-ia0-f176.google.com ([209.85.210.176]:35723 "EHLO mail-ia0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753848Ab3DLUrz (ORCPT ); Fri, 12 Apr 2013 16:47:55 -0400 Received: by mail-ia0-f176.google.com with SMTP id i9so472491iad.35 for ; Fri, 12 Apr 2013 13:47:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=7eoo+0VMW2M5Vk8XczmNemy06PVfunkKilwez0ihpiA=; b=GpTmM64D7az83AQfr1dIVIhnR5/sYL7/xgc2ajoF6ASDS64Gi1+jLnyULOxoAAGCD4 NNkiAT0ll6S3GXcFBY5p9H5oWn3dYGTjJF5jTah+wZI9L+q2wZarmVGq1ocrqIgEB9lY v39qJRJWWlCCmrQPZsgYj5ZhPbLfkrfo3sRX0SkygbGQH36+bvZ7IB7VRnYfooottLIJ +aDMRr2VUPwlkCToqLTm6Ln/GEsHnwnolfE9jNH/CJDdFksyDEGcqacDm1fodos0rneP AR+al4zYZotKDbxiqv1GAfs6lOtuwY8cIaJ41lT4U8LiLMqWk5K9F7YrRPvnXxizfzvw bGCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=7eoo+0VMW2M5Vk8XczmNemy06PVfunkKilwez0ihpiA=; b=MX4axxuYqrZ055aR2pt7vx2s5sWOky9XE2KKPeGZ1uhoP1BWJHHLcBPhuWLarcc4G6 WQPcZ3gaGbNubYRRFDW2dQzE2RFvBfQoTfVwMn21w/fQDZztyNkA4BCCA1YMRIsmkxKR UQj+UBB7cOUaP6UbA3s27ddklOwRPsWZoqWCD8CdhPF996wRxM8gVsEHEUqB65yfI9ro +iGPm+g729r44KyJR6XZHfudNizGYTY2QOixf6F14FaoGMLwN33EgfRLNzuyXjrL37e+ syZX5f7YW581gcU0PjQi20FSpH3SOveEODk5DTuYJSkxkWFpox0BIVyw91jIGnbiArJc cytg== X-Received: by 10.42.58.201 with SMTP id j9mr7305528ich.20.1365799674916; Fri, 12 Apr 2013 13:47:54 -0700 (PDT) Received: from localhost ([172.16.49.242]) by mx.google.com with ESMTPS id qs4sm4669889igb.10.2013.04.12.13.47.52 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 12 Apr 2013 13:47:54 -0700 (PDT) Subject: [PATCH 2/6] PCI: Remove unused variables To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: "Rafael J. Wysocki" , Andy Shevchenko Date: Fri, 12 Apr 2013 14:47:51 -0600 Message-ID: <20130412204751.5237.1749.stgit@bhelgaas-glaptop> In-Reply-To: <20130412204510.5237.25443.stgit@bhelgaas-glaptop> References: <20130412204510.5237.25443.stgit@bhelgaas-glaptop> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQl9V+EBtp8KJax6W3HAtbrk2K04iCDSXTjgDwP3K475uJm8mBZ9gMMmMCWEYlrkQp/f3tsLhFgUu/pYMqhRnRARPzV30ZlYxjde1SUORhGhBTaEKests8CeuQcInQaqdHAMH935QqgK97S7o/qh3/B+4ASpyZgv+U3ZCts9mze+Ju4k30xVNkUGB623+Tt5NuHqbrjDAAa0PSnP/MzNhvBPpQBqzuT4q9s87KhleDBipMw7Vbg= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org This fixes "set but not used" warnings found via "make W=1". Signed-off-by: Bjorn Helgaas --- drivers/pci/hotplug/pci_hotplug_core.c | 2 -- drivers/pci/pcie/portdrv_pci.c | 17 +++++------------ drivers/pci/setup-res.c | 2 -- 3 files changed, 5 insertions(+), 16 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index 202f4a9..d9a528f 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c @@ -527,10 +527,8 @@ int pci_hp_deregister(struct hotplug_slot *hotplug) int __must_check pci_hp_change_slot_info(struct hotplug_slot *hotplug, struct hotplug_slot_info *info) { - struct pci_slot *slot; if (!hotplug || !info) return -ENODEV; - slot = hotplug->pci_slot; memcpy(hotplug->info, info, sizeof(struct hotplug_slot_info)); diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 08c243a..0efba05 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c @@ -272,11 +272,9 @@ static pci_ers_result_t pcie_portdrv_error_detected(struct pci_dev *dev, enum pci_channel_state error) { struct aer_broadcast_data data = {error, PCI_ERS_RESULT_CAN_RECOVER}; - int ret; - - /* can not fail */ - ret = device_for_each_child(&dev->dev, &data, error_detected_iter); + /* get true return value from &data */ + device_for_each_child(&dev->dev, &data, error_detected_iter); return data.result; } @@ -308,10 +306,9 @@ static int mmio_enabled_iter(struct device *device, void *data) static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev) { pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; - int retval; /* get true return value from &status */ - retval = device_for_each_child(&dev->dev, &status, mmio_enabled_iter); + device_for_each_child(&dev->dev, &status, mmio_enabled_iter); return status; } @@ -343,7 +340,6 @@ static int slot_reset_iter(struct device *device, void *data) static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) { pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; - int retval; /* If fatal, restore cfg space for possible link reset at upstream */ if (dev->error_state == pci_channel_io_frozen) { @@ -354,8 +350,7 @@ static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) } /* get true return value from &status */ - retval = device_for_each_child(&dev->dev, &status, slot_reset_iter); - + device_for_each_child(&dev->dev, &status, slot_reset_iter); return status; } @@ -381,9 +376,7 @@ static int resume_iter(struct device *device, void *data) static void pcie_portdrv_err_resume(struct pci_dev *dev) { - int retval; - /* nothing to do with error value, if it ever happens */ - retval = device_for_each_child(&dev->dev, NULL, resume_iter); + device_for_each_child(&dev->dev, NULL, resume_iter); } /* diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 81b88bd..07f2edd 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c @@ -261,7 +261,6 @@ int pci_assign_resource(struct pci_dev *dev, int resno) { struct resource *res = dev->resource + resno; resource_size_t align, size; - struct pci_bus *bus; int ret; align = pci_resource_alignment(dev, res); @@ -271,7 +270,6 @@ int pci_assign_resource(struct pci_dev *dev, int resno) return -EINVAL; } - bus = dev->bus; size = resource_size(res); ret = _pci_assign_resource(dev, resno, size, align);