[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yw3c9Dbai5E9Nvvp@shell.armlinux.org.uk>
Date: Tue, 30 Aug 2022 10:48:36 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Saravana Kannan <saravanak@...gle.com>
Cc: Zhen Lei <thunder.leizhen@...wei.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
patches@...linux.org.uk, Kefeng Wang <wangkefeng.wang@...wei.com>,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v2] ARM: Add sanity check for dev->periphid in
amba_probe()
On Tue, Aug 30, 2022 at 10:47:31AM +0100, Russell King (Oracle) wrote:
> How can we get to amba_probe() if amba_match() has not returned a
> positive match for an ID? Surely if that happens, the driver model
> is failed - since a probe function should not be called unless the
> driver matches the device.
>
> This patch, and 9229/1 both feel like they're working around some
> brokenness elsewhere in the kernel.
>
> The description in 9229/1, specifically "But not all drivers have .match
Sorry, meant 9238/1.
> hook, such as pl031, the dev->bus->probe will be called directly in
> __driver_attach()." AMBA drivers do not have a .match hook - the bus
> does, which all AMBA drivers must be a member of. If amba_match fails,
> there is no way that amba_probe() should ever be called.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists