Actually I mean "resetting" by pressing some code or making the phone back to the factory settings.
If you have hacked your phone..then don't reset it with
*#7370# as you will lost your hack stuff and other stuff in phone memory.
If your phone is not hacked, its recommended to reset it with the code mentioned above , but backup your contacts and messages, as the phone memory will be empty.
PS: I prefer hard reset after updating 5800xm
.