From: Fabiano Rosas <farosas@linux.ibm.com>
To: Jing Xiangfeng <jingxiangfeng@huawei.com>,
paulus@ozlabs.org, mpe@ellerman.id.au, benh@kernel.crashing.org
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
kvm-ppc@vger.kernel.org, jingxiangfeng@huawei.com
Subject: Re: [PATCH] KVM: PPC: Book3S: Remove redundant initialization of variable ret
Date: Mon, 21 Sep 2020 10:43:48 -0300 [thread overview]
Message-ID: <87o8lzp7mz.fsf@linux.ibm.com> (raw)
In-Reply-To: <20200919071230.125798-1-jingxiangfeng@huawei.com>
Jing Xiangfeng <jingxiangfeng@huawei.com> writes:
> The variable ret is being initialized with '-ENOMEM' that is meaningless.
> So remove it.
>
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
> ---
> arch/powerpc/kvm/book3s_64_vio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c
> index 1a529df0ab44..b277a75cd1be 100644
> --- a/arch/powerpc/kvm/book3s_64_vio.c
> +++ b/arch/powerpc/kvm/book3s_64_vio.c
> @@ -283,7 +283,7 @@ long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm,
> struct kvmppc_spapr_tce_table *siter;
> struct mm_struct *mm = kvm->mm;
> unsigned long npages, size = args->size;
> - int ret = -ENOMEM;
> + int ret;
>
> if (!args->size || args->page_shift < 12 || args->page_shift > 34 ||
> (args->offset + args->size > (ULLONG_MAX >> args->page_shift)))
next prev parent reply other threads:[~2020-09-21 13:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 7:12 [PATCH] KVM: PPC: Book3S: Remove redundant initialization of variable ret Jing Xiangfeng
2020-09-21 13:43 ` Fabiano Rosas [this message]
2020-09-23 0:08 ` Paul Mackerras
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=87o8lzp7mz.fsf@linux.ibm.com \
--to=farosas@linux.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=jingxiangfeng@huawei.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@ozlabs.org \
/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).