mali_control: some refactorings