Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp40767lqe; Tue, 26 Mar 2024 19:45:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVD5f/af5zn7uat2i3dwltRzkerG1hnMYwoCn76rmxhUhmUq7KWTJxx9lW7IGhU5gvH3UFzElMmqvkoL7gU4FyjlARu73U/gE0KwDLpEw== X-Google-Smtp-Source: AGHT+IFNkdgxVkKXOiLx8zl0jIehmP8Km3zsu9gY21stO0rU5nGWE6kBjkejQCJJ6hSOwXf1Mn9m X-Received: by 2002:a05:6808:d49:b0:3c3:ac72:afd0 with SMTP id w9-20020a0568080d4900b003c3ac72afd0mr11632oik.1.1711507515435; Tue, 26 Mar 2024 19:45:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711507515; cv=pass; d=google.com; s=arc-20160816; b=R7jNxjMD94XjfG9dxe1pvkryvLbm7Xrwv4sPqCrl8hDxDD8ffCBu1Zj6OXroXoHkkg TSwHQ9sRngN8bFcCs7FNaHLSYjDkRPISVp1QLqmPq5TjalbuYRo9F7gZfti+EhB18Q7i Nw+flH4eSKhQ5Qu23K7nt9UUf9ohTOo8zf0kShM7npxe+BHjBKFvlZBOI9iPJO9PsymN VxcaDoUo8L5I2p3dnsOTZH23LI4eh0batKZwKgyLzwf7EYVB4P7ZLQTv7FHNcKgpFlnG peEfup8u1XtE+5+thdWSb6m4SxzQ3xcbZh7k8UeQ20Tt+GIqtt79M070grSTSCFIFuRV NVjw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4QmuyiaIUaiEOsuL4SrT2LgGji/ehcezRApAST7UxxM=; fh=V2HEPP4vz8XcNyu56St8weI7Ww5CJNaNu/hCnn8RNqw=; b=MjqtHkw6rRJxIhoN+r9cBfBcUQnBxLH0R0UUL1M3ftwi8QPE2lM+wKnkhLWFgWkpY2 tuLsH/Opu4xP+v6hSg/R59ymeCNXC68zez0YL5LK5NYRO/WAJvXZ8raaZFGcHLEsxtsO HYn0nggNpl51VwsVLgZoQl+wDLPOLBw+ee2MRo3yeBvEfCTHyOea4thohUMHOnmKoK9y YxrSL//qkCf57cK/rPvOvpH8HOqHr1vlf3MG5xCP8C4LjPR+ep9+SL0Tv6l7+QHbbLkB rQc/JeqV43lyL1Gtz3e8H97yUTVx+Ztd8b+vYGukOzAp3gRJ3Gh/dacvzrjwUw7qby/T 9Dyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Z1fhMWe3; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-120240-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120240-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k72-20020a62844b000000b006e69f482eccsi8362973pfd.316.2024.03.26.19.45.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 19:45:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120240-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Z1fhMWe3; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-120240-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120240-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com 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 1A51928DBB4 for ; Wed, 27 Mar 2024 02:45:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0723621A04; Wed, 27 Mar 2024 02:45:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="Z1fhMWe3" Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) (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 8E64C22612; Wed, 27 Mar 2024 02:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.156.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711507502; cv=none; b=f9bjsWWC61qukVQcmzx49oaw2zk/kkHJeO0lZVIKJJOdB8kfhKfi/kVG9ojc3DAeC1oUVnu2aZ3yKePtRz7PjZHtMxeRwXC1Bw7s8w9U1OO1mM0f/DSQFL0ZN+Vgb7or7A9fVUHmZMBHCsd2cRdzj0CsasagPnQv6mdBjMtyxNU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711507502; c=relaxed/simple; bh=ZlGdXtQ6a+IU1Vfo0LbtA3kntZ1k0nC7uGGUg4o2CX4=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Gdtrb5t8Rv9yQaKfcN1rOX8Jf/IYK4vq51RJP6VswB+fzi+7Q6ABJazXwE86Q46+zHw9wlS+bKIBkwopuYA9t9MXz4RAWSlYcvzmTEvm5R9PRj0Tzl/5q/ndSgyt71TFeJyK+G7pH6gocpCRIg6Le1Do+fNxu3TQHyqPwU8sEnE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com; spf=pass smtp.mailfrom=marvell.com; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b=Z1fhMWe3; arc=none smtp.client-ip=67.231.156.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marvell.com Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42R0kKqf016499; Tue, 26 Mar 2024 19:44:36 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=pfpt0220; bh=4QmuyiaIUaiEOsuL4SrT2L gGji/ehcezRApAST7UxxM=; b=Z1fhMWe30IsR8B4KIKc9ygGeOg/EdgzvFxkjn/ 0kl1wXaFIvVpOugHlGA13cXVKDPhUA+zWeQIQHSdlzcOf2m2Tk/mh6k9zaf0Ls/u R/dgor2G0klECE9We2nD0wbNvc5nyiVMhbwFKsMjFMAbiiCxuQybZ3J3g8o4CuLK 425P8DMZVrQlXZbzR5QxPA4apbABCtLBUkCAsWwQk7R4N1Eob1rwXS0xH9uVL+NZ xc6SUCvGZGxdLgCTvGXWKCgGUIeBgjOzlyqoZxz4mUbLFiXjcTaci977x5XK54f2 0L0WubXlsL7BCf0PTnnsGYa/u0xCLbfLa0zHxmFXTkAwTZKA== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3x3hy1wvk0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Mar 2024 19:44:36 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 26 Mar 2024 19:44:35 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Tue, 26 Mar 2024 19:44:35 -0700 Received: from maili.marvell.com (unknown [10.28.36.165]) by maili.marvell.com (Postfix) with SMTP id 10D783F70BE; Tue, 26 Mar 2024 19:44:31 -0700 (PDT) Date: Wed, 27 Mar 2024 08:14:30 +0530 From: Ratheesh Kannoth To: Nikita Kiryushin CC: Michael Chan , Pavan Chebbi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Rafael J. Wysocki" , , , , Michael Chan Subject: Re: [PATCH net-next v2] tg3: Remove residual error handling in tg3_suspend Message-ID: <20240327024430.GA1370891@maili.marvell.com> References: <20240326183544.488242-1-kiryushin@ancud.ru> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240326183544.488242-1-kiryushin@ancud.ru> X-Proofpoint-GUID: 4AGsAVgXVKnoWQzwul2W_gl7X67FMrx- X-Proofpoint-ORIG-GUID: 4AGsAVgXVKnoWQzwul2W_gl7X67FMrx- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-26_12,2024-03-21_02,2023-05-22_02 On 2024-03-27 at 00:05:44, Nikita Kiryushin (kiryushin@ancud.ru) wrote: > As of now, tg3_power_down_prepare always ends with success, but > the error handling code from former tg3_set_power_state call is still here. > > Remove (now unreachable) code for simplification and change > tg3_power_down_prepare to a void function as its result is no more checked. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: c866b7eac073 ("tg3: Do not use legacy PCI power management") > Signed-off-by: Nikita Kiryushin > Reviewed-by: Michael Chan > --- > v2: Change tg3_power_down_prepare() to a void function > as Michael Chan suggested. > drivers/net/ethernet/broadcom/tg3.c | 30 ++++------------------------- > 1 file changed, 4 insertions(+), 26 deletions(-) > > diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c > index 04964bbe08cf..bc36926a57cf 100644 > --- a/drivers/net/ethernet/broadcom/tg3.c > +++ b/drivers/net/ethernet/broadcom/tg3.c > @@ -4019,7 +4019,7 @@ static int tg3_power_up(struct tg3 *tp) > > static int tg3_setup_phy(struct tg3 *, bool); > > -static int tg3_power_down_prepare(struct tg3 *tp) > +static void tg3_power_down_prepare(struct tg3 *tp) > { > u32 misc_host_ctrl; > bool device_should_wake, do_low_power; > @@ -4263,7 +4263,7 @@ static int tg3_power_down_prepare(struct tg3 *tp) > > tg3_ape_driver_state_change(tp, RESET_KIND_SHUTDOWN); > > - return 0; > + return; > } > > static void tg3_power_down(struct tg3 *tp) > @@ -18090,7 +18090,6 @@ static int tg3_suspend(struct device *device) > { Please address Michael Chan's comment to make this function return type to "void" instead of "int" >