From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-174.mta0.migadu.com (out-174.mta0.migadu.com [91.218.175.174]) (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 4665A200BB2 for ; Thu, 6 Mar 2025 10:28:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741256907; cv=none; b=N261xKGUxlmZLi9m4QCVQRyVAhXV4rcZ7dSRkeg5kcz8/hNyUhfP7MvXkKfhm+nsWBvCkZvIYsl3YUNt2b8571co8DD7vgDiLoHlyRM8OZY9Zjm72STSqA+SWNnhMQA80XiIO7MifBjptI179ScXGz6/GU9BENj32w/gfKFWWfs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741256907; c=relaxed/simple; bh=qI8it5A5hlwyHuUSeuaxgIYo1Ohc1NWkDcH6Dn5NCdE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WGdzl23PL2Du4qjSKetGgeawc5EpIVv6o2GKfQnfNbxO9nlYF0cAOlc5GqkYBHJomjkBv/J2m1oM5sF9QxIsdeksrFkEtX4Sk1cy2+56sMclAeQRCqshRRRR5JX/4Z0xh8ELc59YaT5T4GweSjWbIcxdJp7/fkA0Gtm1g4sQUZU= 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=mpXhhjB7; arc=none smtp.client-ip=91.218.175.174 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="mpXhhjB7" Message-ID: <6b4c0c8f-8d3a-4e10-840f-7f2fa1bc8800@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1741256903; 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=pqWU0pywSUoU0LqWrGdm1CtIEy9jCGEQBVNyKe4FV4o=; b=mpXhhjB77skez3U0Dqjj8qBhagUhFdG0P5QdWkme940gWN7wKyYbLhQkkPUtt7auyoiNIM uFWxa84h9QxNhDghxTFH+wblg9cEs0doLCTFSRBWr6vlpUeOUMQKhkbEtrLtZlW8sSzbs9 eBQd1AWoEKNCnkTIw9v/SghrYyOSquI= Date: Thu, 6 Mar 2025 10:28:19 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH] ptp: ocp: Remove redundant check in _signal_summary_show To: Ivan Abramov , Richard Cochran Cc: Jonathan Lemon , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org References: <20250305092520.25817-1-i.abramov@mt-integration.ru> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20250305092520.25817-1-i.abramov@mt-integration.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 05/03/2025 09:25, Ivan Abramov wrote: > In the function _signal_summary_show(), there is a NULL-check for > &bp->signal[nr], which cannot actually be NULL. > > Therefore, this redundant check can be removed. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Ivan Abramov > --- > drivers/ptp/ptp_ocp.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c > index b651087f426f..34c616bd0a02 100644 > --- a/drivers/ptp/ptp_ocp.c > +++ b/drivers/ptp/ptp_ocp.c > @@ -3959,9 +3959,6 @@ _signal_summary_show(struct seq_file *s, struct ptp_ocp *bp, int nr) > bool on; > u32 val; > > - if (!signal) > - return; > - > on = signal->running; > sprintf(label, "GEN%d", nr + 1); > seq_printf(s, "%7s: %s, period:%llu duty:%d%% phase:%llu pol:%d", Thanks, Reviewed-by: Vadim Fedorenko