Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp7070795rdb; Fri, 15 Dec 2023 17:43:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAIjrycAVQ9uRNvhOtm1NALPlfVRZ3liXbeYUnZQwUZNDw3JZRvlZ6KwlIgiPBtn9RkzFz X-Received: by 2002:a05:6a20:3d1e:b0:18b:f4c6:4334 with SMTP id y30-20020a056a203d1e00b0018bf4c64334mr15848998pzi.6.1702690992248; Fri, 15 Dec 2023 17:43:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702690992; cv=none; d=google.com; s=arc-20160816; b=LCUTape4WgzjVbHchqLghR4KRKPA4Wc9xLD2oo4WZydk4CDwW8q7dKQaJ33R/IuIGw SV2nZuufJPgpgqzdFQzFfgjQy8wpS6LN10nfqQRz40hVRukHOZznueD3L3SY+rx/RJV9 IUThUR+8MSrQOKzUqy3ssAmAM3EuXdYvoMUXy4vC3w34cwACya6X5KnERnnR5uJOpFZh uAYFkBLLs1uw8ZPG6S+aUpRxH5hEh+FBLl5PdVEB081EGnteK4j1n/zSxor749NpnRu6 t2KyXkJqEJ6kvzIYvhvkJwHCsCuAZPkrdltUJNoqU86sISn/N6h2PlRbzUIFTNXGdwne yHAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to:subject:cc :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=6RbMdTQT1NWonWhMnO1EPqjR4oD5Q7cQ74E+d441aIg=; fh=1i8hIVm1YljhASLnvoXDxijwu4cuspj/bwniD6uH+EU=; b=LxmrdL/nxuqASycJuemUsM8VLvn0bpxT/LyxkdVHJ6G76e7HHw+bciR53J/71hIZot MnOdmmDm6X3TI5MEDSk9swqC/oNVioKmnPDLgTBoDmh0xoV8hBAocutxz0cB7ByWPZ2B GEEPuhzMO9/GRU2S+DBl+RqqxjR02NFIH8y0FQPkwQguWCrVHNI7oBIjlpJt0MGcCyxs bvzkkdhtL6i4M4Tl820s2fgw5f/WlOhU4ashzGyEmjwEHuHZZBSWaAY4e9tOU2CMdbFe jAZLJpw6dgUQ5zG2X/SnIGKIxV4hnShy69VmkKAR0aCXQLk2UaqV5Wuf31xjNsxZFcCQ a2Aw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-1933-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1933-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id fi42-20020a056a0039aa00b006d0d8f1628asi4951751pfb.284.2023.12.15.17.43.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 17:43:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1933-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-1933-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1933-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C4511287885 for ; Sat, 16 Dec 2023 01:43:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A81A615A8; Sat, 16 Dec 2023 01:43:00 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22D8310F1; Sat, 16 Dec 2023 01:42:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4SsTMs5dhtz29frc; Sat, 16 Dec 2023 09:41:45 +0800 (CST) Received: from kwepemm000007.china.huawei.com (unknown [7.193.23.189]) by mail.maildlp.com (Postfix) with ESMTPS id 920011400DA; Sat, 16 Dec 2023 09:42:55 +0800 (CST) Received: from [10.67.120.192] (10.67.120.192) by kwepemm000007.china.huawei.com (7.193.23.189) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sat, 16 Dec 2023 09:42:54 +0800 Message-ID: Date: Sat, 16 Dec 2023 09:42:54 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird CC: , , , , , , , , , , , , , Subject: Re: [PATCH V2 net-next 1/3] net: hns3: add command queue trace for hns3 To: Simon Horman References: <20231214141135.613485-1-shaojijie@huawei.com> <20231214141135.613485-2-shaojijie@huawei.com> <20231214210434.GU5817@kernel.org> From: Jijie Shao In-Reply-To: <20231214210434.GU5817@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm000007.china.huawei.com (7.193.23.189) on 2023/12/15 5:04, Simon Horman wrote: > On Thu, Dec 14, 2023 at 10:11:33PM +0800, Jijie Shao wrote: >> From: Hao Lan >> ... >> @@ -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; > hclge_comm_is_special_opcode takes a u16 value as it's argument, > 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. Thank you, it will be fixed in v3 Jijie