Re: [PATCH] drivers/base/faux: Remove unnecessary match callback
From: Greg Kroah-Hartman
Date: Thu Jul 24 2025 - 07:37:22 EST
On Thu, Jul 24, 2025 at 06:37:23PM +0800, Liya Huang wrote:
> The faux_match() function always returns 1, indicating a successful match.
> The driver core function driver_match_device() already handles this case
> by defaulting to 1 if the bus->match callback is NULL.
>
> The implementation in driver_match_device() is:
> return drv->bus->match ? drv->bus->match(dev, drv) : 1;
>
> Therefore, the faux_match() callback is redundant and can be removed to
> simplify the code, with no change in functionality.
>
> ---
> drivers/base/faux: Remove unnecessary match callback
>
> The faux_match() function always returns 1, indicating a successful match.
> The driver core function driver_match_device() already handles this case
> by defaulting to 1 if the bus->match callback is NULL.
>
> The implementation in driver_match_device() is:
> return drv->bus->match ? drv->bus->match(dev, drv) : 1;
>
> Therefore, the faux_match() callback is redundant and can be removed to
> simplify the code, with no change in functionality.
Why is the changelog text here twice? How did git send-email get this
wrong?
confused,
greg k-h