Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp365603rdd; Tue, 9 Jan 2024 06:41:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IHjaJjOQUP1T7ipfsUe6j5tPdvMXHo02RNupxH8fNRVqHIL6nqkmJK5HXqYCuA89Z0GD0OT X-Received: by 2002:a05:6a20:948a:b0:194:4cae:5eb1 with SMTP id hs10-20020a056a20948a00b001944cae5eb1mr2405713pzb.99.1704811271135; Tue, 09 Jan 2024 06:41:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704811271; cv=none; d=google.com; s=arc-20160816; b=I4Z2KhbHP+aJYazpPZm5RMm2OGWAbpUIo7x5B8/5pVbLbx2f/4ZcJVDPXw/2uKG7bV tzMgsNumsJYGcNzHPu6/MMAbfIRB6VI6EnHX/BXZm8X5Hs8OlG8jYJC/+P5OdqtFhGej u/Q1L/ybmS903g2RSWul/trWRd3swr3CokOKJH8WxjgpsKaOapOaOrIsZ38hD1HzFoV9 oZ6s44x/bHACJP1osQRpUabZJbAAP0JAQ+/K1bi3D2xM06IhcuZbmkLU4UL+cc8A29LC WYGgijFWMDIHqhpbYIlGeFYmMBHCdmsqvWPOipRObWCDxp2syho1epu8OCGfjlYqX2+Z +Evw== 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:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=xxPj5CZqhQqOxWmjK8Z5B1imRQJwmhIuLZ3N8P3nXhw=; fh=9Qva2ioDIdAK0+mh3q/5XqJ3xNbp3qs48MYQqv13dQQ=; b=se5B/uJdypvsVZuco1EFc2UMSgJ0pUY9ryPW1wl6tBk+PLUXQFgjUdQcMrB9ZhjTts 5ty8zrfX7DwdoBBRA2RP1i+2hXzobprv0n+KD6sk8FR0JKL4vy37nbXUTMl6Jtp8CKpM WgTCRTUprFC0gET1L4Xyf9Sp4Xqc+akR1ujaAUyMXFINT4yMt0yGdArC5FHmBqjUC8ic f/KdcH7eNYiF2ToIDBIlbjhYMZANqTr9ZxCDAkX6X8USgqU2TEkzGAfGE9ugfcqOx/lE QH9v5Fax/z855/V/zAjBSyVBHGNmbUfJ4/NQNwyZyDtIfbFKznp6HuEvuWuP4sWaQJM/ sDxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qJ4139m1; spf=pass (google.com: domain of linux-kernel+bounces-21005-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21005-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q7-20020a656247000000b005c6001ec190si1529935pgv.892.2024.01.09.06.41.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:41:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21005-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qJ4139m1; spf=pass (google.com: domain of linux-kernel+bounces-21005-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21005-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 E1729286F03 for ; Tue, 9 Jan 2024 14:41:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D541C39FDC; Tue, 9 Jan 2024 14:40:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qJ4139m1" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 12CF939AEE; Tue, 9 Jan 2024 14:40:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5D1BC433F1; Tue, 9 Jan 2024 14:40:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704811246; bh=JtUnKmh82+8hl9yHpHolXJPlKOMneCk3xUxEKY3Bryo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=qJ4139m1Mz2HSk++A9C0OnpR8xxIJ5Hv4D+nuIC4WdWPYWKTLRzJmLPIm8PzfR/ES vvfwGNdlyjG+Fv0yOSgbvFWQs6IeGNMNpkdX/2sTRxTN96ECzc+LkmmED6xXXg2gBa 7d/oC/UGNvKLGfZqmzZ1/9KALPVhtpVf+LyMgtkMt0y9zFAVBD3aF7qdYPYYrVAW4u vUxCYGVOhwUAjTDo/aZuE5KaVfGGz4gEI6XQ5y7DnG3+/8kEwx9LgYPR5FGUnytng/ Q5UqNu3f9pfG4zd0PSPj45hFn6HnoGnRsiEZFGLEOb3Z12NNEfqvpQqLgrdS8iZRIC Kw00w7LHDdL/w== Message-ID: Date: Tue, 9 Jan 2024 16:40:41 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH][next] accel/habanalabs: remove redundant assignment to pointer 'input' To: Colin Ian King , Ofir Bitton , Benjamin Dotan , dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240106124213.51392-1-colin.i.king@gmail.com> Content-Language: en-US From: Oded Gabbay In-Reply-To: <20240106124213.51392-1-colin.i.king@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 06/01/2024 14:42, Colin Ian King wrote: > From: Colin Ian King > > The pointer input is assigned a value that is not read, it is > being re-assigned again later with the same value. Resolve this > by moving the declaration to input into the if block. > > Cleans up clang scan build warning: > warning: Value stored to 'input' during its initialization is never > read [deadcode.DeadStores] > > Signed-off-by: Colin Ian King > --- > drivers/accel/habanalabs/goya/goya_coresight.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/accel/habanalabs/goya/goya_coresight.c b/drivers/accel/habanalabs/goya/goya_coresight.c > index 41cae5fd843b..3827ea4c02f7 100644 > --- a/drivers/accel/habanalabs/goya/goya_coresight.c > +++ b/drivers/accel/habanalabs/goya/goya_coresight.c > @@ -576,7 +576,6 @@ static int goya_config_spmu(struct hl_device *hdev, > struct hl_debug_params *params) > { > u64 base_reg; > - struct hl_debug_params_spmu *input = params->input; > u64 *output; > u32 output_arr_len; > u32 events_num; > @@ -592,7 +591,7 @@ static int goya_config_spmu(struct hl_device *hdev, > base_reg = debug_spmu_regs[params->reg_idx] - CFG_BASE; > > if (params->enable) { > - input = params->input; > + struct hl_debug_params_spmu *input = params->input; > > if (!input) > return -EINVAL; Thanks for the patch. Reviewed-by: Oded Gabbay Applied to -next. Oded