From 21ac81192483e6b8135cec4c47e6f9fce890fb05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=B6hrmann?= Date: Mon, 30 Jul 2018 22:57:25 +0200 Subject: [PATCH] internal/cpu: make all constants for s390x feature detection typed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only the first constant in the function and facility constant declaration blocks were typed constants. Make all other constants used for function codes and named facilities also typed. Change-Id: I1814121de3733094da699c78b7311f99ba4772e1 Reviewed-on: https://go-review.googlesource.com/126776 Run-TryBot: Martin Möhrmann TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/internal/cpu/cpu_s390x.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/internal/cpu/cpu_s390x.go b/src/internal/cpu/cpu_s390x.go index 389a058c32a..0a12922045e 100644 --- a/src/internal/cpu/cpu_s390x.go +++ b/src/internal/cpu/cpu_s390x.go @@ -18,16 +18,16 @@ type function uint8 const ( // KM{,A,C,CTR} function codes aes128 function = 18 // AES-128 - aes192 = 19 // AES-192 - aes256 = 20 // AES-256 + aes192 function = 19 // AES-192 + aes256 function = 20 // AES-256 // K{I,L}MD function codes - sha1 = 1 // SHA-1 - sha256 = 2 // SHA-256 - sha512 = 3 // SHA-512 + sha1 function = 1 // SHA-1 + sha256 function = 2 // SHA-256 + sha512 function = 3 // SHA-512 // KLMD function codes - ghash = 65 // GHASH + ghash function = 65 // GHASH ) // queryResult contains the result of a Query function @@ -56,20 +56,20 @@ type facility uint8 const ( // mandatory facilities zarch facility = 1 // z architecture mode is active - stflef = 7 // store-facility-list-extended - ldisp = 18 // long-displacement - eimm = 21 // extended-immediate + stflef facility = 7 // store-facility-list-extended + ldisp facility = 18 // long-displacement + eimm facility = 21 // extended-immediate // miscellaneous facilities - dfp = 42 // decimal-floating-point - etf3eh = 30 // extended-translation 3 enhancement + dfp facility = 42 // decimal-floating-point + etf3eh facility = 30 // extended-translation 3 enhancement // cryptography facilities - msa = 17 // message-security-assist - msa3 = 76 // message-security-assist extension 3 - msa4 = 77 // message-security-assist extension 4 - msa5 = 57 // message-security-assist extension 5 - msa8 = 146 // message-security-assist extension 8 + msa facility = 17 // message-security-assist + msa3 facility = 76 // message-security-assist extension 3 + msa4 facility = 77 // message-security-assist extension 4 + msa5 facility = 57 // message-security-assist extension 5 + msa8 facility = 146 // message-security-assist extension 8 // Note: vx and highgprs are excluded because they require // kernel support and so must be fetched from HWCAP.