On Fri, 4 Apr 2008 12:07:12 -0700 (PDT), Trent Piepho wrote:Can you prove that it is actually less efficient, and if so, by how much? The time spent in this single function if probably insignificant in comparison to the whole chain from the user-space process to the GPIO chip. Not that it really matters anyway, this is in no way a hot path so clarity and correctness definitely take over efficiency. And the code above is actually incorrect: as I mentioned elsewhere in this thread, you aren't support to include trailing \0s in the buffer you pass back to sysfs. Not all programming languages use \0 for string termination. Because most certainly your code won't be accepted upstream until this is fixed, and presumably you posted this patch in the hope that it would go upstream ;) Just because it isn't useful to you doesn't mean it won't be useful to others. Otherwise this particular piece of code couldn't be built as a module at all. Oops, sorry. I totally missed the "can't" in the comment. -- Jean Delvare --
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
git: | |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Frans Pop | svc: failed to register lockdv1 RPC service (errno 97). |
