You DO NOT have to cut out and replace the drywall ... it will take more work than necessary.
Lightly remove loose damage. Apply drywall compound with a 6" knife flush to the surface for Coat #1. Let dry overnight. Apply Coat #2 but add a very small amount of water to the pan (no more than two tablespoons) with the drywall compound. Mix very well then apply flat with a light hand. Dry overnight. Touch sand perfectly smooth.
Use HOMEX texture spray on a medium setting (get at HD) on a piece of cardboard until you get the proper texture and feel. Important to keep the can moving past the fix to overlap the texturing in all directions. Let dry several hours if not overnight.
Now the trick . . . Holding your knife perpendicular to the wall, drag the blade along the patch to remove excess texture. Do this until your patch matches the original.
Prime and paint.
Now that you know how, you can fix problems everywhere! Have fun.