net/hns3: extract common function to obtain revision ID