From patchwork Fri Dec 1 03:45:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huisong Li X-Patchwork-Id: 172234 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp861477vqy; Thu, 30 Nov 2023 19:46:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1b7sDcD3MZxqNX95e/a5Osnn+mvfjuURScqAb4LC7+2NZ0v7VE5mZX03+sYfQwxLzu2nK X-Received: by 2002:a05:6808:220c:b0:3b6:d9fc:f2fb with SMTP id bd12-20020a056808220c00b003b6d9fcf2fbmr1910033oib.8.1701402403251; Thu, 30 Nov 2023 19:46:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701402403; cv=none; d=google.com; s=arc-20160816; b=WuaqgCIbG/193X4IhQXLw5B7uP0kfjKVZSd7p+LNP5bVKHzG7UfslufjEZLBI/jC8Y 1O5aFUZr3CX+nlY3iyx3GSShyFLClhnuCETo0n8MdFdHiE9NAYV6WgQfkumVlg4iq4Qw tS4prfG0uEPm8KjGhxasWxlsLgvkQnQsxzLgpgmAWO8IquIBlYitvNEhsXMPxI6BNOi5 sJRf4ZqKarVA5qrKn48OEilwOG2uMnl/NyfY9/cHL4lWN6FK4TdZR2q0fhV4MVYqgofI uOqgy4QXerI2FArlddJlaebSbKOgbuQR/hMldqidsHLLpmo8bbTbjDTxq5buBOxJuwd1 25Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=zVoI+mk6uhSgpmKxeItGk3SpRyOkpqgsqbm6jiCeFSI=; fh=VBTKU4aD+sxp5soex/RyS/kCRSv+g5d5nay990/Axgg=; b=wGjT3J0S3njO4bjUFhYl8YpA1eGwFi9YRseUzGqrOf76Z/jWZgzl7Sti5JSS3GzYi9 pi6NQzKll+yMm8IzLLTYh6m9mXeyIh77BB+1JHlFchQrahBZVaNrGqtll4K352Sem/5f HjxgZM3M7OohvPS74b0L6ZVYeq/bbtsqkTzI1S2vrGVVdo38cT3Etlq6HiWfhYbPuv8J kr3LKzK8CtMBot/qkoQx0chNpVtN1mEYZjCmJqFXPdzkKlALHjDHIWhYW5v3t6lUdOJV arSl/1wQappT2FV9FRPuu/bSj8lfAXewhYSe1042zO+U1oRV+3FoU/+Y3lxDGdnchb9W r0/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id x28-20020a634a1c000000b00585a5e9a965si2518378pga.161.2023.11.30.19.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 19:46:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 3AF9A8083A9D; Thu, 30 Nov 2023 19:45:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377216AbjLADpd (ORCPT + 99 others); Thu, 30 Nov 2023 22:45:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229808AbjLADpb (ORCPT ); Thu, 30 Nov 2023 22:45:31 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48B0510D7 for ; Thu, 30 Nov 2023 19:45:38 -0800 (PST) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4ShJpn3kgGzWhrN; Fri, 1 Dec 2023 11:44:49 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by kwepemm000004.china.huawei.com (7.193.23.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 1 Dec 2023 11:45:35 +0800 From: Huisong Li To: CC: , , , , , , , , Subject: [PATCH v3 1/5] soc: hisilicon: kunpeng_hccs: Fix some incorrect format strings Date: Fri, 1 Dec 2023 11:45:30 +0800 Message-ID: <20231201034534.7276-2-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20231201034534.7276-1-lihuisong@huawei.com> References: <20231109054526.27270-1-lihuisong@huawei.com> <20231201034534.7276-1-lihuisong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm000004.china.huawei.com (7.193.23.18) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 30 Nov 2023 19:45:46 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782064131708604410 X-GMAIL-MSGID: 1784049726446760382 Fix some incorrect format strings. Signed-off-by: Huisong Li Reviewed-by: Jonathan Cameron --- drivers/soc/hisilicon/kunpeng_hccs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c index e31791659560..dad6235dbf1a 100644 --- a/drivers/soc/hisilicon/kunpeng_hccs.c +++ b/drivers/soc/hisilicon/kunpeng_hccs.c @@ -155,7 +155,7 @@ static int hccs_register_pcc_channel(struct hccs_dev *hdev) cl_info->pcc_comm_addr = ioremap(pcc_chan->shmem_base_addr, pcc_chan->shmem_size); if (!cl_info->pcc_comm_addr) { - dev_err(dev, "Failed to ioremap PCC communication region for channel-%d.\n", + dev_err(dev, "Failed to ioremap PCC communication region for channel-%u.\n", hdev->chan_id); rc = -ENOMEM; goto err_mbx_channel_free; @@ -1097,7 +1097,7 @@ static int hccs_create_hccs_dir(struct hccs_dev *hdev, int ret; ret = kobject_init_and_add(&port->kobj, &hccs_port_type, - &die->kobj, "hccs%d", port->port_id); + &die->kobj, "hccs%u", port->port_id); if (ret) { kobject_put(&port->kobj); return ret; @@ -1115,7 +1115,7 @@ static int hccs_create_die_dir(struct hccs_dev *hdev, u16 i; ret = kobject_init_and_add(&die->kobj, &hccs_die_type, - &chip->kobj, "die%d", die->die_id); + &chip->kobj, "die%u", die->die_id); if (ret) { kobject_put(&die->kobj); return ret; @@ -1125,7 +1125,7 @@ static int hccs_create_die_dir(struct hccs_dev *hdev, port = &die->ports[i]; ret = hccs_create_hccs_dir(hdev, die, port); if (ret) { - dev_err(hdev->dev, "create hccs%d dir failed.\n", + dev_err(hdev->dev, "create hccs%u dir failed.\n", port->port_id); goto err; } @@ -1147,7 +1147,7 @@ static int hccs_create_chip_dir(struct hccs_dev *hdev, u16 id; ret = kobject_init_and_add(&chip->kobj, &hccs_chip_type, - &hdev->dev->kobj, "chip%d", chip->chip_id); + &hdev->dev->kobj, "chip%u", chip->chip_id); if (ret) { kobject_put(&chip->kobj); return ret; @@ -1178,7 +1178,7 @@ static int hccs_create_topo_dirs(struct hccs_dev *hdev) chip = &hdev->chips[id]; ret = hccs_create_chip_dir(hdev, chip); if (ret) { - dev_err(hdev->dev, "init chip%d dir failed!\n", id); + dev_err(hdev->dev, "init chip%u dir failed!\n", id); goto err; } } From patchwork Fri Dec 1 03:45:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huisong Li X-Patchwork-Id: 172233 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp861259vqy; Thu, 30 Nov 2023 19:46:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEipn+MlvZ+7oYot/Drvcxld+xWU/qxonNHvOWZg47ysFA1wu9x6fZTb9lkA5DkHuSEEcM X-Received: by 2002:aa7:930f:0:b0:6cb:87d0:fc9e with SMTP id cz15-20020aa7930f000000b006cb87d0fc9emr27888247pfb.21.1701402360125; Thu, 30 Nov 2023 19:46:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701402360; cv=none; d=google.com; s=arc-20160816; b=iwRzTlj5RgtmLcH22qIygsNE+76fXcaRb0Qhr6OOkWWmvIZxyd/S3t3U4/jPh1ky60 rzdPlOn7Jj7SISF+WZ3ktvCPGgayTnO6pPzT0dvySTyp5ZITkDCreQmz6MgXmpKvpK++ nF0WMyjuwARxrmYMtoCxbZgaqW1Qh6vDXvt0JGISq+kd3CO23Z//MOmfmY08S10LLP6u EpSIm1Xb2JwoxLUnR0VrVtGwtF67M34+zatl0oOAtuVw21tgHOsGqDnyWKjU0sbv4ChN Kzm8fRm0jjZYkWOuxZcqiF7l13XyUzOvjRMDCOtH6RttnutHABYN0Pi2RyaaJifMBY2y A+/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=6t4GYaMoe+7D3m8tv5LgAud4plDMcH6cNWHw1thlePk=; fh=VBTKU4aD+sxp5soex/RyS/kCRSv+g5d5nay990/Axgg=; b=STs2QFPkkhdC/jJ477nqwBu7NBX4Hlmsc4/Oz9H6/96g2aN6cqoSoOMzhDEIqP9r3+ 4sIiyjr5tMfPxSf37bPbackgV3YgCthjTpW48q6R3ZkGAeDflD0OM78IUIAtmjg7uZL2 s7Kyvjy6bRIE1dkPLZYu8IwFi0j9Z8JsrNkkdsVlwsa2WKnO6ak/RYnZ8IPg6PiVB95p 3DDpXBFkp4CFXGg7TLHgTNcfGgVuC5dcSCDYtiYlm1SZQLoEmDLBPQ1YBpX5yCwjRYlZ Sd7t67pEliTW6t/h5mwpE/f9oHHCtu9clBllmUclfeZDFl4re/lZjEztKkPMp+GSzGmN wVZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id v20-20020aa78514000000b006cde7614b28si2409628pfn.375.2023.11.30.19.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 19:46:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id CA86E8705EAE; Thu, 30 Nov 2023 19:45:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377247AbjLADph (ORCPT + 99 others); Thu, 30 Nov 2023 22:45:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377191AbjLADpc (ORCPT ); Thu, 30 Nov 2023 22:45:32 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7ED910E5 for ; Thu, 30 Nov 2023 19:45:38 -0800 (PST) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4ShJlS3NNRz1P8q1; Fri, 1 Dec 2023 11:41:56 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by kwepemm000004.china.huawei.com (7.193.23.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 1 Dec 2023 11:45:36 +0800 From: Huisong Li To: CC: , , , , , , , , Subject: [PATCH v3 2/5] soc: hisilicon: kunpeng_hccs: Add failure log for no _CRS method Date: Fri, 1 Dec 2023 11:45:31 +0800 Message-ID: <20231201034534.7276-3-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20231201034534.7276-1-lihuisong@huawei.com> References: <20231109054526.27270-1-lihuisong@huawei.com> <20231201034534.7276-1-lihuisong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm000004.china.huawei.com (7.193.23.18) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 30 Nov 2023 19:45:53 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782064208832482614 X-GMAIL-MSGID: 1784049681089928337 Driver gets the PCC channel id by using the PCC GAS in _CRS. But, currently, if the firmware has no _CRS method on platform, there is not any failure log. So this patch adds the log for this. Signed-off-by: Huisong Li Reviewed-by: Jonathan Cameron --- drivers/soc/hisilicon/kunpeng_hccs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c index dad6235dbf1a..fd3ca0eb8175 100644 --- a/drivers/soc/hisilicon/kunpeng_hccs.c +++ b/drivers/soc/hisilicon/kunpeng_hccs.c @@ -85,8 +85,10 @@ static int hccs_get_pcc_chan_id(struct hccs_dev *hdev) struct hccs_register_ctx ctx = {0}; acpi_status status; - if (!acpi_has_method(handle, METHOD_NAME__CRS)) + if (!acpi_has_method(handle, METHOD_NAME__CRS)) { + dev_err(hdev->dev, "No _CRS method.\n"); return -ENODEV; + } ctx.dev = hdev->dev; status = acpi_walk_resources(handle, METHOD_NAME__CRS,