[PATCH 0/13] Binder driver refactor and minor bug fixes

From: Riley Andrews
Date: Thu May 28 2015 - 19:09:40 EST


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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/