From patchwork Sun Mar 19 04:35:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lizhe X-Patchwork-Id: 71708 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp595406wrt; Sat, 18 Mar 2023 22:45:45 -0700 (PDT) X-Google-Smtp-Source: AK7set9/rPFggAJbLOrLK6MXq31eGmAHe07KDDhp2xbzFXIIP5rgCkL/+o+qqRcVoFOrAiVtJx/e X-Received: by 2002:a05:6a20:699c:b0:cd:1808:87bb with SMTP id t28-20020a056a20699c00b000cd180887bbmr13442681pzk.7.1679204744914; Sat, 18 Mar 2023 22:45:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679204744; cv=none; d=google.com; s=arc-20160816; b=KIAaarT3hlw0G8d4z3EOyDsg9EdeXZgEXYvW7DYoSMorusw5BFCwdbu/5Qth18/9f8 Ts/39vaqKFMKMIs7/5VrbP3REwmsZA2uQ+x4hVbk9EijgpBjm97X6r2Cf5Zez+Ah6Iq6 erMZ1XuoohiH1stSInssGbhvAOMr+wDh+3r1VTvpd9b4KC5cO4mnJHfSS/fak1FEoA1h hYrRDcw+DbP5INEHsLutwoEsocNYiImnBwMz3RSSmfIhh2n/H14r6Ex4E23RGV1xiogv EiFBjEYU80uY99d3c1QtlaMuNIGaVhOyAXJI+Hh88Nkn+dcxYqx1RKP04BlHsC/ro2gy ijOw== 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=cG/PzLjXs6S3d9LvCwdUbAsZr8iqDclBzL43h6uvg28=; b=RdLhj9qHCkWQ968Ox7FSq0p1bQEX0u9ghYGL00otBlR3BgOD/q/LIsjerqEKiwhncm Ydy/YuoRuib8FLB86bll5vyR6qTLN57ut7uYGPVgJMmtgZMsVykxb0b0CSS9MBs7an7X V2rJ5/ZMyta31RTUEP7Lu4AALbYaiY5l8vRijCsoiLdo4j7R7yFGJc+MWDoTwO+Rh0Zj jkzaDbv1xt076twrrBcFixEojfADPPyTixbji1qdpEcxJkn9wOHZNwxKFwTIsd3YfRld iqHFhf3k94QJ/pRt4ntoZxoeVNaMfbnqf9Ul/3w9kDaVyuwxWiY4P8CMtXBoD+k+gvTp FtCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=SmmJJxBx; 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 p17-20020a631e51000000b0050be9448847si6922983pgm.680.2023.03.18.22.45.30; Sat, 18 Mar 2023 22:45:44 -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=SmmJJxBx; 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 S229921AbjCSEfy (ORCPT + 99 others); Sun, 19 Mar 2023 00:35:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbjCSEfx (ORCPT ); Sun, 19 Mar 2023 00:35:53 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C20AB1C32B; Sat, 18 Mar 2023 21:35:48 -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=cG/Pz LjXs6S3d9LvCwdUbAsZr8iqDclBzL43h6uvg28=; b=SmmJJxBx/HJmOnCTkKDeG DO6GWIiJlLXQUCGH7dcRDmVt5lbh8PURHOUz/H+WqzixjsaFNROk7AV26CAvpvNT 2ph6xP2T4orbEfSvHFQhWREFl1uo8feRxzpiGo7DSfJvQMkWpko7k9d7f+prdUdX RykagRXgN9lFhV7u/1D8Dg= Received: from lizhe.. (unknown [120.245.132.192]) by zwqz-smtp-mta-g4-2 (Coremail) with SMTP id _____wAXrjIHkRZka1HqAQ--.60798S4; Sun, 19 Mar 2023 12:35:40 +0800 (CST) From: Lizhe To: yangyingliang@huawei.com, michael.chritie@oracle.com Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Lizhe Subject: [PATCH] scsi:target:tcm_loop:Remove redundant driver match function Date: Sun, 19 Mar 2023 12:35:18 +0800 Message-Id: <20230319043518.297490-1-sensor1010@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CM-TRANSID: _____wAXrjIHkRZka1HqAQ--.60798S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jr1kAr4Dtr43CFyDXFWkJFb_yoWkCFX_Cr yxZrn7urn7u3WFyFsxu3y3ZryfKF1xWFn5KF4Fq393Kw47JryFvw4jqrnxJ3s8Zr1rJas0 93srXr1xAryftjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRNZ2-DUUUUU== X-Originating-IP: [120.245.132.192] X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/1tbiKAg3q17WMXCwVQAAsQ X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_VALIDITY_RPBL,SPF_HELO_NONE,SPF_PASS autolearn=no 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760773794693963510?= X-GMAIL-MSGID: =?utf-8?q?1760773794693963510?= If there is no driver match function, the driver core assumes that each candidate pair (driver, device)matches, see driver_match_device() Drop the bus's match function that always returned 1 and so implements the same behaviour as when there is no match function. Signed-off-by: Lizhe --- drivers/target/loopback/tcm_loop.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 139031ccb700..92475972acae 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c @@ -83,15 +83,8 @@ static int tcm_loop_show_info(struct seq_file *m, struct Scsi_Host *host) static int tcm_loop_driver_probe(struct device *); static void tcm_loop_driver_remove(struct device *); -static int pseudo_lld_bus_match(struct device *dev, - struct device_driver *dev_driver) -{ - return 1; -} - static struct bus_type tcm_loop_lld_bus = { .name = "tcm_loop_bus", - .match = pseudo_lld_bus_match, .probe = tcm_loop_driver_probe, .remove = tcm_loop_driver_remove, };