Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp244905pxy; Thu, 22 Apr 2021 00:47:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtEuKm1id0EQPz8fFwL5Wq1gvA1JSxg4Zk1IN1dsZSa3xJ18mr7sUAj2OqFdd1/jM6uyHu X-Received: by 2002:a17:90a:d191:: with SMTP id fu17mr2530355pjb.137.1619077670702; Thu, 22 Apr 2021 00:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619077670; cv=none; d=google.com; s=arc-20160816; b=0xlfInIhTjj7xf7OMoPmb0Rqa3lhI8/5i1o9PQaacVc4Iss+gHXDdNBEvLnjRq72EP kKYzgDe/TecRHBTtu1M+YRzVJfP3vDQ9x02txGmQRBl8Q5AF/xL+uGwRgvU0iQU2OOKz MBcnOWI8B5rXfHn7i0+71y9TgLbQCCy5tS3Jm7VCXre/YCamoG0KhYrKBq8wLNri4lHU optjBr1xFtjbGASwDoevTEVB0LRDDK4P5uccfKownoVDNEG42AOY0qRmcK/aWF5vnA+P rgvIH4pn1zj7YEiFPjoIHLZv+2QmF3juyPvkkG9Yyf/+eJFY3dqmiBiP5LeiWEh5bwNV //zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=b/WJTnpYKLXPGjsvB5iaXMoX87jTsv3fuyFpKwccTUs=; b=GJ5CCi2JsWSBcd0O1tR9zWFdyOKVSj/QfmjwiLWKrhv/vvEtd6V3kXgoMQXl7U/BER fU8GH+1zAF7IlLehWSD52HFmkkpfCYbBnCQf4FSvwJMJJW7vAPxE1mpudcRfg+J2ot/S EO0CpsOdeDS2aGtH4UB+O9XtNTUDHzJSGWyiIvmzGjWwD2BHNGfYvsbQOP0C3z2sAo3F fVKrzEsyzXS742o5Nr+6eGVHgbkIGus/qbZQ+y0Wbw3V38IXcUMPWyGMPYyxoJzsUV/2 im2oqEZ/vESqYUMJO/+aLtt3MtyrTDrTp7uOv4CfNfUiD8M36meUOGS6t+WBRKIt9xFm 9mJg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fh23si2121163pjb.91.2021.04.22.00.47.38; Thu, 22 Apr 2021 00:47:50 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235232AbhDVHr7 (ORCPT + 99 others); Thu, 22 Apr 2021 03:47:59 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:48766 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235239AbhDVHrz (ORCPT ); Thu, 22 Apr 2021 03:47:55 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1lZU3N-00035l-Ca; Thu, 22 Apr 2021 17:47:14 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Thu, 22 Apr 2021 17:47:13 +1000 Date: Thu, 22 Apr 2021 17:47:13 +1000 From: Herbert Xu To: Tian Tao Cc: thomas.lendacky@amd.com, davem@davemloft.net, linux-crypto@vger.kernel.org Subject: Re: [PATCH v2] crypto: ccp - Make ccp_dev_suspend and ccp_dev_resume void functions Message-ID: <20210422074713.GH14354@gondor.apana.org.au> References: <1618535202-11397-1-git-send-email-tiantao6@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1618535202-11397-1-git-send-email-tiantao6@hisilicon.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Apr 16, 2021 at 09:06:42AM +0800, Tian Tao wrote: > Since ccp_dev_suspend() and ccp_dev_resume() only return 0 which causes > ret to equal 0 in sp_suspend and sp_resume, making the if condition > impossible to use. it might be a more appropriate fix to have these be > void functions and eliminate the if condition in sp_suspend() and > sp_resume(). > > Signed-off-by: Tian Tao > Cc: Herbert Xu > Cc: "David S. Miller" > Cc: Tom Lendacky > --- > v2: handle the case that didn't define CONFIG_CRYPTO_DEV_SP_CCP. > --- > drivers/crypto/ccp/ccp-dev.c | 12 ++++-------- > drivers/crypto/ccp/sp-dev.c | 12 ++---------- > drivers/crypto/ccp/sp-dev.h | 15 ++++----------- > 3 files changed, 10 insertions(+), 29 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt