  For a Hilbert space valued martingale $(f_n)$ and an adapted sequence of
positive random variables $(w_n)$, we show the weighted Davis type inequality
\[ \mathbb{E} \Bigl( |f_0| w_0 + \frac{1}{4} \sum_{n=1}^{N}
\frac{|df_n|^2}{f^*_n} w_n \Bigr) \leq \mathbb{E} ( f^*_N w^*_N). \] This
inequality is sharp and implies several results about the martingale square
function. We also obtain a variant of this inequality for martingales with
values in uniformly convex Banach spaces.
