[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1608272107070.3363@hadrien>
Date: Sat, 27 Aug 2016 21:07:28 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: SF Markus Elfring <elfring@...rs.sourceforge.net>
cc: linux-cris-kernel@...s.com,
Adam Buchbinder <adam.buchbinder@...il.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Ingo Molnar <mingo@...nel.org>,
Jesper Nilsson <jesper.nilsson@...s.com>,
Jiri Kosina <jkosina@...e.cz>,
Mikael Starvik <starvik@...s.com>,
Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>,
Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH 5/8] cris-cryptocop: Move an assignment for the variable
"nooutpages" in cryptocop_ioctl_process()
On Fri, 26 Aug 2016, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Fri, 26 Aug 2016 13:38:30 +0200
>
> Move the assignment for the local variable "nooutpages" behind
> the source code for memory allocations by this function.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
> arch/cris/arch-v32/drivers/cryptocop.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
> index 26347a2..cd34723 100644
> --- a/arch/cris/arch-v32/drivers/cryptocop.c
> +++ b/arch/cris/arch-v32/drivers/cryptocop.c
> @@ -2469,7 +2469,7 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig
> struct page **inpages = NULL;
> struct page **outpages = NULL;
> int noinpages = 0;
> - int nooutpages = 0;
> + int nooutpages;
>
> struct cryptocop_desc descs[5]; /* Max 5 descriptors are needed, there are three transforms that
> * can get connected/disconnected on different places in the indata. */
> @@ -2695,6 +2695,8 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig
> err = -ENOMEM;
> goto free_inpages;
> }
> + } else {
> + nooutpages = 0;
Why is it better? 4 characters have becomes 2 lines.
julia
> }
>
> /* Acquire the mm page semaphore. */
> --
> 2.9.3
>
>
Powered by blists - more mailing lists