a sub-static condition. Such kind of inequality, which could lead to an Alexandrov type rigidity theorem, has been proved first by Brendle [@Br]. See also recent work by Wang-Wang [@WW]. Moreover, the general formula has been used to prove several geometric inequalities in [@LX] and also applied by Chen-Wang-Wang-Yau [@CWWY] to prove the stability of quasi-local energy with respect to a static spacetime.

The formula was proved via very basic integration-by-parts with respect to the Levi-Civita connection, although the computation is complicated and tedious. The key point is that we introduced a “weight” function $V$, which was motivated by Brendle and Brende-Hung-Wang [@Br; @BHW].

In this article, we adapt a new point of view to recover the formula in [@LX]. We find that the formula in [@LX] is indeed an integral Bochner formula for some special vector fields with respect to a special [*torsion-free affine* ]{}connection instead of the Levi-Civita connection. Moreover, this turns out to be a general phenomenon that a wide class of [*torsion-free affine* ]{}connections give rise to a class of Reilly type formulas.

Let $(M^n, \bar g)$ be an $n$-dimensional smooth Riemannian manifold and $\nb$ be the Levi-Civita connection of $\bar g$. Let $V=e^u$ be a 