From patchwork Thu Jun 18 16:12:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 6639091 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E0CC9C0020 for ; Thu, 18 Jun 2015 16:13:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1DAFC2039E for ; Thu, 18 Jun 2015 16:13:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3289A207D1 for ; Thu, 18 Jun 2015 16:13:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756052AbbFRQMv (ORCPT ); Thu, 18 Jun 2015 12:12:51 -0400 Received: from mail-ig0-f177.google.com ([209.85.213.177]:38276 "EHLO mail-ig0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755900AbbFRQMr (ORCPT ); Thu, 18 Jun 2015 12:12:47 -0400 Received: by igblz2 with SMTP id lz2so63165546igb.1 for ; Thu, 18 Jun 2015 09:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=PSspUrjm4sbKoKLfrlRDQoAkDCUmuq8ZoZhsdvpvzzU=; b=SU4Q7fdayhaL7YhjxQfYYEAg6mlXE+GN27vy7sffNu2UgQM3RWdsJkr7vinqIOxvhm CeL5vb3jXxDeYbU0eCvqdK4ihNqxwGUqeSUp/wYx8qpLSVw5YI1/RAkJVD57a+hBvMqO 7WS9S6j/i1tKMueisu625tBgLTh2z1GZa/vIrXBVPxDvCf6iHuQW0faoFchbdXb30kMJ 6S0IyVBSTnISTPOd4BEWB9nznw3tBXgJocYB6PrqURFsgMjpDwX5u55f6fKQU5WplP3z b7tCM9ufDGwIlYetFhB9Rb2HvtJCcsQAqR4JdqbZtvUiYKExeLW3ll4EyjZrbtKpfoY+ SJng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=PSspUrjm4sbKoKLfrlRDQoAkDCUmuq8ZoZhsdvpvzzU=; b=CZcHfHqSIYN+r7rvWNmEvnfgoPfHS9TaGp6gZBBY9/bB4OuELJ3UZtJihGulBxOrDx 0Z4onTA+2vEhZsuvDA5Fi+gz9nqlDomx2wfCOR9rN+lFu7TdsvFe4eqeIEx6QFxN2SSy Ya+QVMJmlboPupJkGk6MdTqBGP70NDchcwno+rQGSFmzs508ScfsUEZcRdeviuGzl1J6 E5n1cHOo2vPrTmpNLYw0pULLOdjRh2llW743fz7ySmjvA2l6rqW3kuIpaWRusmB18CSe BlY1XelLmE13htSBR0RiPcyd7iNJJ5QQyHYsLZYdAocD9PXJ1NlhUAj8L677bE8mqf/n SEqw== X-Gm-Message-State: ALoCoQm409ROQo7RSO0OvPFiv2gADmTmrzxQBHzJR/8N1Pp+IVqLI0qAODB+T70cRXxRbTMu+Fo+ X-Received: by 10.42.102.211 with SMTP id j19mr6591058ico.50.1434643966738; Thu, 18 Jun 2015 09:12:46 -0700 (PDT) Received: from localhost ([69.71.1.1]) by mx.google.com with ESMTPSA id o9sm5212350ioe.35.2015.06.18.09.12.45 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 18 Jun 2015 09:12:46 -0700 (PDT) Subject: [PATCH 2/4] PCI: pciehp: Make queue_interrupt_event() void To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Rajat Jain , Yinghai Lu , linux-kernel@vger.kernel.org Date: Thu, 18 Jun 2015 11:12:45 -0500 Message-ID: <20150618161245.32739.87037.stgit@bhelgaas-glaptop2.roam.corp.google.com> In-Reply-To: <20150618161207.32739.62577.stgit@bhelgaas-glaptop2.roam.corp.google.com> References: <20150618161207.32739.62577.stgit@bhelgaas-glaptop2.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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 Nobody looks at the return value from queue_interrupt_event(), so errors were silently ignored. Convert it to a "void" function and note the error in the dmesg log. No functional change except the new message. Signed-off-by: Bjorn Helgaas --- drivers/pci/hotplug/pciehp_ctrl.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 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/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c index 4bdaf62..1086041 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c @@ -37,21 +37,20 @@ static void interrupt_event_handler(struct work_struct *work); -static int queue_interrupt_event(struct slot *p_slot, u32 event_type) +static void queue_interrupt_event(struct slot *p_slot, u32 event_type) { struct event_info *info; info = kmalloc(sizeof(*info), GFP_ATOMIC); - if (!info) - return -ENOMEM; + if (!info) { + ctrl_err(p_slot->ctrl, "dropped event %d (ENOMEM)\n", event_type); + return; + } + INIT_WORK(&info->work, interrupt_event_handler); info->event_type = event_type; info->p_slot = p_slot; - INIT_WORK(&info->work, interrupt_event_handler); - queue_work(p_slot->wq, &info->work); - - return 0; } u8 pciehp_handle_attention_button(struct slot *p_slot)