That’s OK if you’ve got a proper 4-wire dryer outlet, and it isn’t too much hassle getting to the outlet.
I’ve got a 30A infeed on the side of the house and a 10ga SO cord with a locking plug (generator side) and receptacle (infeed side).
Just twist the white and green together and you got three wire connection. I just ran my house gen set that way for 2 straight days.