This patch does bit of a clean-up by using already defined enums for
certain values in function hclge_is_special_opcode(). Below enums from
have been used as replacements for magic values:
enum hclge_opcode_type{
	<snip>
	HCLGE_OPC_STATS_64_BIT		= 0x0030,
	HCLGE_OPC_STATS_32_BIT		= 0x0031,
	HCLGE_OPC_STATS_MAC		= 0x0032,
	<snip>
};
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
 
 static bool hclge_is_special_opcode(u16 opcode)
 {
-       u16 spec_opcode[3] = {0x0030, 0x0031, 0x0032};
+       /* these commands have several descriptors,
+        * and use the first one to save opcode and return value
+        */
+       u16 spec_opcode[3] = {HCLGE_OPC_STATS_64_BIT,
+               HCLGE_OPC_STATS_32_BIT, HCLGE_OPC_STATS_MAC};
        int i;
 
        for (i = 0; i < ARRAY_SIZE(spec_opcode); i++) {