From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5D3BC282CE for ; Tue, 4 Jun 2019 06:51:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8319624D8F for ; Tue, 4 Jun 2019 06:51:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726773AbfFDGvG (ORCPT ); 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