lkml.org 
[lkml]   [2015]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/13] Binder driver refactor and minor bug fixes
Date
This patch series is a cleanup of the binder driver which should make it more
maintainable. That being said, the first two patches in this patch set are
simple bug fixes, one fixing an issue with 64 bit, the other removing an instance
where an error code could be returned twice. Both are fairly straightforward.

The bulk of the refactoring patches involve splitting up the larger functions in
the binder driver: binder_thread_write, binder_thread_read, and binder_transaction.
These functions all had switch statements which are now split up into a function
per case statement. Other smaller changes split off related bits of functionality
from binder_transaction() and binder_thread_read(), hopefully pruning these functions
down to a point where their purpose is more clear.

(1) Fix two bugs:
- 64 bit user pointer issue
- error value can get returned to userspace twice

(2) Split binder_thread_write() into smaller functions.
- move all cases into dedicated functions

(3) Split apart binder_transaction().
- move flat binder object translation loop into a separate function, and break every case into a dedicated function.
- add helper functions to move complexity out of binder_transaction() for transaction stack, logging, etc.

(4) Split binder_thread_read() into smaller functions.
- move all cases into dedicated functions
- add helper functions for waiting for work, processing work nodes, and handling errors.



\
 
 \ /
  Last update: 2015-05-29 01:21    [W:0.380 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site