Let $f=\sum_{n\ge 1}a_nq^n$ be a normalized Hecke eigenform which is not of CM-type, of weight $k\ge 2$ for the congruence subgroup $\Gamma_0(N)$. Let $a\in\mathbb{Z}$ and define
$$ \pi_f(x,a):=\#\{p\le x\; :\; a_p=a \} $$ I am trying to understand the proof of Theorem 5.1 from K. Murty's paper "Modular Forms and the Chebotarev Density Theorem II" which asserts that $$\pi_f(x,a)\ll \dfrac{x(\log\log x)^2}{\log^2x}\label{1}.\tag{1}$$ Using the Cauchy–Schwarz and Polya–Vinogradov inequalities, Murty proves that $$\pi_f(x,a)\ll \max_{\ell\in I}\pi_f(x,a,\ell)+O\left(\frac{\pi_f(x,a)^{1/2}x^{1/2}}{\pi(I)^{1/2}}\right)\label{2},\tag{2}$$ where $I=[y,y+u]$. He then claims that \eqref{1} follows easily from \eqref{2} if we prove that $$ \pi_f(x,a,\ell)\ll \dfrac{x(\log\log x)^2}{\log^2x}. $$ My question is: how can \eqref{1} be derived from \eqref{2}?