From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751351AbdFXJlq (ORCPT ); Sat, 24 Jun 2017 05:41:46 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:33583 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751271AbdFXJlo (ORCPT ); Sat, 24 Jun 2017 05:41:44 -0400 MIME-Version: 1.0 In-Reply-To: <20170624015044.16746-3-palmer@dabbelt.com> References: <20170624015044.16746-1-palmer@dabbelt.com> <20170624015044.16746-3-palmer@dabbelt.com> From: Geert Uytterhoeven Date: Sat, 24 Jun 2017 11:41:42 +0200 X-Google-Sender-Auth: rv-0G6bDIhMqcLgcC5UIQCrMyNc Message-ID: Subject: Re: [PATCH 2/3] pci: Add a generic, weakly-linked pcibios_align_resource To: Palmer Dabbelt Cc: linux-pci , "linux-kernel@vger.kernel.org" , Bjorn Helgaas , Christoph Hellwig , Arnd Bergmann , arcml , Cris , "linux-ia64@vger.kernel.org" , linux-s390 , Linux-sh list , sparclinux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Palmer, On Sat, Jun 24, 2017 at 3:50 AM, Palmer Dabbelt wrote: > Multiple architectures define this as trivial function, and I'm adding > another one as part of the RISC-V port. This adds a __weak version of > pcibios_align_resource and deletes the now obselete ones in a handful of > ports. > > The only functional change should be that a handful of ports used to > export pcibios_fixup_bus. Only some architectures export this, so I > just dropped it. > > Signed-off-by: Palmer Dabbelt This function is only ever used as a pointer passed to pci_bus_alloc_resource()? What about having #ifndef pcibios_fixup_bus #define pcibios_fixup_bus NULL #endif in asm-generic/pci.h, letting the architecture with a non-trivial implementation predefine the preprocessor symbol, and teaching pci_bus_alloc_resource() to handle NULL? [...] Oh, the latter eventually calls into allocate_resource(), which already falls back to simple_align_resource() if the alignment function is NULL, which does the same thing. So NULL should already work. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds