Message ID | 20230319041941.259830-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 j10csp582884wrt; Sat, 18 Mar 2023 21:54:14 -0700 (PDT) X-Google-Smtp-Source: AK7set/WMa+A69YhusfpZRs26zZRNPvarERRnwwOv5ezYwIyFEQo9Mvrz3z1SsTR8YVHF1aydylw X-Received: by 2002:a17:90b:4c88:b0:23d:5040:a88d with SMTP id my8-20020a17090b4c8800b0023d5040a88dmr13639568pjb.14.1679201654484; Sat, 18 Mar 2023 21:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679201654; cv=none; d=google.com; s=arc-20160816; b=zi7b1pRil6g5duHTC3q49l1Bc/iER+AEfFobHnLwWZ/HezHMv38IeEq3XA5kmr0Ek7 GlKsaiL+jiGIpJMS0gz2d+idvYAvCf9ATxXSn34xf9cx2rlnSyNtFj3iMglkcmnJ95bC x+J5Q1sPKABjNGn7YJsXrYe74F315JDY+8WbpHE63kUeKuEk4vhHw5R2SMiQTk0SOXa2 vdcLJU4YABW2AWTWoYKz9F+41JL7js8E8iJZfR2nDSOFxTLlZ+fPAX2xzHiUb7Xiz79z XhPn0NdU9xorj6sLMREWU45DdVv+sKJFc/YBjRwHBu7JASMisjGzxCibr3N5Njjm1bSe K7Tw== 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=IP8Op5NYAZpLD4TuJdEpRPmgpBXAldqWHpEXpQ6dDHs=; b=W7aYfrKsPNAZpTXcGphGW4gCbt+4YS4sCtim0+AaNi4RBXEj1iAAvzvEDQ3NEl1IIV yVaFpchh9M3zFps1ze2MrPcpWVaoinINmrahCuwQ/2PFK9dbjG58ooON/FYHiU/yaBbF /aH/hwn96vkeIjnNTmBt4qCx+6rQjmc3/J2/WmUpjBVTEzNthQqmVvqVSWAXznoCpMAt OLJq5EfNGlX/mTxFauyMnvjJqWdDRWPIfpFfCc5EaA5hDlzg+3h/Z01Wbics+1Bpc2Ua bVpz1r7EMhf7ThsyqzqIEs39RlZXEF2AJilCNQQ3DZt08UXoCIwTUfkAbmtdoNEA/QiR 6CAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=ODawpGsd; 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 r11-20020a17090a560b00b0023b2b355352si6531834pjf.130.2023.03.18.21.53.56; Sat, 18 Mar 2023 21:54:14 -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=ODawpGsd; 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 S229958AbjCSEUj (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Sun, 19 Mar 2023 00:20:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbjCSEUh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 19 Mar 2023 00:20:37 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 783D9222CC; Sat, 18 Mar 2023 21:20:33 -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=IP8Op 5NYAZpLD4TuJdEpRPmgpBXAldqWHpEXpQ6dDHs=; b=ODawpGsdlI2arK2+moZRm GWo/R8/X7bIPTDnsTdcVzOIhHWExIgOknlYc6+8REYoAWuSkNGqkVLardOn5M0N1 z6umcmRbRDpD5qZ1fjlO9CXZ7SFADW6Cv7XZznYZGgaZPWp8+tstT+b9CI0F4ubW o2Mk0o/J0dyQLYJXlwpA1U= Received: from lizhe.. (unknown [120.245.132.192]) by zwqz-smtp-mta-g3-4 (Coremail) with SMTP id _____wCHx69ejRZkU1WuAQ--.31804S4; Sun, 19 Mar 2023 12:20:18 +0800 (CST) From: Lizhe <sensor1010@163.com> To: akrowiak@linux.ibm.com, pasic@linux.ibm.com, jjherne@linux.ibm.com, freude@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Lizhe <sensor1010@163.com> Subject: [PATCH v1] s390/vfio-ap-drv: Remove redundant driver match function Date: Sun, 19 Mar 2023 12:19:41 +0800 Message-Id: <20230319041941.259830-1-sensor1010@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wCHx69ejRZkU1WuAQ--.31804S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jr4UtFy8tF15GF4UXr4DXFb_yoWDXrX_C3 y8Xrn7Wr1j9w1fta48XrW7Z3sF9w4kXFZagrsYq3sag3W7Jr1DuFZF9rnrW34jqrW7Aa9x W3yUJr40yr12gjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRKSdyUUUUUU== X-Originating-IP: [120.245.132.192] X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/xtbBogk3q1aEHrmpOgAAsR 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: <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?1760770553846600446?= X-GMAIL-MSGID: =?utf-8?q?1760770553846600446?= |
Series |
[v1] s390/vfio-ap-drv: Remove redundant driver match function
|
|
Commit Message
Lizhe
March 19, 2023, 4:19 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().
Drop the matrix 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 <sensor1010@163.com>
---
drivers/s390/crypto/vfio_ap_drv.c | 6 ------
1 file changed, 6 deletions(-)
Comments
Reviewed-by: Tony Krowiak <akrowiak@linux.ibm.com> On 3/19/23 12:19 AM, Lizhe wrote: > If there is no driver match function, the driver core assumes that each > candidate pair (driver, device) matches, see driver_match_device(). > > Drop the matrix 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 <sensor1010@163.com> > --- > drivers/s390/crypto/vfio_ap_drv.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c > index 997b524bdd2b..9341c000da41 100644 > --- a/drivers/s390/crypto/vfio_ap_drv.c > +++ b/drivers/s390/crypto/vfio_ap_drv.c > @@ -59,14 +59,8 @@ static void vfio_ap_matrix_dev_release(struct device *dev) > kfree(matrix_dev); > } > > -static int matrix_bus_match(struct device *dev, struct device_driver *drv) > -{ > - return 1; > -} > - > static struct bus_type matrix_bus = { > .name = "matrix", > - .match = &matrix_bus_match, > }; > > static struct device_driver matrix_driver = {
On Sun, Mar 19, 2023 at 12:19:41PM +0800, Lizhe wrote: > If there is no driver match function, the driver core assumes that each > candidate pair (driver, device) matches, see driver_match_device(). > > Drop the matrix 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 <sensor1010@163.com> > --- > drivers/s390/crypto/vfio_ap_drv.c | 6 ------ > 1 file changed, 6 deletions(-) Applied.
diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c index 997b524bdd2b..9341c000da41 100644 --- a/drivers/s390/crypto/vfio_ap_drv.c +++ b/drivers/s390/crypto/vfio_ap_drv.c @@ -59,14 +59,8 @@ static void vfio_ap_matrix_dev_release(struct device *dev) kfree(matrix_dev); } -static int matrix_bus_match(struct device *dev, struct device_driver *drv) -{ - return 1; -} - static struct bus_type matrix_bus = { .name = "matrix", - .match = &matrix_bus_match, }; static struct device_driver matrix_driver = {