Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp124140pxb; Thu, 21 Jan 2021 03:05:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxz95YncdV49HFpyz/Ceb+PyzQhaqgdg7hMVENKGnNF/Axd/8H3yVj4rG9Ieg+ivnk2rG3k X-Received: by 2002:a17:906:1db2:: with SMTP id u18mr9104680ejh.440.1611227153206; Thu, 21 Jan 2021 03:05:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611227153; cv=none; d=google.com; s=arc-20160816; b=Uo9gOlmHe8/QXywIyaMQLEunUvhb0Bhw4wVHJyKS4KMZGOFvEcnwRoHzs5XgOZAtj/ KnwpQZdwz8EpwcGg4GFy8Doz65F+eOHWQ6ETRCq1ICbQpkV3Sf1DfPzW7S8H1PQUg5Jd CkVc1WgqAlp4LYpM79QZivrVEMiv9Rw/V/8Jw46jo/ewCdjJJhbw5/NYVmboG6wzPE4J AtTVAKqSVfyRH552HMz3uO1SeQHl+saSGOERjbsazXa+OM0hHYGJ/8wol81pBwb0esBi dvY0U3M1J5tJMG0FZ7MY5PfPO6wOzxxlYN0Kg9gocjuQOfA1GfG47Sm1MJNGORJKM8hj FudA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=B0t6IbQwZ6aPHm7zibBMR6oc08hDXRFl0UUCk6sC9bM=; b=MT10IrIiAVSgCGVxVdb8igXZjdtE+W4jgrDOtLgvwTER0YA6S4Zy9s9ReipCRxWC8V uYxhnoYGPUKTf1sBrWidHGVfNPUcuG1FSsm5p/uFYNJxJTJvFO4hVGzCwu5ib2FWKQ3S dfrK35pA9Ts/xa1W0L3zIoyXIPJJw4xtPfbCGQeB/bVz/OiGsMU1vAN1VBIxRXyH7UNj uwrmpBh0E8SkxRqczMprXzSEkaCv7lOWLSyVsSZ5lPluG20QFTbkiUu7JAPoQUJftokA 0FxcS5aBgLrg8EBgqvFnEVvK2HdOEl4RdnR4MeUV5d6TUKufUbFkBTNe5TQ1H+5ZfZ4Q w3qQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u19si2030173edo.465.2021.01.21.03.05.28; Thu, 21 Jan 2021 03:05:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730032AbhAULEc (ORCPT + 99 others); Thu, 21 Jan 2021 06:04:32 -0500 Received: from mail-ot1-f47.google.com ([209.85.210.47]:43254 "EHLO mail-ot1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730147AbhAULCl (ORCPT ); Thu, 21 Jan 2021 06:02:41 -0500 Received: by mail-ot1-f47.google.com with SMTP id v1so1186757ott.10; Thu, 21 Jan 2021 03:02:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B0t6IbQwZ6aPHm7zibBMR6oc08hDXRFl0UUCk6sC9bM=; b=s1JgGhMfGIEorKIkmY1uOCy6rhKZjEN2g/y0mH9xU7LfyBDaqKZx1HJGKIpsnnnCLl 1dtR+itgXotyc12XJWpqLnO8N0bSGyqqpcEFgKbc1X0xw6mZ38i6hUQJeQAX0dmcTK0Z PFaajorVROhs7lPXfqh1UJhZ1XzNSgKbUJyP3aNNZ953EyU9ozoxIUJOTHlC/s5flu2u VXh4VBAWiCPsruCtgqdHdL8XhI4d8D9fQSKdtidKQW5CDs2TLI3zFaXBUUQRD0mgV8Mc tnXT0l+Dfv0MkdRSzesm754R32j6Ge2zkW2wbd3vpAFghxAt8oPUb9V5fcXSG8ipsPap LSww== X-Gm-Message-State: AOAM531ORADILRmpCOpKYlpHVEntf40KPu3/+wMeSAfboTunr6pUuQo8 3LBP2hh7fbrtLsx/EhHzLLWUDdKwrEnjTe+EnOU= X-Received: by 2002:a9d:c01:: with SMTP id 1mr9868576otr.107.1611226921014; Thu, 21 Jan 2021 03:02:01 -0800 (PST) MIME-Version: 1.0 References: <20210120105246.23218-1-michael@walle.cc> In-Reply-To: From: Geert Uytterhoeven Date: Thu, 21 Jan 2021 12:01:50 +0100 Message-ID: Subject: Re: [PATCH] PCI: dwc: layerscape: convert to builtin_platform_driver() To: Saravana Kannan Cc: Michael Walle , Lorenzo Pieralisi , Roy Zang , PCI , LKML , Minghuan Lian , Mingkai Hu , Greg Kroah-Hartman , Bjorn Helgaas , linuxppc-dev , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Saravana, On Thu, Jan 21, 2021 at 1:05 AM Saravana Kannan wrote: > On Wed, Jan 20, 2021 at 3:53 PM Michael Walle wrote: > > Am 2021-01-20 20:47, schrieb Saravana Kannan: > > > On Wed, Jan 20, 2021 at 11:28 AM Michael Walle > > > wrote: > > >> > > >> [RESEND, fat-fingered the buttons of my mail client and converted > > >> all CCs to BCCs :(] > > >> > > >> Am 2021-01-20 20:02, schrieb Saravana Kannan: > > >> > On Wed, Jan 20, 2021 at 6:24 AM Rob Herring wrote: > > >> >> > > >> >> On Wed, Jan 20, 2021 at 4:53 AM Michael Walle > > >> >> wrote: > > >> >> > > > >> >> > fw_devlink will defer the probe until all suppliers are ready. We can't > > >> >> > use builtin_platform_driver_probe() because it doesn't retry after probe > > >> >> > deferral. Convert it to builtin_platform_driver(). > > >> >> > > >> >> If builtin_platform_driver_probe() doesn't work with fw_devlink, then > > >> >> shouldn't it be fixed or removed? > > >> > > > >> > I was actually thinking about this too. The problem with fixing > > >> > builtin_platform_driver_probe() to behave like > > >> > builtin_platform_driver() is that these probe functions could be > > >> > marked with __init. But there are also only 20 instances of > > >> > builtin_platform_driver_probe() in the kernel: > > >> > $ git grep ^builtin_platform_driver_probe | wc -l > > >> > 20 > > >> > > > >> > So it might be easier to just fix them to not use > > >> > builtin_platform_driver_probe(). > > >> > > > >> > Michael, > > >> > > > >> > Any chance you'd be willing to help me by converting all these to > > >> > builtin_platform_driver() and delete builtin_platform_driver_probe()? > > >> > > >> If it just moving the probe function to the _driver struct and > > >> remove the __init annotations. I could look into that. > > > > > > Yup. That's pretty much it AFAICT. > > > > > > builtin_platform_driver_probe() also makes sure the driver doesn't ask > > > for async probe, etc. But I doubt anyone is actually setting async > > > flags and still using builtin_platform_driver_probe(). > > > > Hasn't module_platform_driver_probe() the same problem? And there > > are ~80 drivers which uses that. > > Yeah. The biggest problem with all of these is the __init markers. > Maybe some familiar with coccinelle can help? And dropping them will increase memory usage. 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