The potential of a polyhedral body with linearly varying density has been given two different expressions in Holstein (Geophysics 68:157–167, 2003) and Hamayun et al. (J Geodesy 83:1163–1170, 2009) although in both papers the derivation is started from the same surface integral obtained by transforming the original volume integral via the Gauss theorem. Conversely, we prove that a suitable modification of the approach exploited by Hamayun et al. (J Geodesy 83:1163–1170, 2009) yields the formula derived by Holstein (Geophysics 68:157–167, 2003). Furthermore, an additional expression of the surface integral, which is also proved in this paper, allows us to derive a variant of the linear part of the potential, i.e. the integral multiplying the gradient of the density contrast, which filters the null contribution of faces containing the observation point. The new formula is specialized to the case of a prism.