Message ID | 20230319040149.216919-1-sensor1010@163.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp572070wrt; Sat, 18 Mar 2023 21:09:08 -0700 (PDT) X-Google-Smtp-Source: AK7set8Dngl9bRW6HSp5HS08vpLrOxHhn+NqLMQF0tlGrzg0ZzyY7VnP+UU4lG3JK/N5sUtM37hD X-Received: by 2002:a05:6a20:3d92:b0:cc:ca9:4fde with SMTP id s18-20020a056a203d9200b000cc0ca94fdemr16320685pzi.33.1679198948249; Sat, 18 Mar 2023 21:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679198948; cv=none; d=google.com; s=arc-20160816; b=wSg8e52wSMPaxOY8qvE7BPWl9hr+SRsGN+IOXB9MTRfMVrpYhm/5cBRa34jJeDUGxY 5ofOHn+bGNEpIZDLCL5bcgwp+1NF6bx9XjSOT0fjkzqCL5vq/1QPdpXUR2/s5+cckw7L te0hFbODHJ5A3m21Pe/rT6X6sZbmyiLlFLdQ+keeRaXZN53mEcLo5iVXM1qUlGtX6NHG eYPT2KVt7Yzk3ZPAPdRMNSuNhTSsNL3AsZ4HMPE6h/BWmBC+d4P1bv0RPJTikKQXYNvn c+sfBfd2RcXu5rEEy6fhj4MgUoLLLT3a9EEEI02IlqfcBcnkJfpPImXQLGWuiK7H4HnQ /O0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=M3F5c23yEAb6RmFCWHC++naieRb90y1zO1aTuCoWokQ=; b=Qz1X/8FfZfpPcEME8P+OE6BtoxRfFOo17xOjwl1wBRVWeUStnvFbd5K6jBswH21OGV v9Hgku18fK0/FoAE49L1/2mmKUulhHinHz2Q5GoELX5UEQ2iXUxKdnRopOVrsEWD8zmg oQv9Sv6XuDM17t+qs6j0TicFLB94agrXOeWW9mgRSV5xZlWDKxq2JhJcFu9u5Z11+KTe +UHtXXQdLEvEbKy1xO2bYV9S4HyEENazLqqx3TBpbp5lDL6J0MaEbr2kmceJZBnlO8Q9 p2DM+WHxXZabXGncd7qFp2qs5w9b7PxjEMf5+HN4t8xk07tIz7UYoStukrPPYtRG1e2h 99QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=D5yDxSKv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a056a00170200b00623b50eb7d0si7807330pfc.214.2023.03.18.21.08.55; Sat, 18 Mar 2023 21:09:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=D5yDxSKv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbjCSEDP (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Sun, 19 Mar 2023 00:03:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjCSEDN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 19 Mar 2023 00:03:13 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C7F8F12588 for <linux-kernel@vger.kernel.org>; Sat, 18 Mar 2023 21:03:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=M3F5c 23yEAb6RmFCWHC++naieRb90y1zO1aTuCoWokQ=; b=D5yDxSKvkru507DhW69CM pOiVjrtxnzgWP/ZlpUmI7xjIyXpo9Zr+qLtixLa741N7zDYYoe6Gbu6MVJuptvUa dVkaqDdkwL2IWHCvI9GdnYfr4WmeBQB/G2F2f8w/yOhhxMNdUlFqHMGDnU/RsDRn JCob0OuuYXw0sjwAqG3/rI= Received: from lizhe.. (unknown [120.245.132.192]) by zwqz-smtp-mta-g1-3 (Coremail) with SMTP id _____wAXvegviRZksTGxAQ--.36162S4; Sun, 19 Mar 2023 12:02:48 +0800 (CST) From: Lizhe <sensor1010@163.com> To: lee@kernel.org Cc: linux-kernel@vger.kernel.org, Lizhe <sensor1010@163.com> Subject: [PATCH v1] mfd:mcp-core.c : Remove redundant driver match function Date: Sun, 19 Mar 2023 12:01:49 +0800 Message-Id: <20230319040149.216919-1-sensor1010@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wAXvegviRZksTGxAQ--.36162S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jr1kZF4kWr1kGFyUWw1kGrg_yoWDXrc_ua 4Yvr97Wrs8G3WfKan7Xrn7Zr97trsFqr4rKa10q393A34xWF1Uuw4DZry3J34rurWkZFZr Z3yDXr4xuFW7tjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRCxRh5UUUUU== X-Originating-IP: [120.245.132.192] X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/1tbiSAU3q1+FhPxjlAAAsE X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760767716307914572?= X-GMAIL-MSGID: =?utf-8?q?1760767716307914572?= |
Series |
[v1] mfd:mcp-core.c : Remove redundant driver match function
|
|
Commit Message
Lizhe
March 19, 2023, 4:01 a.m. UTC
If there is no driver_match function, the driver core assumes that each
candidate pair (driver, device)matches, see driver_match_device()
Signed-off-by: Lizhe <sensor1010@163.com>
---
drivers/mfd/mcp-core.c | 6 ------
1 file changed, 6 deletions(-)
Comments
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 [李琼斯]
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, };