Received: by 2002:ab2:7444:0:b0:1ef:eae8:a797 with SMTP id f4csp24948lqn; Fri, 15 Mar 2024 11:39:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9VH/PzK58ZVtKN40QZD0fNAEv5QbjRPjjxVoK2fEsg/EQlX579ZoeGp0j3pyCHhn20Moy9GXTlJahaegCgppyPLPV1Kwx65ny7tamHQ== X-Google-Smtp-Source: AGHT+IG+IhfJGDSbn29gN6TtXYPTWXzvnkMy+nnCPnJ7zPLmEpwrLEcmDrHaI52hj/iOYrSQjan8 X-Received: by 2002:a05:6a00:b4c:b0:6e6:f799:5480 with SMTP id p12-20020a056a000b4c00b006e6f7995480mr2953197pfo.4.1710527956843; Fri, 15 Mar 2024 11:39:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710527956; cv=pass; d=google.com; s=arc-20160816; b=h643mhvLbk0cEc2+rKnBFOiu3nikolVu1S/JfrmRt9CJ23DCo9tAns97KsxJhuTaKL kSY9zTtr1G8c8v56yaoBJfNuT4C0hBn0eakweM+wun4B6WLr36bMzw0e+dxA/d5qS1PT toeHQkV/rdJ0c3eGfOTy/NUyXramjFzF54FImxBi2oMjtRupZ+v3iAs9/CWemvXievwP ejUNyNIcgtAD060lp7nWGqYnUj3qXlHDZDlGRVc5TDsVseotXXd+lIK5gj6ptLRFQgjl 4y7+9dTH/daTaXaTorpnNSICJzN/BxNN1ajdMzICiDOH9htVi72lBcl+xrJ0GfBHFT68 awoA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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=xaGS7BGnjMck/bV5iUN/Gm9lsk2oMymyo55vI3BCLdM=; fh=gf+UdtWuUZdEIwyHlksi4v+eL+bx8rLvIcfagI9Jhes=; b=B9TNjIORoRpvZN1h0+nIU+X7B2ygcF+820ImQdLXfYTZvkRbJEEOei90Vm4t5cCm/V zY8j9WWvrFc3g4MrE9RdmaqDq+71n9NkUTDNtVFGOfPCstveiMg71YK2K971ce8R/OX/ JCrF4u2AkjEO1iQT0S3reSd0CKOoESsUPVVymz8pjpEhCBXuZ4VhMZDWoJQhsrOUfES5 zksVq8dRmuFuzmRKz0zkDS3LhM3dsT9EfNm0ZMpCi44TzbcgWaOGcAfDb6uHqVSFX+rx +fKPaJGde1E8UN4yQpAufAJ8eGpkntvugEwnndPl4kuaojoeEQnFiysjfyIe/b5NdpWg TGIQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=RT9ysCUC; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-104794-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104794-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t10-20020a65408a000000b005d8b8c6a98bsi3221683pgp.588.2024.03.15.11.39.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 11:39:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104794-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=RT9ysCUC; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-104794-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104794-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 93146B2155C for ; Fri, 15 Mar 2024 18:39:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A1A7D1EB48; Fri, 15 Mar 2024 18:39:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="RT9ysCUC" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (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 1BB2510A2A; Fri, 15 Mar 2024 18:38:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710527939; cv=none; b=Ax2tcTq+RQoYYZIFqdEf4ZRINFh8SK8Zs86BvF1i144eus+qfc8lxYLpQ8L7DkZPPLt2oH9A5JuCL/LYvPi1lRI/fGG5liuU9MIssIgQJvWN/Z5ZmR4mwnjT+0kUxfWpDUXn6knJC1lVdaFMeBlye5nWXznhAHKzyyv9CIKMdPs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710527939; c=relaxed/simple; bh=8Aoo9eOKWnx5Pa08PI7YI1Dgaa4uYs167pxGa5q6eDU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ipPi0Vr8egnMFnqK+2I0pOCAHw1hZhfp6SGIPzStf0N40PyNCcrAs3yckLfgBm/myOXNVejPRxCDMrT8li0kLVV4CpHlyokW9AYFpnzH5Ws+20TJ6Sa75NaoqD8V0kvhuf0NIeAgmYuVR5In/o/hXbsmoL0793xNXuhIVXjkMRY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=RT9ysCUC; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xaGS7BGnjMck/bV5iUN/Gm9lsk2oMymyo55vI3BCLdM=; b=RT9ysCUC1zc0ThZgFdKk+qmWQp 7y987h3hvq3yuxTdAPi3ycDLp26+qTfQPHcDV02XAYyVEbsntMpNrtaDbD+HLvl3cx9aSiUkHw6bX 4S/9oaDZu/aZJiquzf35RoxS/66oUoGIoKiRE6dU6Z+/ypPjJJg2EtZVPLwza4CT+bp6qYE55Te8z KaRT3rX5GGdARVFwQTPckVK/Q9Ielsiro6iecSsOIKcTFpL2RPeXfJa+JFUMumT6JO5wRtCqaJoZe rY2pTjIAPj5dbG/vGnKKd+9xJ8t7OzH9htAyMJF3o8DWMWO1n6mULmXxIazKrmneSg4c/RXjL4LM2 a3aJUxRQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44850) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rlCS1-0001rx-2a; Fri, 15 Mar 2024 18:38:41 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rlCRy-0006aE-6t; Fri, 15 Mar 2024 18:38:38 +0000 Date: Fri, 15 Mar 2024 18:38:38 +0000 From: "Russell King (Oracle)" To: Nikita Kiryushin Cc: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Oleksij Rempel , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH net] net: phy: fix phy_read_poll_timeout argument type in genphy_loopback Message-ID: References: <20240314164826.161bd398@kernel.org> <20240315175052.8049-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: <20240315175052.8049-1-kiryushin@ancud.ru> Sender: Russell King (Oracle) On Fri, Mar 15, 2024 at 08:50:52PM +0300, Nikita Kiryushin wrote: > read_poll_timeout inside phy_read_poll_timeout can set val negative > in some cases (for example, __mdiobus_read inside phy_read can return > -EOPNOTSUPP). > > Supposedly, commit 4ec732951702 ("net: phylib: fix phy_read*_poll_timeout()") > should fix problems with wrong-signed vals, but I do not see how > as val is sent to phy_read as is and __val = phy_read (not val) > is checked for sign. > > Change val type for signed to allow better error handling as done in other > phy_read_poll_timeout callers. This will not fix any error handling > by itself, but allows, for example, to modify cond with appropriate > sign check or check resulting val separately. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: 014068dcb5b1 ("net: phy: genphy_loopback: add link speed configuration") > Signed-off-by: Nikita Kiryushin Reviewed-by: Russell King (Oracle) Thanks! -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!