[PATCH 4.14 33/45] powerpc/lib/code-patching: refactor patch_instruction()