From patchwork Mon May 15 10:32:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13241237 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 62DA3C77B7D for ; Mon, 15 May 2023 10:32:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 76B5910E197; Mon, 15 May 2023 10:32:35 +0000 (UTC) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by gabe.freedesktop.org (Postfix) with ESMTPS id BFA5E10E197 for ; Mon, 15 May 2023 10:32:32 +0000 (UTC) Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3063891d61aso11991552f8f.0 for ; Mon, 15 May 2023 03:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684146748; x=1686738748; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=BqAu0JmjDleKQlM543bGZcHgQbf6Z8XGhiW21a09aAQ=; b=Tz4La/hO+jiAlAXOH2ZQPLEXyK4CwN1/aan7v+r101w9HvEn2CkZQkAqag98DqXpnN DLZ9uN9nCH7tQLRyNRsYTLC7CNSyoTgtobulW1+WTFGJPrt+8H6dqDkMdKaQmK6nD3JI 4cl5v3Q6ncTJKY8gs8Lg5PwgkUme/zfa3RQT0spyGVFQVoo3bzcMKtaCxPMNdCC2Uken 1gkbMVClWvPPDOGY2o1fP37CYvKqQWC8hLlHfsW7SnSvAIu7YVpQYtE3456F/loZs8Mm KGGF3/nI+L/cyIIMahMjIDZpVh3M3n6JwCQCLEhI79AKH/QhMTvELSrxvyAce8wQreMV 6xFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684146748; x=1686738748; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BqAu0JmjDleKQlM543bGZcHgQbf6Z8XGhiW21a09aAQ=; b=MpF4T1raAigZtKoolYP2Q1V9B52Gw/Mux+DoACKZ5fsfouH5xd7LtjGswZs2T5vr5V JZsGIe93Ss1nb4QsNEKR54Jevgh/Nw9rVafBqAlT5TVpobvRcAlK/wD5g6XyesZp+2Xh JW3FDho0YccVJlih6a2nW52a3pwli4PwJ++9kIwf7t6KfcGU7O+rLAfo1VXQBAhePjMA tUFe385YqYPLosoUubW0AMyhf4JjeqPTn6a1J2DWztM7Ws69t383lxQuYadCIUOK3SJY 99zR/JrqgzQC+3lMJA50AYiiZJhtOYDvyvN2CpeGvxIYkPAvdrkeSNHuKoRbuGIRZZR8 GZSg== X-Gm-Message-State: AC+VfDxUVOkdOn+MD8HtQqh6nTtGrGqE/zSQXX2m/5D9HASoJFSn1XDv 1h8pNGU7SCeYcOdhLbDkfB5aqw== X-Google-Smtp-Source: ACHHUZ7KZ13Xu/SKezwjzKAinEgmeswPWWjWo9a3m9hp12Jl8Iklcxp1Jheflnku8GT5jGlAoVZgsw== X-Received: by 2002:adf:ef8c:0:b0:306:8034:b2e4 with SMTP id d12-20020adfef8c000000b003068034b2e4mr22445723wro.69.1684146747805; Mon, 15 May 2023 03:32:27 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id c1-20020adffb01000000b00309257ad16csm1223820wrr.29.2023.05.15.03.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 03:32:26 -0700 (PDT) Date: Mon, 15 May 2023 13:32:18 +0300 From: Dan Carpenter To: Koby Elbaz Subject: [PATCH] accel/habanalabs: fix gaudi2_get_tpc_idle_status() return Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, Oded Gabbay , Dani Liberman , dri-devel@lists.freedesktop.org, Dafna Hirschfeld , Stanislaw Gruszka , Tomer Tayar , Ofir Bitton Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The gaudi2_get_tpc_idle_status() function returned the incorrect variable so it always returned true. Fixes: d85f0531b928 ("accel/habanalabs: break is_idle function into per-engine sub-routines") Signed-off-by: Dan Carpenter Reviewed-by: Oded Gabbay --- From static analysis. Not tested. drivers/accel/habanalabs/gaudi2/gaudi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c index b778cf764a68..5539c84ee717 100644 --- a/drivers/accel/habanalabs/gaudi2/gaudi2.c +++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c @@ -7231,7 +7231,7 @@ static bool gaudi2_get_tpc_idle_status(struct hl_device *hdev, u64 *mask_arr, u8 gaudi2_iterate_tpcs(hdev, &tpc_iter); - return tpc_idle_data.is_idle; + return *tpc_idle_data.is_idle; } static bool gaudi2_get_decoder_idle_status(struct hl_device *hdev, u64 *mask_arr, u8 mask_len,