I have a command to tidy up excessive whitespace in my code in vim:
\" to tidy excess whitespace map 1 :execute \':%s#\\s\\+$##g\' >
See this vim tip on using bufdo, windo, and tabdo.
Assuming all your buffers are in the buffer list, your map could be as simple as
" to tidy excess whitespace map 1 :execute ':bufdo! %s#\s\+$##g'