ksm: cleanup some function arguments