[hmac] Lint fix

Waived a lint warning of verilator and fixed errors of ascentlint.

Signed-off-by: Eunchan Kim <eunchan@opentitan.org>
diff --git a/hw/ip/hmac/lint/hmac.vlt b/hw/ip/hmac/lint/hmac.vlt
index 5c266ea..ac0de8e 100644
--- a/hw/ip/hmac/lint/hmac.vlt
+++ b/hw/ip/hmac/lint/hmac.vlt
@@ -12,3 +12,6 @@
 lint_off -rule UNUSED -file "*/rtl/hmac_core.sv" -match "Signal is not used: 'wipe_v'"
 lint_off -rule UNUSED -file "*/rtl/sha2_pad.sv" -match "Signal is not used: 'wipe_secret'"
 lint_off -rule UNUSED -file "*/rtl/sha2_pad.sv" -match "Signal is not used: 'wipe_v'"
+
+// 1 bit adder to optimize the count ones logic
+lint_off -rule WIDTH -file "*/rtl/hmac.sv" -match "*RHS's SEL generates 1 bits*"
diff --git a/hw/ip/hmac/rtl/sha2.sv b/hw/ip/hmac/rtl/sha2.sv
index 1206714..4d93d79 100644
--- a/hw/ip/hmac/rtl/sha2.sv
+++ b/hw/ip/hmac/rtl/sha2.sv
@@ -132,7 +132,7 @@
     end else if (!sha_en) begin
       round <= '0;
     end else if (run_hash) begin
-      if (round == RoundWidth'(NumRound-1)) begin
+      if (round == RoundWidth'(unsigned'(NumRound-1))) begin
         round <= '0;
       end else begin
         round <= round + 1;