Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1856555pxa; Mon, 3 Aug 2020 00:20:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQLC4xWmqGKSiui+m745Stlu+nlO6XEfRLQbRmtSKjFGzNLKN8lWrAt4ZaYqcrzrE/VLVV X-Received: by 2002:a17:906:7c86:: with SMTP id w6mr14929091ejo.178.1596439244444; Mon, 03 Aug 2020 00:20:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596439244; cv=none; d=google.com; s=arc-20160816; b=ja0/7CK609gpWx5ppeIBMll1tkyQVI/+ma+rzAmbaaGearXeDrU6cn+ycVOOgb/O/N MUAoYxxLPEKqHKAbb5fUqZMLpE+FhE42uzSryvZP3vy4wePx0AMSdV0Ld30L97BjQ4ED D09wkaHlWtXAG76bN1+ARHn7D0WLaXimSaJunVKzNiXzP/cA1KOsfhewm1xr84KfUebP wIEaO2i1XXQxzk0voinlOYepc8bHElTtWQ41xD9V86YTkOtHslDUgu5IVz2M55RYDnX0 F3RQsNoajfM0MSMgs6ykO+q1yRXS1rUh4W9eobdWaEOoFJst+tdyb9l/4joDRia4j2F7 s9yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=CaO2gwoIRO7d8dOIjAYk1IeFaLDPpOOv42U/pjZXJi8=; b=IhVmTlb6jipqh+E1XIUD81NRDiIkQ+OvU6Aw0T0w55keVUdFssUhO/wjCvJhVMEVtL orQ89rf3YlJ18vgC99VVIlsZG0ovNeGIvkOidTE99zAp0l8278bg2IwV4YDTMbZSqFxT alo34z/jr0jA0LGPDgNNlNfHKiYsjV68o33OxFbxd/pVglw9rNgmjD8RXVD+xxK0Qwia Z1f1NOA6TkU4G1MVqhU08/O2iYvkd8uZfl7l2WPSwqTXMmMbFIY4eIjJFzP+RD0N71aw w0ohe/Nt+HBnl/Y/WWTilkUvHfEDpghWwbTsb8QXqkVXx7cHLgvTayV5PQ3Uh8FOfUp+ tOog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id be4si10007162edb.51.2020.08.03.00.20.21; Mon, 03 Aug 2020 00:20:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1725270AbgHCHSH (ORCPT + 99 others); Mon, 3 Aug 2020 03:18:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:16096 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725806AbgHCHSG (ORCPT ); Mon, 3 Aug 2020 03:18:06 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07373wVO130488; Mon, 3 Aug 2020 03:18:05 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 32pa5rwcfu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Aug 2020 03:18:05 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 07376IgH138173; Mon, 3 Aug 2020 03:18:05 -0400 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com with ESMTP id 32pa5rwcf8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Aug 2020 03:18:05 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 07376gmC003714; Mon, 3 Aug 2020 07:18:03 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma06ams.nl.ibm.com with ESMTP id 32mynh1wsb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Aug 2020 07:18:03 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0737I0Mh30540090 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Aug 2020 07:18:00 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 680B542042; Mon, 3 Aug 2020 07:18:00 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E408A4204B; Mon, 3 Aug 2020 07:17:59 +0000 (GMT) Received: from funtu.home (unknown [9.171.45.189]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 3 Aug 2020 07:17:59 +0000 (GMT) Subject: Re: [PATCH] s390/pkey: Remove redundant variable initialization To: Tianjia Zhang Cc: hca@linux.ibm.com, gor@linux.ibm.com, borntraeger@de.ibm.com, ifranzki@linux.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, tianjia.zhang@alibaba.com References: <20200802111526.4883-1-tianjia.zhang@linux.alibaba.com> From: Harald Freudenberger Message-ID: <297c9d42-14ed-8972-d3f0-954a6fe9859f@linux.ibm.com> Date: Mon, 3 Aug 2020 09:18:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200802111526.4883-1-tianjia.zhang@linux.alibaba.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-03_04:2020-07-31,2020-08-03 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 bulkscore=0 clxscore=1011 priorityscore=1501 adultscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008030046 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02.08.20 13:15, Tianjia Zhang wrote: > In the first place, the initialization value of `rc` is wrong. > It is unnecessary to initialize `rc` variables, so remove their > initialization operation. > > Fixes: f2bbc96e7cfad ("s390/pkey: add CCA AES cipher key support") > Cc: Harald Freudenberger > Signed-off-by: Tianjia Zhang > --- > drivers/s390/crypto/pkey_api.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/s390/crypto/pkey_api.c b/drivers/s390/crypto/pkey_api.c > index 74e63ec49068..58140506a8e7 100644 > --- a/drivers/s390/crypto/pkey_api.c > +++ b/drivers/s390/crypto/pkey_api.c > @@ -818,7 +818,7 @@ static int pkey_keyblob2pkey2(const struct pkey_apqn *apqns, size_t nr_apqns, > static int pkey_apqns4key(const u8 *key, size_t keylen, u32 flags, > struct pkey_apqn *apqns, size_t *nr_apqns) > { > - int rc = EINVAL; > + int rc; > u32 _nr_apqns, *_apqns = NULL; > struct keytoken_header *hdr = (struct keytoken_header *)key; > > @@ -886,7 +886,7 @@ static int pkey_apqns4keytype(enum pkey_key_type ktype, > u8 cur_mkvp[32], u8 alt_mkvp[32], u32 flags, > struct pkey_apqn *apqns, size_t *nr_apqns) > { > - int rc = -EINVAL; > + int rc; > u32 _nr_apqns, *_apqns = NULL; > > if (ktype == PKEY_TYPE_CCA_DATA || ktype == PKEY_TYPE_CCA_CIPHER) { Thanks, I've picked this one and committed to the s390 subsystem.