From: Lee Jones <lee@kernel.org>
To: Lizhe <sensor1010@163.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] mfd:mcp-core.c : Remove redundant driver match function
Date: Thu, 30 Mar 2023 12:02:46 +0100 [thread overview]
Message-ID: <20230330110246.GY2673958@google.com> (raw)
In-Reply-To: <20230319040149.216919-1-sensor1010@163.com>
As a nice exercise, I'd like you to fix the subject line please.
It should match the subsystem you're applying to, with no errors.
`git log --oneline -- drivers/mfd` is your friend here.
On Sun, 19 Mar 2023, Lizhe wrote:
> If there is no driver_match function, the driver core assumes that each
> candidate pair (driver, device)matches, see driver_match_device()
Attention to detail please. This contains whitespace issues and a lack
of punctuation.
> Signed-off-by: Lizhe <sensor1010@163.com>
You should really be using your full name.
> ---
> drivers/mfd/mcp-core.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/mfd/mcp-core.c b/drivers/mfd/mcp-core.c
> index 2fa592c37c6f..281a9369f2b3 100644
> --- a/drivers/mfd/mcp-core.c
> +++ b/drivers/mfd/mcp-core.c
> @@ -20,11 +20,6 @@
> #define to_mcp(d) container_of(d, struct mcp, attached_device)
> #define to_mcp_driver(d) container_of(d, struct mcp_driver, drv)
>
> -static int mcp_bus_match(struct device *dev, struct device_driver *drv)
> -{
> - return 1;
> -}
> -
> static int mcp_bus_probe(struct device *dev)
> {
> struct mcp *mcp = to_mcp(dev);
> @@ -43,7 +38,6 @@ static void mcp_bus_remove(struct device *dev)
>
> static struct bus_type mcp_bus_type = {
> .name = "mcp",
> - .match = mcp_bus_match,
> .probe = mcp_bus_probe,
> .remove = mcp_bus_remove,
> };
The code is fine.
--
Lee Jones [李琼斯]
prev parent reply other threads:[~2023-03-30 11:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-19 4:01 [PATCH v1] mfd:mcp-core.c : Remove redundant driver match function Lizhe
2023-03-30 11:02 ` Lee Jones [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230330110246.GY2673958@google.com \
--to=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sensor1010@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox