Simplify some code

Signed-off-by: leo-ma <begeekmyfriend@gmail.com>
Fix some bug

Signed-off-by: leo-ma <begeekmyfriend@gmail.com>
Merge branch 'simplicity'

Signed-off-by: Xiongfei Guo <xfguo@credosemi.com>
Minor dup typo fixed.

Signed-off-by: Xiongfei Guo <xfguo@credosemi.com>