  We prove that a smooth projective surface of degree $d$ in $\mathbb P^3$
contains at most $d^2(d^2-3d+3)$ lines. We characterize the surfaces containing
exactly $d^2(d^2-3d+3)$ lines: these occur only in prime characterize $p$ and,
up to choice of projective coordinates, are cut out by equations of the form
$x^{p^{e}+1}+y^{p^{e}+1}+z^{p^{e}+1}+ w^{p^{e}+1} = 0.$
