A note on Hilbert's inequality