hal: Fix compliation when debug logs are enabled

Change-Id: Iff27af28758a54784ccce517d78582c233472eb8