Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5043187ybi; Mon, 3 Jun 2019 23:47:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8KXmVTrvndhLoD+jMcLQNkj9mTYyhL1OanLux+dIocBlalrLkK8Ehbo9ODMEH3IUwVF95 X-Received: by 2002:a63:6a49:: with SMTP id f70mr9204600pgc.55.1559630856782; Mon, 03 Jun 2019 23:47:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559630856; cv=none; d=google.com; s=arc-20160816; b=sGC/jzNxv+IDlXfv1BrybCcwX/41PLO0gaYC3XoI1chj6YkZv9MbYp9ZPWfauLrilk vtE+xh+dVdGuWFl7ora9Ikek/1F3Oh130XHEQyYCMy/ymMQ33AIJObYLSyxUPj12BNI1 Ctif9dtVNfuY3xU4tY9zRENt7LddVwrbTFZnLPzl2b3riJ/4pgnfYE2NLbMNDW64ObRq epON5aZH1qwKnHGgvFRNgyYHacEoBqfEP2zcA+sUjzlyyPPTXLnEM6bxWagNThxOQ/iN zsS3ZgzacF7/G/KVmcGDA1hDWdHekgksGJDN4lrk2juVVX6g9xw6smv5R8XrvgdUP1nh preQ== 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=tm0LzN4uhyFif3YVOVRvjiv+aqLUh7NQJV5Ih/9SIQM=; b=eCkbRZ5UztFT0gUjxwBstNMcOmnHD/holA8pCWuoarNdXX7i0M0t+jTMafWxR/5cI3 XzeLv0sE4NE+g/4FORKi6Rj0jC6bqiHuAU3I6leoxmRhVMBiyie/3MmMMS+pA1FzCPl3 6ImIw2G61mew+gmHaOUaL6t1R80sbz6USnviydgCMi0SmhQWG0+dBH/ba20Q6H1Mh6AS G8Cy48ZTYTiPW8I4K3wt8D7xqoHgFtAIaCvWza4zPz63I1SGTCqbhHsME/Kj7ah2Tkd9 Txi1uDVSZxNOFqhJWZ3Gm2/CpZWXo3tlXrXWJdjQa3EOCYQfs2uBlK1LJLyJano6oekM wC1w== 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 a13si22116818pgl.508.2019.06.03.23.47.20; Mon, 03 Jun 2019 23:47:36 -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 S1726844AbfFDGqG (ORCPT + 99 others); Tue, 4 Jun 2019 02:46:06 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:37240 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726694AbfFDGqF (ORCPT ); Tue, 4 Jun 2019 02:46:05 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x546hLH8128811 for ; Tue, 4 Jun 2019 02:46:04 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2swjgntr1a-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 04 Jun 2019 02:46:04 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 4 Jun 2019 07:46:02 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp07.uk.ibm.com (192.168.101.137) 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:45:58 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x546jwk752035712 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 4 Jun 2019 06:45:58 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E576F42045; Tue, 4 Jun 2019 06:45:57 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9B4DD42041; Tue, 4 Jun 2019 06:45:57 +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:45:57 +0000 (GMT) Subject: Re: [RFC PATCH 32/57] drivers: s390-crypto: Use class_device_find_by_name() helper To: Suzuki K Poulose , linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, Martin Schwidefsky , Heiko Carstens References: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> <1559577023-558-33-git-send-email-suzuki.poulose@arm.com> From: Harald Freudenberger Date: Tue, 4 Jun 2019 08:45:58 +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-33-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-0028-0000-0000-00000374D56F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19060406-0029-0000-0000-00002434AB8C Message-Id: <8d555ff8-816d-f4c4-485a-ca6015e044e9@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-1906040045 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03.06.19 17:49, Suzuki K Poulose wrote: > Use the new class_find_device_by_name() helper. > > Cc: Harald Freudenberger > Cc: Martin Schwidefsky > Cc: Heiko Carstens > Signed-off-by: Suzuki K Poulose > --- > drivers/s390/crypto/zcrypt_api.c | 12 ++---------- > 1 file changed, 2 insertions(+), 10 deletions(-) > > diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c > index 1058b4b..16cad8e 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 name for find_zcdndev_by_name() */ > -static int __match_zcdn_name(struct device *dev, const void *data) > -{ > - return strcmp(dev_name(dev), (const char *)data) == 0; > -} > - > /* helper function, matches the devt value for find_zcdndev_by_devt() */ > static int __match_zcdn_devt(struct device *dev, const void *data) > { > @@ -152,10 +146,8 @@ static int __match_zcdn_devt(struct device *dev, const void *data) > */ > static inline struct zcdn_device *find_zcdndev_by_name(const char *name) > { > - struct device *dev = > - class_find_device(zcrypt_class, NULL, > - (void *) name, > - __match_zcdn_name); > + struct device *dev = class_find_device_by_name(zcrypt_class, > + NULL, (void *) name); > > return dev ? to_zcdn_dev(dev) : NULL; > } fine with me, thanks acked-by: Harald Freudenberger