RE: [PATCH 2/2] reg: merge key open code