There's a catch here
If you are trading a Defog Pokémon from HGSS to DPPt then it should work, because Defog isn't a HM moves in HGSS. But you can't trade the same Defog Pokémon from DPPt to HGSS because Defog is an HM in DPPt.
The same applies for Whirlpool and Dive. You can trade a Whirlpool Pokémon to HGSS, but you cannot trade it back.
Source: Owning both Platinum and SoulSilver, and trading between them.