Effects of pressure gradients on entropy generation in the viscous layers of turbulent wall flows