public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Colin King <colin.king@canonical.com>
Cc: Artem Bityutskiy <dedekind1@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][V2] ubi: fix swapped arguments to call to ubi_alloc_aeb
Date: Sun, 16 Oct 2016 17:38:56 +0200	[thread overview]
Message-ID: <20161016173856.11d486aa@bbrezillon> (raw)
In-Reply-To: <20161015160011.27600-1-colin.king@canonical.com>

On Sat, 15 Oct 2016 17:00:11 +0100
Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> Static analysis by CoverityScan detected the ec and pnum
> arguments are in the wrong order on a call to ubi_alloc_aeb.
> Swap the order to fix this.
> 
> Fixes: 91f4285fe389a27 ("UBI: provide helpers to allocate and free aeb elements")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>

> ---
>  drivers/mtd/ubi/fastmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
> index d6384d9..4eed546 100644
> --- a/drivers/mtd/ubi/fastmap.c
> +++ b/drivers/mtd/ubi/fastmap.c
> @@ -287,7 +287,7 @@ static int update_vol(struct ubi_device *ubi, struct ubi_attach_info *ai,
>  
>  		/* new_aeb is newer */
>  		if (cmp_res & 1) {
> -			victim = ubi_alloc_aeb(ai, aeb->ec, aeb->pnum);
> +			victim = ubi_alloc_aeb(ai, aeb->pnum, aeb->ec);
>  			if (!victim)
>  				return -ENOMEM;
>  

  reply	other threads:[~2016-10-16 15:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-15 16:00 [PATCH][V2] ubi: fix swapped arguments to call to ubi_alloc_aeb Colin King
2016-10-16 15:38 ` Boris Brezillon [this message]
2016-10-18 19:25   ` Richard Weinberger

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=20161016173856.11d486aa@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=colin.king@canonical.com \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /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