On Thu, Dec 14, 2023 at 10:11:33PM +0800, Jijie Shao wrote:
From: Hao Lan <lanhao@xxxxxxxxxx>hclge_comm_is_special_opcode takes a u16 value as it's argument,
...
@@ -470,10 +470,14 @@ static int hclge_comm_cmd_check_result(struct hclge_comm_hw *hw,
int hclge_comm_cmd_send(struct hclge_comm_hw *hw, struct hclge_desc *desc,
int num)
{
+ bool is_special = hclge_comm_is_special_opcode(desc->opcode);
struct hclge_comm_cmq_ring *csq = &hw->cmq.csq;
int ret;
int ntc;
but the type of desc->opcode is __le16. So perhaps this should be
(completely untested!):
struct hclge_comm_cmq_ring *csq = &hw->cmq.csq;
bool is_special;
...
is_special = hclge_comm_is_special_opcode(le16_to_cpu(desc->opcode));
Flagged by Sparse.