From patchwork Sun Mar 19 04:27:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lizhe X-Patchwork-Id: 71707 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp595288wrt; Sat, 18 Mar 2023 22:45:16 -0700 (PDT) X-Google-Smtp-Source: AK7set/iby9TPOSNwz7REr9YfTlictiJNNbuhBoHXrlpUOVEZFhWh13NRz0EzqiH8ciATvvJzHvb X-Received: by 2002:a05:6a20:65a2:b0:d6:a2f9:ca9a with SMTP id p34-20020a056a2065a200b000d6a2f9ca9amr11105274pzh.42.1679204715923; Sat, 18 Mar 2023 22:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679204715; cv=none; d=google.com; s=arc-20160816; b=Ted4Hmqi8XT4Bw4sWMdXyg+Rn6yYej73cd/v77fsk8ZYupVUjcfDmNPtqzvER2TmFy vARp48qz4VDqlwd7b6nwFZi7ZOXD521S1fboXZ0nscIP6q5sws9QCdSE7VX9V1VDALdU gdYhMIFcL63HEZZEo3NFj6k/BxgPxbPlHiD3QjvYTRnuvZkSBjSsSgB1DMb9TuW2D80v jYP2cKsaHJYEZAljD8vOGusN7ezNkuiEfhdMFU9eBdJSr5BeIVK+Non4Pg3xb34XpXjt 30kedopxGoXOkQmSLm1kNHFboRMuXJAflbeGV4A+oDFE0x0SsEZb9a3hSa7R0sR5iN3x UwpA== 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=9FbnTAjA5B6RRdoMYtIDm7Imv8oR58PlaeRgwtUFegM=; b=vX5vRCwJDgpuXQHcWzB6Ta12HDfzzHtBJgyVWtKbnwfR9wzDNjtHlVTm8RU0AY5+7Y PzAMVWoJg4GM8I94gUbU4OCYqaFOTh4OAwZJu/0f1qgngAHfdsalXclaj02SZQwNJVzc tX8KmTLeXwfH+gv4EBvQpXwjpDQsaOmwDTg9NZn2nXCjMmt5thAqTEzliWTY7O6uGqVI ReYTrJfd+OvKi9DaYaBWtq+k4HKgXA9LT6piQ3Ul4DpNzi3CsTxSVUvNSOLRNuIYLsC8 YjVNQ42tBWD8HHPRfg7ASrfIO/IPOnqMzOasfT/JIqHOZWjIORpeKjwTcl6Qj2HO34KM 0Qog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=JWjVLMIq; 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.01; Sat, 18 Mar 2023 22:45:15 -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=JWjVLMIq; 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 S229978AbjCSE2I (ORCPT + 99 others); Sun, 19 Mar 2023 00:28:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbjCSE2H (ORCPT ); Sun, 19 Mar 2023 00:28:07 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 02C24A5C2; Sat, 18 Mar 2023 21:28:02 -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=9FbnT AjA5B6RRdoMYtIDm7Imv8oR58PlaeRgwtUFegM=; b=JWjVLMIqacWdTTh6b33MF zPc84cV4fstNStSSwRuNN37hXJZ7/oND0eWg2eeLcCTkJxk2W5D8UGF79wyzsphm DjgZ9jP2pcfy5OvQpUcURw1tGPB/MRO/d7ac3cQu6lEZWt2jSHrGJbm5z1Ug0mAp EAlG5DyD4tfauKLW2fviH4= Received: from lizhe.. (unknown [120.245.132.192]) by zwqz-smtp-mta-g4-2 (Coremail) with SMTP id _____wAntjI1jxZky9HpAQ--.60522S4; Sun, 19 Mar 2023 12:27:55 +0800 (CST) From: Lizhe To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Lizhe Subject: [PATCH v1] scsi: scsi_debug: Remove redundant driver match function Date: Sun, 19 Mar 2023 12:27:32 +0800 Message-Id: <20230319042732.278691-1-sensor1010@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CM-TRANSID: _____wAntjI1jxZky9HpAQ--.60522S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jr4UGr4UCFWUGF43Aw1UJrb_yoWDZrXE93 yavFn7Wr1fKF18t3Z3Gr47ZFZF9ayUJFWv9F4Fq3savw1xXryvv3yDZrnrXw45X3ykJa9r uw1DZr40v3yUXjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRNtC7UUUUUU== X-Originating-IP: [120.245.132.192] X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/1tbiSAQ3q1+FhPx5fwABs1 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760773764239611683?= X-GMAIL-MSGID: =?utf-8?q?1760773764239611683?= If there is no driver match function, the driver core assumes that each candidate pair (driver, device) matches, see driver_match_device() Drop the pseudo_lld 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 Reviewed-by: John Garry --- drivers/scsi/scsi_debug.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 8553277effb3..fa6f150b7364 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -7950,15 +7950,8 @@ static void sdebug_driver_remove(struct device *dev) scsi_host_put(sdbg_host->shost); } -static int pseudo_lld_bus_match(struct device *dev, - struct device_driver *dev_driver) -{ - return 1; -} - static struct bus_type pseudo_lld_bus = { .name = "pseudo", - .match = pseudo_lld_bus_match, .probe = sdebug_driver_probe, .remove = sdebug_driver_remove, .drv_groups = sdebug_drv_groups,