Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751795Ab3FZHiS (ORCPT ); Wed, 26 Jun 2013 03:38:18 -0400 Received: from mail-ie0-f169.google.com ([209.85.223.169]:36995 "EHLO mail-ie0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751166Ab3FZHiR (ORCPT ); Wed, 26 Jun 2013 03:38:17 -0400 MIME-Version: 1.0 In-Reply-To: <20130625211516.GA8494@google.com> References: <1370066593-22736-1-git-send-email-yinghai@kernel.org> <1370066593-22736-3-git-send-email-yinghai@kernel.org> <20130625211516.GA8494@google.com> Date: Wed, 26 Jun 2013 00:38:17 -0700 X-Google-Sender-Auth: PfLol9QfkDotnWrXCIASmm0uppI Message-ID: Subject: Re: [PATCH v5 3/7] PCI: Use pci_walk_bus to detect unassigned resources From: Yinghai Lu To: Bjorn Helgaas Cc: Benjamin Herrenschmidt , Gavin Shan , "linux-pci@vger.kernel.org" , Linux Kernel Mailing List Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 993 Lines: 23 On Tue, Jun 25, 2013 at 2:15 PM, Bjorn Helgaas wrote: >> +static int __init check_unassigned_resources(struct pci_dev *dev, void *data) > > I'm not going to add a function named "check_*()" because the name gives no > clue about what the return value means. If it's a boolean function, the > name should be something like a question that has a yes/no answer. that prototype return int is required by pci_walk_bus(). drivers/pci/bus.c:void pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *) return 1, will return early from pci_walk_bus(). count_unassigned_resources() is not good name too, as we bail out early. find_unassigned_resources() is more weird, looks like it want to return resource Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/