Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3548170ybf; Tue, 3 Mar 2020 07:57:19 -0800 (PST) X-Google-Smtp-Source: ADFU+vuay3TxScF9P/8hg2tjco4M8jri/my0pckV+d43pRdd4SqCQTpW33qFld2IK5AxpPiOiRxj X-Received: by 2002:a05:6808:983:: with SMTP id a3mr2929562oic.172.1583251039138; Tue, 03 Mar 2020 07:57:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583251039; cv=none; d=google.com; s=arc-20160816; b=yA62nG4Yl0IctzM+9SlO2pd21uGb+p2VrPGpfRxQB9W0Bt/BWmBBYbLu7gHaEq+PTX Q0nXHAfA8bDjKhJbT/uK7OvwQoPsRPf/5pQ6AtZtglmrcFIMYXfXgYESt6k/yh/gkI4w CMcNaalylt46/lwrKrjxAJ2CphRXwfQM9oREYedgBT1VlNMj9g7iBF+kB30kyRdPqoY5 s5nuw/0KslZ1PN+lZ/g/ewRztIwu/UsXje8ibzibtqhQlopreQS/yMhq9MGDdj213LQQ bA11HiPaFnERZ/SJXSsbOljGmz4VnIZtbwGEkxTBHvo0sIS+90uAUapn4sCD/ZU4lRmQ slkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=Hwyg9U95Q+nrcbl/C7tBXlqcDWBuAzwByP8xhhP55lI=; b=RlC+v/PST1tFKY/BruD7fj7qlPoKV1a3VhBHSQhyRvZbr/N2ViMOtY7oBvPbk5c2Ol KGlFOq13xblGsNNmmgkLUb4aja9jIBW3z37yQWM8bCju3Y6Lmp3ACLxyt3c6GrOkALKS NET47Rf/HpSm6OHFMdJjaFdn7RFz/QK92TtdqWbG/ovoz831qZSKr1//os74m365bsIz X1Hy/hmumFqYP5P7gLToATQCamurJ1bJloT2WxRCG+tqWtDZVHO++BBgnIeEhkeqAMFs tgO3OYxZtwi1GnQ1KXs0J+z/MAPByHzKWxiVQ8UdTpho9RxFBJTK4OdK+K8RhAv1VUWD S18g== 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=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t15si8197188oth.176.2020.03.03.07.57.07; Tue, 03 Mar 2020 07:57:19 -0800 (PST) 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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730204AbgCCPsd (ORCPT + 99 others); Tue, 3 Mar 2020 10:48:33 -0500 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:60421 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728291AbgCCPsd (ORCPT ); Tue, 3 Mar 2020 10:48:33 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0TrZE6tq_1583250489; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0TrZE6tq_1583250489) by smtp.aliyun-inc.com(127.0.0.1); Tue, 03 Mar 2020 23:48:10 +0800 From: Tianjia Zhang To: giovanni.cabiddu@intel.com, herbert@gondor.apana.org.au, davem@davemloft.net, ebiggers@kernel.org, pvanleeuwen@rambus.com, zohar@linux.ibm.com Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: qat - simplify the qat_crypto function Date: Tue, 3 Mar 2020 23:48:09 +0800 Message-Id: <20200303154809.81817-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org simplify code to remove unnecessary constant string copies. Signed-off-by: Tianjia Zhang --- drivers/crypto/qat/qat_common/qat_crypto.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_crypto.c b/drivers/crypto/qat/qat_common/qat_crypto.c index 3852d31ce0a4..fb504cee0305 100644 --- a/drivers/crypto/qat/qat_common/qat_crypto.c +++ b/drivers/crypto/qat/qat_common/qat_crypto.c @@ -250,8 +250,7 @@ static int qat_crypto_create_instances(struct adf_accel_dev *accel_dev) char val[ADF_CFG_MAX_VAL_LEN_IN_BYTES]; INIT_LIST_HEAD(&accel_dev->crypto_list); - strlcpy(key, ADF_NUM_CY, sizeof(key)); - if (adf_cfg_get_param_value(accel_dev, SEC, key, val)) + if (adf_cfg_get_param_value(accel_dev, SEC, ADF_NUM_CY, val)) return -EFAULT; if (kstrtoul(val, 0, &num_inst)) -- 2.17.1