Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp707240pxb; Wed, 20 Jan 2021 19:23:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgFBBKBPLjbYLBdXDnuyIU47OWQGfKRUASsV49GzZMoyF4p9db9JrOzSS+UBB3VV8vfBnO X-Received: by 2002:aa7:dac4:: with SMTP id x4mr7014332eds.192.1611199408270; Wed, 20 Jan 2021 19:23:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611199408; cv=none; d=google.com; s=arc-20160816; b=fpw29VjsoVFU2knCWOqC9zvVA37ZrzXEmRgpIVKRDaj9Bg77KIVKvEF64SC1eYW8Bo sB78iziiUQx+0Gc8kWjxpSPJGqQ4QiivEFePvIXyrJrkbscXHDHCS3aHcTvtrqzG2VRf NOU0SZY8I7hBzV3sjBUITfF9u3N8pPvZDPw+LGoOLHUWS/LCuLImjg1sG3SdfLHlJ9iA 42DIQTVSrGQwYIyf7178UHTPyXVsfi7mnuVytih/gtCS4vYIDKn249uF8h0t8CH/66Br Qf1GlGiY5kefYX5bUeHsyozPcLk6n9aBpraLpLOVNFL6ARg3ICuWMkW1w+g+MkWG1REm axBg== 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:dkim-signature; bh=bjNWVbslUhdSMJg6quM5f9vJqYwBuRMO9foprozwioc=; b=JXShRVm/3hMkJ/t6CtalJRVnpL2nehXc8myKo/IVew27rc9auKCXVYPXOfrsvUP8qR QWrfahjc0LDl8V+FgCkOcOdxHZkMe764A6/5cSObhIt2O3DbpWKQGJ6KUjC8vkxaSrM4 twTHXhB9KRjWSftAoxxQZI1X2eAihnHBh7BpnRhNIuwIT8Fx8rz8llTYWa635Zd8wQ89 b+QFk08xOqFXU/auYBRRCL7C9V5mfK2dv2gwlINVP2XmWgqwIjaTD6TxVjDQ2QfIc9lB Hg6FsAcf5z+rY5Vb+OeaE3pYk5g9C6sRFz9dVN1nuPU53zTFZ5oSrrP3EhFlseJANXGu doaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ffW3hc4L; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn23si1476221edb.27.2021.01.20.19.23.05; Wed, 20 Jan 2021 19:23:28 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=ffW3hc4L; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728116AbhAUAvn (ORCPT + 99 others); Wed, 20 Jan 2021 19:51:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728929AbhAUAA2 (ORCPT ); Wed, 20 Jan 2021 19:00:28 -0500 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DD77C0613C1 for ; Wed, 20 Jan 2021 15:59:03 -0800 (PST) Received: by mail-yb1-xb31.google.com with SMTP id y4so369781ybn.3 for ; Wed, 20 Jan 2021 15:59:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bjNWVbslUhdSMJg6quM5f9vJqYwBuRMO9foprozwioc=; b=ffW3hc4LnwwviIoGoe5gnQflzXCd9cYZdMHOoXum4nNbQJvSCC2AfWclS2wU/au9de CFRJUjnnhMitRBSu7S3m1/DZy+pxT7lr6QGCTwyNFsjyN9nB4rQa2RwDFVKSQldHo20t TSaB19bBSSSneWcjrQvt1mrcSxut+vop26XwhsLB4836gzQMg5Itas4U1iMBYR4Ce63y 2DAFnXsicdrem0orFA6VQTXVbdXmnJN8xiDo6IjoKhbUluKAbEltdsYNJc7OtM3K5s25 EdP3oDR0uFcuTNrtyDOjvUyHFnNrPeTeyqMioYmbHubqagHho7lrZ/++FzLpqNwNm/Nf i4cg== 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=bjNWVbslUhdSMJg6quM5f9vJqYwBuRMO9foprozwioc=; b=FGqbBRALDVE34F3KQ3zA3rF71f9cLWwsRPEa+95hRdSISL1+KTUNbNOm87buHe2IEp tKu2SbQ1sHSajzH24URdAZTmmSn5IEEc6/kSoMP8TZKHrbLVBlSqUYj0D7cU06qZtI/q yrCbZPmDw4IxOLzDMewuuKkvCAThOzUhUCo/hehkvb1tJmSkV3i35LTbaGfEZ7l8gBTG BZs8kp6w12yt+4vV8ck/6FQ7qmu/2Ca24XZ/DCgNtVxuTQIQwUw7gT6xE9tL99ggX3NV FnQjaI6Jc20ah5Gplh9oMQUVs5opZIIqHgkqc7/ePlLRAZn521pYMpP1IIKM3DI7xvtc rY5A== X-Gm-Message-State: AOAM532YI3NsZ1fGYoOSh9ODUzZJBnh4/Zlu5a6N0+03sigqUS6qkSp2 dqsqKZ1HmFHGCebC6xMplaM7OtdVaS+yzpk0LCyOFA== X-Received: by 2002:a25:dfcb:: with SMTP id w194mr13618ybg.346.1611187142006; Wed, 20 Jan 2021 15:59:02 -0800 (PST) MIME-Version: 1.0 References: <20210120105246.23218-1-michael@walle.cc> In-Reply-To: From: Saravana Kannan Date: Wed, 20 Jan 2021 15:58:26 -0800 Message-ID: Subject: Re: [PATCH] PCI: dwc: layerscape: convert to builtin_platform_driver() To: Michael Walle Cc: Rob Herring , linuxppc-dev , PCI , linux-arm-kernel , LKML , Minghuan Lian , Mingkai Hu , Roy Zang , Lorenzo Pieralisi , Bjorn Helgaas , Greg Kroah-Hartman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -Saravana