From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3A77CDB474 for ; Mon, 16 Oct 2023 08:57:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233094AbjJPI5u (ORCPT ); Mon, 16 Oct 2023 04:57:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233188AbjJPI5s (ORCPT ); Mon, 16 Oct 2023 04:57:48 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9277B107 for ; Mon, 16 Oct 2023 01:57:45 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id A1ED6E0008; Mon, 16 Oct 2023 08:57:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1697446663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8twWkfoS+52F5q11cAzMRnwRGmoKZNzcuZ6S/LXmAfQ=; b=LZibeEe4QaTLH4OeyVNbFipDRO00IrlycOnZ2v7eq2ca3kLq2GP29LSqEJGZ1tbAH1mmKO 5PHaZx0gNuH38LZx4qooqqjOkO06/y+UXKi/d9Fl3B03qMc5kRlK1lB7efc1snriXFoW0J fRBRIOxfbAFhEkuu+kvZKeqqschboD4afrU2Z0ejwpUVddwEK9wbwOXLUq3aoFpotu7jLp jjxuS635RUVLgjXQU1fnhDvGdnCQStG1+24nphrWUb/VmFP7G8CQpNq700jc3QMUPFqudr lUWcc0tXl9eixJ0+b3qxSP6sj86CUoS2CqVXwv8A+6h4cI6cjD5uw69ZpKCycQ== Date: Mon, 16 Oct 2023 10:57:37 +0200 From: Miquel Raynal To: "Arnd Bergmann" Cc: Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , "Masahiro Yamada" , "David Woodhouse" , linux-kbuild@vger.kernel.org, "Richard Weinberger" , "Atsushi Nemoto" , "Greg Kroah-Hartman" , linux-mtd@lists.infradead.org, "Pengutronix Kernel Team" , "Andrew Morton" , "Vignesh Raghavendra" Subject: Re: [PATCH 01/20] mtd: rawnand: txx9ndfmc: Mark driver struct with __refdata to prevent section mismatch warning Message-ID: <20231016105737.7b851d85@xps-13> In-Reply-To: <20231009153741.5b04a137@xps-13> References: <20231008200143.196369-1-u.kleine-koenig@pengutronix.de> <20231008200143.196369-2-u.kleine-koenig@pengutronix.de> <20231009103037.j44gkzqv7cpn4zpu@pengutronix.de> <20231009144610.4ff82afa@xps-13> <55a03e14-7a92-4cf0-82d4-5cbde64d69db@app.fastmail.com> <20231009153741.5b04a137@xps-13> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Hello, miquel.raynal@bootlin.com wrote on Mon, 9 Oct 2023 15:37:41 +0200: > Hi Arnd, >=20 > arnd@arndb.de wrote on Mon, 09 Oct 2023 15:01:17 +0200: >=20 > > On Mon, Oct 9, 2023, at 14:46, Miquel Raynal wrote: =20 > > >> On Mon, Oct 09, 2023 at 10:43:46AM +0200, Arnd Bergmann wrote: =20 > > >> > On Mon, Oct 9, 2023, at 09:22, Masahiro Yamada wrote: =20 > > >> > > On Mon, Oct 9, 2023 at 5:02=E2=80=AFAM Uwe Kleine-K=C3=B6nig > Can we instead question the use of module_p= latform_driver_probe()? =20 > > > I don't have the history in mind, but why not just switch to regular > > > module_platform_driver() registration instead? It seems like the > > > original authors just did not care about the remove path and were > > > happy to skip its implementation. > > > > > > On mtd devices one can argue that the flash underlying stores the > > > rootfs and thus cannot be removed, but I believe today this is a > > > questionable (software) design. =20 > >=20 > > It was changed to module_platform_driver_probe() in commit > > 3a2a13fa902d2 ("mtd: txx9ndfmc: use module_platform_driver_probe()") > > with a short changelog text: > >=20 > > commit 3a2a13fa902d232a1e56582647aed6cb2591349b > > Author: Jingoo Han > > Date: Tue Mar 5 13:31:24 2013 +0900 > >=20 > > mtd: txx9ndfmc: use module_platform_driver_probe() > > =20 > > This patch uses module_platform_driver_probe() macro which makes > > the code smaller and simpler. > > =20 > > Signed-off-by: Jingoo Han > > Signed-off-by: Artem Bityutskiy > > Signed-off-by: David Woodhouse > >=20 > > Instead of just simplifying the code, I think that was actually > > a bugfix because it prevented both the probe and remove callbacks > > from getting called after getting dropped (deferred probe or > > unbind/rebind). Using module_platform_driver() is probably > > even better here, but then we need to remove both the __init > > and __exit annotations. =20 >=20 > Agreed. >=20 > Thanks, > Miqu=C3=A8l FYI I've collected all the patches in this series except the txx9ndfmc ones. Thanks, Miqu=C3=A8l