Your call to the MAP() function in the motor_SetSpeed() is wrong.
You have ...
mSpeed = map(potValue, 0, 0, 1024, 255);
You have the parameters in wrong position; also, the max for the pot should be 1023.
The pot has 1024 values, ranged from 0 to 1023
mSpeed = map(potValue, 0, 1023, 0, 255);
Also, for motorStop, if you want braking then you need to set HIGH. Setting them all to LOW will just coast the motor.
Your call to motor_warmUp() won't ever return since at the end it has an endless WHILE(1) loop.