In this note we reconsider Sen's entropy function analysis for 5D
supergravity actions containing Chern-Simons terms. The apparent lack of gauge
invariance is usually tackled via a 4D reduction. Here we motivate how a
systematic 5D procedure also works. In doing so, it becomes important to
identify the correct 5D charges. In particular, we perform explicit
calculations for the black ring and 5D black hole. In the black ring analysis,
we find Chern-Simons induced spectral flow shifts emerging out of Sen's
formalism. We find that the entropy function nevertheless remains gauge
invariant and the resulting electric charges are identified as Page charges.
For the black hole too, 5D gauge invariance is confirmed. Our 5D analysis
enables us to fix a mismatch that arose in the electric charges of Goldstein
and Jena's 4D-reduced calculation. Finally we provide an interpretation for the
e^0 - p^0 exchange in the entropy function as an interpolation between black
hole and black ring geometries in Taub-NUT.Comment: 27 page