Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp233221rdb; Thu, 8 Feb 2024 04:39:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2dc5TLXtyaZtcmm7me8JNC8dbSVHk6dXeeYfYLE7bnvl0OAXhuism7w3GPN6pogkJ40j0 X-Received: by 2002:aa7:d693:0:b0:560:cae:53f7 with SMTP id d19-20020aa7d693000000b005600cae53f7mr5868280edr.35.1707395989327; Thu, 08 Feb 2024 04:39:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707395989; cv=pass; d=google.com; s=arc-20160816; b=WM+ekXs2EvwQoRkFubhArl9zDKOXd/zsHSUqbLlFUE9bcHBJ0jkNLIdMIAPF61CQot aQx3MPaV7NIq9hT2pvaQagKrVUfw1pxg1GyU9h73zhGHdzXesIb9/56c5gY8pxjYPXuv 4+VPfaTExMrBPRo3NPfXAdpthARF5QRPUgrCwRr+nFUxpUfOeOOtFbRdEoCnLugZW/th iq4/4cvHPuRl6qKDSpJ4E3pskm11nQeRi7yU9DjZr+Ew/P3JOQunwbOyiom986WOlLLb XUWu6QKX2klQeIk89lC5aphFB8TAQzHEsAQIDRHnetBo2cVjwZ2e5i5n3zFspqFGpwT2 Iqsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=bcrQZM6hkz9cDN50WEOYiQeKHL6phEi9SN4MfmJRdz8=; fh=g8syAsbUwPtDKzjvB8x5a1yw/xuzz7joOXUrNuYRhRQ=; b=xA8HuaRrIwwUrBlwBsg4QH/JXesrYchCfI7VaoBa1MSZlrUC79Y943wkndzD3gEYuf S9CNF2bz0oboFqaLHWiz/IayyXSyui2Z5gC/QXEmADC2bFtoIjplO5/nIapyW10vT4jr lT7aO48a8tItKJ58LBN3AL4YB3cnPePMwyJPicKCLHg8IxELKqDQ43rdFx/q82kPvd8R jeCyZQcEU9kYT77mnIqev60OmacSQdeNozNYIYD1AqbcgokiXyehSOjF5A6+U9zKbhA4 RBdEI7J+qA6+emIuQLN3NPPsVkPWtfsV8fdD28T4iqgW0aglsPXixi0TGRUG8Lck2LZZ YrNQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="oTLW0/Aq"; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-58068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev X-Forwarded-Encrypted: i=2; AJvYcCVP6fgapXbNTSqBd8E3Io8+TOMGnBR/n1gvM6ZIlwvAstYjmgR6hH1hhZ66gqVT9EI61cOPZ+bIZdu+uoSnWXwucPhWlSr0XBvQbnFPYw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b9-20020aa7d489000000b0055fba06bc23si863964edr.235.2024.02.08.04.39.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 04:39:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="oTLW0/Aq"; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-58068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1629E1F22FFF for ; Thu, 8 Feb 2024 12:39:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A1BF071B30; Thu, 8 Feb 2024 12:39:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="oTLW0/Aq" Received: from out-179.mta1.migadu.com (out-179.mta1.migadu.com [95.215.58.179]) (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 B10866EB4B for ; Thu, 8 Feb 2024 12:39:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707395977; cv=none; b=L5EE3RG+KxapS00Q7plH3POIeXd8FdkmrwF5yVsQ+y3sduYfSSGCo8ykCJA1Xw7T6DVO5vsCSdNGiQqhe7mK9xmp1UJxfRBqQvJClNt82q5N+7fEO1QDhbm6ZfwSdaEcbvGB8OVxQhISDWv/W1jSx5hJVSrWYna+T1BWd2RjLoo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707395977; c=relaxed/simple; bh=OzNXrJ5+9OpNuA9ipO7wxu3F9ctAhrYZRnDK/Tv67Ec=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=opwNG/Z6pwQIKfZaYVFdnQDlWr6JiW7yZrZ3ULEPNeyaXgXY7q0TM+sWdz1gISVJCTAvphkCuLHcnpUrB0kwauWMosxsirvd6vUDcJlsiYetWc8E7oINQZdwKOJ3tj5Abm96UZwyOef5PwZurMM7WBz7xLe2QW0B9lBrmh7WdM0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=oTLW0/Aq; arc=none smtp.client-ip=95.215.58.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1707395973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bcrQZM6hkz9cDN50WEOYiQeKHL6phEi9SN4MfmJRdz8=; b=oTLW0/Aq6yHNneUku49o4IepEiehnecTWP2EMLydr8ex5Tc/6dqzt/twNlK+IciP7YecPB Xz9JGKnUYMlk4rdhscKtrauZD5jTUWmMJU927GHxHcZz2DBX3o4hd+6/2vKepOu/Lonv2z k/D0wWHf5Du7W8a05MQiXR/JdnNpNi4= Date: Thu, 8 Feb 2024 12:39:24 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH][next] drivers: net: xgene: remove redundant assignment to variable offset Content-Language: en-US To: Colin Ian King , Iyappan Subramanian , Keyur Chudgar , Quan Nguyen , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240208122012.2597561-1-colin.i.king@gmail.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20240208122012.2597561-1-colin.i.king@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 08.02.2024 12:20, Colin Ian King wrote: > The variable offset is being initialized with a value that is never > read, it is being re-assigned later on in either path of an if > statement before being used. The initialization is redundant and > can be removed. > > Cleans up clang scan build warning: > drivers/net/ethernet/apm/xgene/xgene_enet_cle.c:736:2: warning: Value > stored to 'offset' is never read [deadcode.DeadStores] > > Signed-off-by: Colin Ian King > --- > drivers/net/ethernet/apm/xgene/xgene_enet_cle.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_cle.c b/drivers/net/ethernet/apm/xgene/xgene_enet_cle.c > index de5464322311..8f104642897b 100644 > --- a/drivers/net/ethernet/apm/xgene/xgene_enet_cle.c > +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_cle.c > @@ -733,7 +733,6 @@ static int xgene_cle_setup_rss(struct xgene_enet_pdata *pdata) > u32 offset, val = 0; > int i, ret = 0; > > - offset = CLE_PORT_OFFSET; > for (i = 0; i < cle->parsers; i++) { > if (cle->active_parser != PARSER_ALL) > offset = cle->active_parser * CLE_PORT_OFFSET; It looks like more refactoring can be done here. "if (cle->active_parser != PARSER_ALL)" is static, no need to check it inside the loop.