Whooping is a colloquial term for a spanking. Usage of the this version of the term is strongly associated with poorer social-economic groups with low opinion of education.
"Whooping" in the spanking context is a corrupted variant of "whipping". It is probably unrelated to the verb "to whoop" (yell) and "whooping cough" (an onomatopoeia). The verb "to whoop" can have either meaning: a) to make a whoop, b) to beat, to strike, to defeat.