From patchwork Tue Jun 13 01:30:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 691953 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp181859wru; Mon, 12 Jun 2023 18:31:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Ut/P/se89dYugdShlxAe9lx195hZLpeQwJz2Mb31xyxiIiCeagJsudr7GuzGPD69CXrrh X-Received: by 2002:a05:6a20:12c6:b0:10f:6529:5442 with SMTP id v6-20020a056a2012c600b0010f65295442mr12216020pzg.49.1686619881744; Mon, 12 Jun 2023 18:31:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686619881; cv=none; d=google.com; s=arc-20160816; b=QZ6x2QScQGULoPFDsQ+A8NNOliWPPvW/T5tXSrodCZSgU5vPnFvFdvHNwZjno7Hjjy 3T9IidSJSBVUWd4cN++GJZHDI+URXE6fj0luDoGFQ74cwoAaN5BXIJ48EC8KoidLuj0x 6vZgh1USyy3YyDOzjqwN31Pt3qEr5j9SjSQCPoWIZo2pi/SCvF5tz/lHjaACenpDgHWh q4wvkJZPXHH338gb9QhOXjuwBqT64X1kss+TqqlODVPGbmN4hj6rNWuVrr7DRH2LaMyM Ot06HOsrzjtNNXJ8s5OwPSS21LB/UiarBye+5byMHAJDcd9cD6NfxjtelsqdOGZEUE0j Z89w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=QhQQ1RaWmI5+0Aq1Hcfx/Y1REo6DmrTdXlfEG4i4LE4=; b=N4hEd6p1+W/KJWPZcRbgCFq5X/bKDtcLZQj/QZHrQMs8hMgTEqt/7a7MOp1Zcp/Nbz +ToqoEWg89iv+sQiQAwvj6rV4iMyi+sTMOhHmz6QuQYMp0yNvvazrc+DKdHwGO+cisdO IE414BgNpQrmMQyiD4OfpMXtiqkdjjOjQjJU2lyD5jCno8Hgh8sEAI27gliUcDRPje+L JuHoKlI3SmxDAtIwjlITvnxIuxpY3tQh1JWehLtetQF1HLb+0R1ioLBziIz0SIULk+A1 7h+JIASPXMUnJM4ZKM8MQrPHzn6xaYae0fbDQH5PN0CzNwVpjHXWK/OCD38bayTdk0sV Y0Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Nq5lmVmK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id s10-20020a170902a50a00b001a51bb4ad81si7550853plq.44.2023.06.12.18.31.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 18:31:21 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Nq5lmVmK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DACA4861C0; Tue, 13 Jun 2023 03:31:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Nq5lmVmK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 19A2D861A3; Tue, 13 Jun 2023 03:31:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 505C78619D for ; Tue, 13 Jun 2023 03:31:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-65c6881df05so1180179b3a.1 for ; Mon, 12 Jun 2023 18:31:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686619866; x=1689211866; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=QhQQ1RaWmI5+0Aq1Hcfx/Y1REo6DmrTdXlfEG4i4LE4=; b=Nq5lmVmK0udYt6ya0M+yXtLTFgeJern6qvUwI4oeameBFL+Lh4q2wLqN0onWRJKMx1 lDWvPtLZmy7ZuPpgetNvPCVvANts0mE+P/Wf0V+fcAo9uil0UndHeJT8WOCXM1d0fPfI d9PF82/I8SWk0BMpN2wWPj/nyMoamg+7nwM81suwDI/+EAdZpwNUSnh9NqzBU18fNNjx Ho3LUYk3EPi9czU72YdQeU51W6WoxEYYIJ3PPjDjKLtkLmJfiWGZItHX1JoWtdffJzMO frYjJSF6rGzLgvvgVZjxb91xAwaE9JI24EK/cuGHUag4HHUZwJk5KQGHAErDHiLjTx6K /53w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686619866; x=1689211866; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QhQQ1RaWmI5+0Aq1Hcfx/Y1REo6DmrTdXlfEG4i4LE4=; b=Bd9xchqIRzFAvBT7ZfKUiMhJzYtKmNbhJPWn78ChXOKakgtkHqszfthPOFWjaVxQg5 7jBy6hqcL8RDhzsMLncFr7dVPlESQ5VDMqc3BYSTKoppbvx/vSPu0n9Vn3eW4P1CVTqk 1m/DqyMcAcoZBtYtVJSgpCwQo2EeeqbypprgF46SRORS1z0VPwZC8gUDrYGyR9BtHxHp LtbNRAOGt2OfcZupe8R6m3ux3sMTYeOOKwQJcGdHwu2mKN9qaz08ijuvP5R/u22PlfGT 6X23PYyE7HO4eLogPcBnPxyW5DSxRXlTeqa5nciRytd7c8OTZQVzFfTBcD252imjsDKd 5bBg== X-Gm-Message-State: AC+VfDwIUfNj2qBao2y8T36Mhn6OsY93n6qU88d5fSBcQhoNYBoHLm+6 5vx438MGbSJrH97u6x4v1cMGut6l8r7o5blHhRE= X-Received: by 2002:a05:6a00:e8f:b0:659:48e4:9545 with SMTP id bo15-20020a056a000e8f00b0065948e49545mr11778762pfb.3.1686619866620; Mon, 12 Jun 2023 18:31:06 -0700 (PDT) Received: from laputa.. ([2400:4050:c3e1:100:5191:55fb:5142:da1d]) by smtp.gmail.com with ESMTPSA id a17-20020aa78651000000b0063d670ad850sm7714234pfo.92.2023.06.12.18.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 18:31:06 -0700 (PDT) From: AKASHI Takahiro To: trini@konsulko.com Cc: etienne.carriere@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH] firmware: scmi: return a right errno for SCMI status code Date: Tue, 13 Jun 2023 10:30:45 +0900 Message-ID: <20230613013045.36684-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean scmi_to_linux_errno() is set to return an appropriate errno which corresponds to a given SCMI status code. But the current implementation always returns the same value. Signed-off-by: AKASHI Takahiro --- drivers/firmware/scmi/scmi_agent-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c index 54d563d929b8..02de692d66f3 100644 --- a/drivers/firmware/scmi/scmi_agent-uclass.c +++ b/drivers/firmware/scmi/scmi_agent-uclass.c @@ -46,7 +46,7 @@ int scmi_to_linux_errno(s32 scmi_code) for (n = 0; n < ARRAY_SIZE(scmi_linux_errmap); n++) if (scmi_code == scmi_linux_errmap[n].scmi) - return scmi_linux_errmap[1].errno; + return scmi_linux_errmap[n].errno; return -EPROTO; }