From patchwork Fri Apr 12 20:48:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2437951 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 A9CFCDF2A1 for ; Fri, 12 Apr 2013 20:48:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752909Ab3DLUsL (ORCPT ); Fri, 12 Apr 2013 16:48:11 -0400 Received: from mail-ie0-f173.google.com ([209.85.223.173]:41210 "EHLO mail-ie0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752759Ab3DLUsJ (ORCPT ); Fri, 12 Apr 2013 16:48:09 -0400 Received: by mail-ie0-f173.google.com with SMTP id k13so852099iea.32 for ; Fri, 12 Apr 2013 13:48:09 -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=JdTxAGRuI7OgyRtZ50Bsjmn1dd6l9glomNmJW3sQX64=; b=UK2+DOwOZXhHSV3QZsFuIbhK1VUWQv7OAUViyFE9Ac9Zfw0V8v4jwLgCF/vyLyyzvP ZPFQbmWDCnUIcqkiGNDNAeYuJd1TKhXDjyrdlXw5tWQx9K4QvOvLCQZ1UuYSZpsZYacM Xo9Lj2UGmif26IPN0bvn6t9kU0VnIaqk51r0ZTW44TplfuZjYXpABr3wYmUyx466WPwB xPVvNRgnBnIelSD+m8i8zFwFYcb4xGB7SVC9ltFzlKEJ86uYD3ha21ETBovuVIvLAMDK YQ5OhsWJqu3vxXQMxk87w0/t9J0tAtdXx4uDACZBgwB8JNSC9DHFpvhl0V5yV09oSOws XC2Q== 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=JdTxAGRuI7OgyRtZ50Bsjmn1dd6l9glomNmJW3sQX64=; b=NIRyRp38L95LV9gkHzC/zgEPt7d7oxV4G0k2N8rzVYKLoAyz3w27A00p75G2zf5Mps o62CuPVKmgQrJO4iAPZ1u7aBbMGHpsOUMFEbuP1telhjaz8VmpKnIf6V+00FERuJBnSf 5ZIVrApUqxLTLqfGXfuJazW4EALREJWnj9civTqu7OYCFB06N6EBdf14vRgXYkjhFI0k 0Mq+k8DQ0Pon4U7Jfu0ezBul48uWA/M03fWi5YRo+XNi4TzyGQiduX61dq8ZxHXEMlWP QaPpHZXLR9vBzJOz5FqVhuPnbfKT2sJBkqq9F93XMExziI4IwkInNvjRQzRYZsy9gfE8 +pnQ== X-Received: by 10.42.63.133 with SMTP id c5mr7303597ici.41.1365799689499; Fri, 12 Apr 2013 13:48:09 -0700 (PDT) Received: from localhost ([172.16.49.242]) by mx.google.com with ESMTPS id s8sm70549igs.0.2013.04.12.13.48.08 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 12 Apr 2013 13:48:09 -0700 (PDT) Subject: [PATCH 4/6] PCI: Remove __must_check from definitions To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: "Rafael J. Wysocki" , Andy Shevchenko Date: Fri, 12 Apr 2013 14:48:07 -0600 Message-ID: <20130412204807.5237.67316.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: ALoCoQkBAPLOwIUfrRSrAnNQaWsh6sPrSnlLXbGTnIfnKTEHJI0Hu4y1Sy4N0kdcDLm9SismEMRTxGsTEUlBPMQhpWo2TKge6M2HLYYow4hDBd2T4tRKqzb2JWGliKTpklpUulqXZF10qayV6tY8m5NiNrP0WbiPbUlEfWgMC8L6d3E19Me/qYBXr9zdx1WaAGYFoZEWaz4HngSpKe5PXYENCA8xiWDz0anM9jRSw1UVcodMZ8Z0GcM= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The __must_check (gcc "warn_unused_result") attribute only makes sense when compiling the *caller* of the function, so the attribute should appear on the declaration in the header file, not on the definition. The declarations of these functions are already annotated with __must_check. Signed-off-by: Bjorn Helgaas --- drivers/pci/hotplug/pci_hotplug_core.c | 4 ++-- drivers/pci/hotplug/shpchp_sysfs.c | 2 +- 2 files changed, 3 insertions(+), 3 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 d9a528f..d0f9eda 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c @@ -524,8 +524,8 @@ int pci_hp_deregister(struct hotplug_slot *hotplug) * * Returns 0 if successful, anything else for an error. */ -int __must_check pci_hp_change_slot_info(struct hotplug_slot *hotplug, - struct hotplug_slot_info *info) +int pci_hp_change_slot_info(struct hotplug_slot *hotplug, + struct hotplug_slot_info *info) { if (!hotplug || !info) return -ENODEV; diff --git a/drivers/pci/hotplug/shpchp_sysfs.c b/drivers/pci/hotplug/shpchp_sysfs.c index eeb23ce..e8c31fe 100644 --- a/drivers/pci/hotplug/shpchp_sysfs.c +++ b/drivers/pci/hotplug/shpchp_sysfs.c @@ -85,7 +85,7 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha } static DEVICE_ATTR (ctrl, S_IRUGO, show_ctrl, NULL); -int __must_check shpchp_create_ctrl_files (struct controller *ctrl) +int shpchp_create_ctrl_files (struct controller *ctrl) { return device_create_file (&ctrl->pci_dev->dev, &dev_attr_ctrl); }