lkml.org 
[lkml]   [2013]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/9] staging: android: binder: Move some of the logic into subfunction
On Wed, Dec 04, 2013 at 06:09:33PM +0000, Serban Constantinescu wrote:
> +static void bc_dead_binder_done(struct binder_proc *proc,
> + struct binder_thread *thread, void __user *cookie)
> +{
> + struct binder_work *w;
> + struct binder_ref_death *death = NULL;
> +
> + list_for_each_entry(w, &proc->delivered_death, entry) {
> + struct binder_ref_death *tmp_death = container_of(w, struct binder_ref_death, work);

Put a blank line after the variable declaration block. Also break it up
into two lines instead of having the lines be a million characters long.

list_for_each_entry(w, &proc->delivered_death, entry) {
struct binder_ref_death *tmp_death;

tmp_death = container_of(w, struct binder_ref_death, work);

> + if (tmp_death->cookie == cookie) {
> + death = tmp_death;
> + return;

Should be a break here. This function wasn't tested.

> + }
> + }

regards,
dan carpenter



\
 
 \ /
  Last update: 2013-12-05 09:41    [W:2.411 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site