Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5046569ybi; Mon, 3 Jun 2019 23:52:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwL/a5WbuJ9DGC1SC8nHV4j49Jbw+RaaLppMi8oWPQ0eU4oKtQlLULgbZh8uHqzm834Woa1 X-Received: by 2002:a63:2848:: with SMTP id o69mr33350722pgo.258.1559631149860; Mon, 03 Jun 2019 23:52:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559631149; cv=none; d=google.com; s=arc-20160816; b=Et8ZQFI1UJgklx18XuAgVrgUY+S+mps2J/F+MHjd6ZvshMMrtTeWIhi5LvM8lu8iff 6UhOBI4d85jgd0pSyf+WPAiUmhokGi+5ihqX6Sh7jfvQVzp5/2in5JM0RAg5yB+QRMRi z5sdgdbHDs1dQN5uK43YQiW4FiHYU1Qj5nDbKOSRAuK8tyleLAKFp7b0+meGcSeGCvVG xK0Hu7Eqpch14Tj8SzvPtuhKBg4lVWCnQrhqgOqvyni7D8YbcAe6PaO+M7cQd6UJgcfU aZGNWte9jm4c45zk4rvGh8iLLX3kC5/CAkcexx8S+SB1We00O5LLhgLqXJPpj72ZS07I GymA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject; bh=qw2xSJ3fxYMi/MOE3EmzwZ+X082ekYuf7RbNk6ABklI=; b=RwFvdVtWj23z/Shiah7axZkAmzSJeaavRY3dFDzWU+s7LKHdYQcv5Ut7dXOztSMRg2 pMwYtAzlENNg5ZijxsEkFVjJkElwJw1c6/NYMeMhTpg+POkJ5WiJdqYAECO/Op0+2nbp 4Z74XPbvukFgXttQaL9HC1hiUk0J8+C626lPeLPQdlgKRQbMz258W79W3k3GhBNpN3pg G9NLzf7dyvrPrualLPyjh35xPNJRROjKbm7MyjsnsOMoWycjGJxIpQyVadu2cIcGr7UP khU9ApmtG3IR9i7PbtX4oOQRCucVvnlHWFtN8ycaXbh7Yk+iFZu0DTIQMeaLvGY7En13 2NAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1si21942668pjb.8.2019.06.03.23.52.12; Mon, 03 Jun 2019 23:52:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726744AbfFDGvG (ORCPT + 99 others); Tue, 4 Jun 2019 02:51:06 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:35064 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726410AbfFDGvG (ORCPT ); Tue, 4 Jun 2019 02:51:06 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x546p0fq094741 for ; Tue, 4 Jun 2019 02:51:05 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0b-001b2d01.pphosted.com with ESMTP id 2swhyh3rs0-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 04 Jun 2019 02:51:02 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 4 Jun 2019 07:47:19 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 4 Jun 2019 07:47:15 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x546lEVk51904578 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 4 Jun 2019 06:47:14 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5DBA742042; Tue, 4 Jun 2019 06:47:14 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D8B142049; Tue, 4 Jun 2019 06:47:14 +0000 (GMT) Received: from [10.0.2.15] (unknown [9.152.224.114]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 4 Jun 2019 06:47:13 +0000 (GMT) Subject: Re: [RFC PATCH 37/57] drivers: s390: zcrypt: Use class_find_device_by_devt helper To: Suzuki K Poulose , linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, Heiko Carstens References: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> <1559577023-558-38-git-send-email-suzuki.poulose@arm.com> From: Harald Freudenberger Date: Tue, 4 Jun 2019 08:47:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1559577023-558-38-git-send-email-suzuki.poulose@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 19060406-0016-0000-0000-00000283A3A9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19060406-0017-0000-0000-000032E0B1AF Message-Id: <612184c9-a845-c569-b527-08523091e3bf@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-04_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906040046 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03.06.19 17:50, Suzuki K Poulose wrote: > Use the generic helper to find a device matching the devt. > > Cc: Harald Freudenberger > Cc: Heiko Carstens > Signed-off-by: Suzuki K Poulose > --- > drivers/s390/crypto/zcrypt_api.c | 11 +---------- > 1 file changed, 1 insertion(+), 10 deletions(-) > > diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c > index 16cad8e..99c9b77 100644 > --- a/drivers/s390/crypto/zcrypt_api.c > +++ b/drivers/s390/crypto/zcrypt_api.c > @@ -133,12 +133,6 @@ struct zcdn_device { > static int zcdn_create(const char *name); > static int zcdn_destroy(const char *name); > > -/* helper function, matches the devt value for find_zcdndev_by_devt() */ > -static int __match_zcdn_devt(struct device *dev, const void *data) > -{ > - return dev->devt == *((dev_t *) data); > -} > - > /* > * Find zcdn device by name. > * Returns reference to the zcdn device which needs to be released > @@ -159,10 +153,7 @@ static inline struct zcdn_device *find_zcdndev_by_name(const char *name) > */ > static inline struct zcdn_device *find_zcdndev_by_devt(dev_t devt) > { > - struct device *dev = > - class_find_device(zcrypt_class, NULL, > - (void *) &devt, > - __match_zcdn_devt); > + struct device *dev = class_find_device_by_devt(zcrypt_class, NULL, devt); > > return dev ? to_zcdn_dev(dev) : NULL; > } fine with me, thanks acked-by: Harald Freudenberger