From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 762F8C4345F for ; Mon, 15 Apr 2024 01:17:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Subject:CC:To: MIME-Version:From:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=v695eCFyUsEbkGy3l9++Ce0SXZU7Tw7dzFNkFUbe4OA=; b=a9wSB9++3SHccs LvtKr64A1wRkMreUrNWH0rm3l72lefoxvf2V6R+0xXhERbqXuykj8H8DgGlhQlnuvxj2LrSgaLVa6 VAo+W5SprpPZuG9w95hl+rG2RF8fxuW2GSsElLG77U24jIDLmzgMBqAwgnfQk2mgOTd3NckL/ajqn wbriBDEDhfHif+K4YP/s7ByO9eNvDuiOh0EwfwDIeW8ccgEZy2OIqz+yoARsuZ4TV7HkQEtMfWsoL u1cQSrZNw4aJWclEc49x4rB/d3L2/goKsvu4+4K+wySOMhMNvtcq25bsGThVIaOGD1JTXP4KOhXEW M9BpD0pgRF1ECByRPtkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwAyY-00000006enS-3iCO; Mon, 15 Apr 2024 01:17:38 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwAyS-00000006ekU-0zTK for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2024 01:17:34 +0000 Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4VHq2J4Zr6z1hwMy; Mon, 15 Apr 2024 09:14:16 +0800 (CST) Received: from kwepemd500014.china.huawei.com (unknown [7.221.188.63]) by mail.maildlp.com (Postfix) with ESMTPS id 66AAD1A0172; Mon, 15 Apr 2024 09:17:12 +0800 (CST) Received: from [10.67.121.2] (10.67.121.2) by kwepemd500014.china.huawei.com (7.221.188.63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Mon, 15 Apr 2024 09:17:11 +0800 Message-ID: <661C8017.1070203@hisilicon.com> Date: Mon, 15 Apr 2024 09:17:11 +0800 From: Wei Xu User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Huisong Li CC: , , , , , Subject: Re: [PATCH 1/2] soc: hisilicon: kunpeng_hccs: Add the check for obtaining complete port attribute References: <20240403081935.24308-1-lihuisong@huawei.com> <20240403081935.24308-2-lihuisong@huawei.com> In-Reply-To: <20240403081935.24308-2-lihuisong@huawei.com> X-Originating-IP: [10.67.121.2] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemd500014.china.huawei.com (7.221.188.63) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_181732_479148_E7D17A7D X-CRM114-Status: GOOD ( 15.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Huisong, On 2024/4/3 16:19, Huisong Li wrote: > The hccs_get_all_port_attr() is used to obtained the attribute of all > ports on a specified DIE from firmware. However, this interface doesn't > ensure whether firmware reports the complete attribute of all ports or not. > So this patch adds the check for this. > > Signed-off-by: Huisong Li > --- > drivers/soc/hisilicon/kunpeng_hccs.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c > index 9ff70b38e5e9..bb69a95b5f2d 100644 > --- a/drivers/soc/hisilicon/kunpeng_hccs.c > +++ b/drivers/soc/hisilicon/kunpeng_hccs.c > @@ -556,6 +556,12 @@ static int hccs_get_all_port_attr(struct hccs_dev *hdev, > start_id = rsp_head.next_id; > } > > + if (left_buf_len != 0) { > + dev_err(hdev->dev, "do not get the expected port number(%u) attribute.\n", How about changing to "failed to get the expected port number(%u) attribute.\n"? Best Regards, Wei > + size); > + return -EINVAL; > + } > + > return 0; > } > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel