Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2996537pxf; Sun, 28 Mar 2021 08:16:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhtyaJgV5lEa7KhV40wuJc4/Scm8dQ6UmzH1IXehC7wg/kV3KkPnKtkhsRceGv8vNTdqm4 X-Received: by 2002:a17:906:1b54:: with SMTP id p20mr24297208ejg.307.1616944576486; Sun, 28 Mar 2021 08:16:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616944576; cv=none; d=google.com; s=arc-20160816; b=euSwZr8FJFTQmyRjxFqeLZ1oPXjhGnIa14wpXKK2AEgfZVT5oz1khIJ1ZlRb/VX7Hl aKUyaH208YtjglWhAPY2cgqI2SNrhOod+QnTdsXfaAy+PwQDcL6Ux24x/wkvogL3dwzj sPMIy3UmGoiUPrNA3npPWFsBMV77GKgLJ4Ns/kev7V7HNFJTUtK295LLgUtHDpC/lkWh aDTOzfmSAcxR0qBkOL+R83QHhQdurgw7Im8CLIH95BFF2rGWZUaVBcufgIAQfHCr3f3U JOvcsRX3Ul5MKlhGbP3ZaWNuuvulkX7RoRxZcuE2v67qONhftlg+BbfIKwmflKpfJk/p 9L8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QxkzL/BvVIApgHBjEEbohGdB6MGv4ujLqnAdyvdEueo=; b=Ikb7uvJcNwERz1UmFPBFlxH9UqgJtlB24DlKoyY4/xjooa4pvWyFX/KEr3E5dbbG8h 6sr21KysbvmD2WticUp0HwyJaXIxGxm5QN7I3MykhWXKWAxiPaPW88K6kPq6FqkiBsIW ukda/HL0xjM8blgQ1L1FiPkzpMl1NYJAAWO8L9KzCBgAiXS4ewJQ+Qs2orDn6esRO8Wa 9/CIJAY6RAY4Le4/r16ePI1HDB54YMQocRrHClOEnxZz8pCQYWP1IFdUW49V91/U7/HR fpzM/iKjbo9l1saSiGle/K8PWG8xuCQN/ftY2Wctp9gtC50LqAUvhFGfe1nRo5Tmca08 NVTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lncTz5h1; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm10si11653404ejc.418.2021.03.28.08.15.35; Sun, 28 Mar 2021 08:16:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lncTz5h1; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231308AbhC1PKI (ORCPT + 99 others); Sun, 28 Mar 2021 11:10:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:35754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231131AbhC1PJ5 (ORCPT ); Sun, 28 Mar 2021 11:09:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B79F361942; Sun, 28 Mar 2021 15:09:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616944197; bh=g9C2EhJKfVyGbLCoeubeo7Tdn9zadBq1c5n9n9qcnxg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lncTz5h1q+7BVNXEizEHrZGW/yiQYoLimekC7ZK+51js+Bifih2yHpy7kD7g+8Ip3 AUTzKyWs2zhZpd5DT8AmDVNuKo+BfXcWW62rRZfeTjOkUA5aivh5zNv4AhGJX59WtF 0fhCUseY0WZZ+ZaGeUHdM7AOItse+oi8w11KFlm4= Date: Sun, 28 Mar 2021 17:09:54 +0200 From: Greg KH To: Hui Tang Cc: herbert@gondor.apana.org.au, davem@davemloft.net, linux-crypto@vger.kernel.org, xuzaibo@huawei.com, wangzhou1@hisilicon.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: hisilicon - check if debugfs opened Message-ID: References: <1616833980-11006-1-git-send-email-tanghui20@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1616833980-11006-1-git-send-email-tanghui20@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sat, Mar 27, 2021 at 04:33:00PM +0800, Hui Tang wrote: > 'xx_debugfs_init' check if debugfs opened. > > Signed-off-by: Hui Tang > --- > drivers/crypto/hisilicon/hpre/hpre_main.c | 5 ++++- > drivers/crypto/hisilicon/qm.c | 3 +++ > drivers/crypto/hisilicon/sec2/sec_main.c | 5 ++++- > drivers/crypto/hisilicon/zip/zip_main.c | 3 +++ > 4 files changed, 14 insertions(+), 2 deletions(-) > > diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c > index c7ab06d..f2605c4 100644 > --- a/drivers/crypto/hisilicon/hpre/hpre_main.c > +++ b/drivers/crypto/hisilicon/hpre/hpre_main.c > @@ -779,6 +779,9 @@ static int hpre_debugfs_init(struct hisi_qm *qm) > struct device *dev = &qm->pdev->dev; > int ret; > > + if (!debugfs_initialized()) > + return -ENOENT; Why? What does this help with? Why does the code care if debugfs is running or not? thanks, greg k-h