A generalized Gardner relation