mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: mateusznosek0@gmail.com
Cc: linux-kernel@vger.kernel.org, dave.hansen@linux.intel.com,
	luto@kernel.org, peterz@infradead.org, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com, x86@kernel.org
Subject: Re: [PATCH] arch/x86/mm/mpx.c: Clean up code by removing unnecessary assignment
Date: Wed, 22 Jan 2020 14:10:37 +0100	[thread overview]
Message-ID: <20200122131037.GB20584@zn.tnic> (raw)
In-Reply-To: <20200119130933.12228-1-mateusznosek0@gmail.com>

On Sun, Jan 19, 2020 at 02:09:33PM +0100, mateusznosek0@gmail.com wrote:
> From: Mateusz Nosek <mateusznosek0@gmail.com>
> 
> Previously variable 'ret' is assigned just before return instruction.
> The variable is local so this assignment is useless
> and therefore can be removed.
> 
> Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
> ---
>  arch/x86/mm/mpx.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/x86/mm/mpx.c b/arch/x86/mm/mpx.c
> index 895fb7a9294d..30ab444301f5 100644
> --- a/arch/x86/mm/mpx.c
> +++ b/arch/x86/mm/mpx.c
> @@ -827,10 +827,8 @@ static int try_unmap_single_bt(struct mm_struct *mm,
>  	/*
>  	 * No bounds table there, so nothing to unmap.
>  	 */
> -	if (ret == -ENOENT) {
> -		ret = 0;
> +	if (ret == -ENOENT)
>  		return 0;
> -	}
>  	if (ret)
>  		return ret;
>  	/*
> -- 

That code is going away so you can ignore it completely.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

      reply	other threads:[~2020-01-22 13:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-19 13:09 mateusznosek0
2020-01-22 13:10 ` Borislav Petkov [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=20200122131037.GB20584@zn.tnic \
    --to=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mateusznosek0@gmail.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®