Gevrey regularity for a class of dissipative equations