Re: [PATCH 3/4] drivers: android: binder: Remove excessive indentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2013-03-11 at 20:31 +0100, Mirsal Ennaime wrote:
> Remove one level of indentation from the binder proc page release code
> by using slightly different control semantics.
[]
> diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
[]
> @@ -3002,18 +3002,20 @@ static void binder_deferred_release(struct binder_proc *proc)
>  	if (proc->pages) {
>  		int i;
>  		for (i = 0; i < proc->buffer_size / PAGE_SIZE; i++) {
> -			if (proc->pages[i]) {
> -				void *page_addr = proc->buffer + i * PAGE_SIZE;
> -				binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
> -					"binder_release: %d: page %d at %p not freed\n",
> -					proc->pid, i,
> -					page_addr);
> -				unmap_kernel_range((unsigned long)page_addr,
> -					PAGE_SIZE);
> -				__free_page(proc->pages[i]);
> -				page_count++;
> -			}
> +			if (!proc->pages[i])
> +				continue;
> +
> +			void *page_addr = proc->buffer + i * PAGE_SIZE;

Please declare variables immediately after an open brace.

		for (i = 0; i < proc->buffer_size / PAGE_SIZE; i++) {
			void *page_addr;

			if (!proc->pages[i])
				continue;

			page_addr = proc->buffer + i * PAGE_SIZE;

			etc...



--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux