The basics of good coding & patch submission style are described by e.g. http://www.winehq.org/docs/winedev-guide/style-notes and SubmittingPatches, but there's a lot more to good coding and patch generation than can easily be listed there.
Sometimes Alexandre silently improves patches while committing them - and this might be a useful window on how he likes code to look. So here's a list of a few patches that were silently improved on their way into the tree, and notes on the changes:
"gdi32: add test for SelectClipRgn in metafiles, make it pass" original, first part as committed -- AJ evidently thought the patch was too big, and committed a fix for just the worst part of the problem. He also removed a redundant, poorly named variable.
"gdi32: add test for SelectClipRgn in metafiles, make it pass" 2nd part, second part as committed -- AJ replaced the obscure expression "&mr->rdParm - 1" with a better name for the same location, "&mr->rdFunction".
"msvcrt: memmove_s shouldn't zero its output buffer on error" original, as committed -- AJ switched from complex if statements to simple ones, and silently adapted to how wine's msvcrt parameter checking changed since the patch was submitted
"setupapi: Fix buffer overflow in load_fake_dll" original, as committed -- AJ rewrote the patch. Original changed how the position was calculated. His commit changed how the maximum length was calculated.
"gdi32: Use HandleToULong inline function to convert handle to index instead of casting" original, as committed -- AJ changed the tests, splitting the 64-bit long in the table into two 32-bit longs, added another GDI call to the test and renamed the test itself