Just passing func wouldn't work because kpatch_compare_address doesn't know whether to check new_addr or old_addr (see the other caller to kpatch_compare_addresses).