Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp676995lqb; Fri, 15 Mar 2024 03:26:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU24hTHQvgBXPZLhSx5EwNgGu6GG+IaitsgUnDR9hwGdTyyIXraAlQOyikgeyV7Ecka3fsikzccaK2kzLwv/vPLTY1RBglKBJUsXRF06w== X-Google-Smtp-Source: AGHT+IF7yo/CNv4sK28aMEgNHKyzQ2l8mcM53da94DrmXMn+j23xIiilIwwoQczzvC9u0H99QLNI X-Received: by 2002:a25:e04e:0:b0:dcc:1dc4:15e4 with SMTP id x75-20020a25e04e000000b00dcc1dc415e4mr4447558ybg.47.1710498376874; Fri, 15 Mar 2024 03:26:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710498376; cv=pass; d=google.com; s=arc-20160816; b=C7gdmhvURYYasShqjyecebBdc9gm40n/9AKyck23k3ze8A2RGWRvVJ6gCuXwkwwuBg 8bPamyFcAnthlwwLyA9/zCb+Bn87qzDo2MDhN/cwtCL8//JkUY160wZX48M21NLr2keW TtasH6IJTz97Mtyl5qpQZq2U9BKIR8WPUzwcpJktj2UnrOH8P8BTnCDsz1y0bonOpv3H CPAzPeoWqP1f5YLL3oukP21q5G752BK20xMhVEMYYgVrkJLORjT0ggAgQRfnBZc0tllc g2wfNoiok0+hPWynAIiv80ozdSgt5CHeStyTa1hGLFuVo8a+fA3AKCHqh+ClxsJQqCdx 1gJQ== 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:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=jVp03nc3Xr1pI2p4TsJC2WZbVsyIRJ6L2OiNB65UPoE=; fh=Fhk9NLvumU6l8UDV5146kydnWoz5TUDTiFfjeKJ04sg=; b=MlMML3I9YfpTnpU9ZOKKpy/PLkWbZ72yMbXLUlWHy/jqHinivTGptNJwM1EfuZYEtk 36FNvKdHHAQkWuOd8Q/BbhpQ+Wu3KBFmF7EmjY4AxFhz7/g5dZ2LDqHlYJ1k1aZNWM6G WnvKrK0pMaczJ8V9l3v1lKli2PdfBeVUk5T49uWQhJiN8RVB/FImlld3G4Cw3pKZp4oS DUGjK0LoQo4/O0jLzxtTl2XtuDf2sE+aRGBvDxX57b7d2nkC6w5oEmTK9AEIPOwaSNRl xUckyMamK2rCqgyvp1ILedh+tYEvzqez5jjCQ1jgsNVKQWV9HG4fTvkMZo4x63GD671Y 1OGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=astralinux.ru); spf=pass (google.com: domain of linux-kernel+bounces-104258-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104258-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h14-20020a05622a170e00b0042ef5673f11si924414qtk.646.2024.03.15.03.26.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 03:26:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104258-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=astralinux.ru); spf=pass (google.com: domain of linux-kernel+bounces-104258-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104258-linux.lists.archive=gmail.com@vger.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 966611C20937 for ; Fri, 15 Mar 2024 10:26:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69AF518E2A; Fri, 15 Mar 2024 10:26:03 +0000 (UTC) Received: from new-mail.astralinux.ru (new-mail.astralinux.ru [51.250.53.244]) (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 4E3A618E1D; Fri, 15 Mar 2024 10:25:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=51.250.53.244 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710498362; cv=none; b=ZqLCR8KVy754gYhDvqFWF25OM5GHkvVC7uY+JBAtLpAjvo9U7rBziM+y+Bgo9XvPsk/VaMaCPnPUnFDO86lUtG+gd7drEc402X4soCALGGCjcmqHLbWzGavK41JEp9KOboQHkMt8R2FpJAT9dvUlnKMOeJvY7FEJSdEyNt713QM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710498362; c=relaxed/simple; bh=znxxTxn2sNcmnhzQDLmAO9i7+RTv/6Iv0UkoT+G+YQk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fvI5kSux8cmOTZG+ggXG+OKOQBPFkK+CxLUzFzGx1c3iPSiFRu6qPWPZK5uonH5XTw4YRTpisMaeMkev754SPE0ONe69uTumEwatU0yim5Vkzckwp98PC5Tj0APZwHu/0etpUj97PI8G38/TLgKs25hWEUi1+yy7VkQIDFRClWA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=astralinux.ru; spf=pass smtp.mailfrom=astralinux.ru; arc=none smtp.client-ip=51.250.53.244 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=astralinux.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=astralinux.ru Received: from [10.177.235.219] (unknown [10.177.235.219]) by new-mail.astralinux.ru (Postfix) with ESMTPA id 4Tx0l10P0szyYT; Fri, 15 Mar 2024 13:25:48 +0300 (MSK) Message-ID: Date: Fri, 15 Mar 2024 13:25:42 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: RuPost Desktop Subject: Re: [PATCH] net: dsa: add return value check of genphy_read_status() Content-Language: ru To: Andrew Lunn Cc: Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Sebastian Reichel , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org References: <20240314063008.11214-1-adiupina@astralinux.ru> <99631ba3-36f9-4eed-80d9-4a663ef46d80@lunn.ch> From: =?UTF-8?B?0JDQu9C10LrRgdCw0L3QtNGA0LAg0JTRjtC/0LjQvdCw?= In-Reply-To: <99631ba3-36f9-4eed-80d9-4a663ef46d80@lunn.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-DrWeb-SpamScore: -100 X-DrWeb-SpamState: legit X-DrWeb-SpamDetail: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehuddgtddvucetufdoteggodetrfcurfhrohhfihhlvgemucfftfghgfeunecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttderjeenucfhrhhomhepteipvghktggrhhipphgrucippihnpihhrgcuoegrughiuhhpihhnrgesrghsthhrrghlihhnuhigrdhruheqnecuggftrfgrthhtvghrnhepueeijedvjeegjefhudeutdejudetteekjeethefhieehtefhkeejieethedugfejnecukfhppedutddrudejjedrvdefhedrvdduleenucfrrghrrghmpehhvghloheplgdutddrudejjedrvdefhedrvddulegnpdhinhgvthepuddtrddujeejrddvfeehrddvudelmeehtdegleegpdhmrghilhhfrhhomheprgguihhuphhinhgrsegrshhtrhgrlhhinhhugidrrhhupdhnsggprhgtphhtthhopeduuddprhgtphhtthhopegrnhgurhgvfieslhhunhhnrdgthhdprhgtphhtthhopehfrdhfrghinhgvlhhlihesghhmrghilhdrtghomhdprhgtphhtthhopeholhhtvggrnhhvsehgmhgrihhlrdgtohhmpdhrtghpthhtohepuggrvhgvmhesuggrvhgvmhhlohhfthdrnhgvthdprhgtphhtthhopegvughumhgriigvthesghhoohhglhgvrdgtohhmpdhrtghpthhtohepkhhusggrsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehprggsvghnihesrh gvughhrghtrdgtohhmpdhrtghpthhtohepshhrvgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepnhgvthguvghvsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhvtgdqphhrohhjvggttheslhhinhhugihtvghsthhinhhgrdhorhhg X-DrWeb-SpamVersion: Vade Retro 01.423.251#02 AS+AV+AP Profile: DRWEB; Bailout: 300 X-AntiVirus: Checked by Dr.Web [MailD: 11.1.19.2307031128, SE: 11.1.12.2210241838, Core engine: 7.00.62.01180, Virus records: 12505325, Updated: 2024-Mar-15 08:07:08 UTC] Hello, Andrew! The dsa_register_switch() function is used in various DSA drivers (in probe function), so it is necessary to check all possible errors. If the return value (may be an error code) of genphy_read_status() is not checked in dsa_shared_port_fixed_link_register_of(), a possible error in dsa_register_switch() may be missed. 14/03/24 16:02, Andrew Lunn пишет: > On Thu, Mar 14, 2024 at 09:30:08AM +0300, Alexandra Diupina wrote: >> Need to check return value of genphy_read_status(), >> because higher in the call hierarchy is the >> dsa_register_switch() function, >> which is used in various drivers. > I don't understand the commit message. Why is it important to > dsa_register_switch()? > > Andrew