linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harald Freudenberger <freude@linux.ibm.com>
To: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
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
Subject: Re: [PATCH] s390/pkey: Remove redundant variable initialization
Date: Mon, 3 Aug 2020 09:18:07 +0200	[thread overview]
Message-ID: <297c9d42-14ed-8972-d3f0-954a6fe9859f@linux.ibm.com> (raw)
In-Reply-To: <20200802111526.4883-1-tianjia.zhang@linux.alibaba.com>

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 <freude@linux.ibm.com>
> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
> ---
>  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.

      reply	other threads:[~2020-08-03  7:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-02 11:15 [PATCH] s390/pkey: Remove redundant variable initialization Tianjia Zhang
2020-08-03  7:18 ` Harald Freudenberger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=297c9d42-14ed-8972-d3f0-954a6fe9859f@linux.ibm.com \
    --to=freude@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=ifranzki@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=tianjia.zhang@alibaba.com \
    --cc=tianjia.zhang@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).