Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4513912pxt; Wed, 11 Aug 2021 07:44:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweiKpUuWLQbkuB+KxX37s1s8tKdBi4nPMBoZ1HlGwtR8ItshSvHAeYkbewf6ZXaoPYaV/4 X-Received: by 2002:a17:906:cd02:: with SMTP id oz2mr4053345ejb.227.1628693056184; Wed, 11 Aug 2021 07:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628693056; cv=none; d=google.com; s=arc-20160816; b=rpWXBQRNHX8ZWB+yiqZGTw4okA1QmdzZOF+5/zFc19k2lTHeLu7ZLMBBIlKnEcDYXS ZKOCxf4c0flZTsq+6Dn2v0B79/d0fJvwxghrfePjBOLBYXa/forIScmfk7cTFvWggNIS JgbTipOYDrx/Ad+i974Ds/oxcOJ8c+nwO5YgPmnIpdWVhIsCEGinlEIRTa7xXDoasbGz VrzPYwUmOOaaUqz2JVE0rqvCtOvuyFYydobXGeuGI4ZLPnFaplY33LQ3Eq/gDPjNJB2l /apKBtn0ugHSCh5rc+oeVocbvxF/Jx+vdVihilu3/gmeRg1AT+PwRxci/W87I4r8ZSow xQHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=H04mt228TLJQ4ASnmfrV9b3FewFE2jggDXP/9KA7mws=; b=cpjxYX8VvVLHnsruNorgt0LLNJQgC84TwNPXet9mXDKBy7kR89VhTAY19J0+9VlPoh Jkff3Bkv/HBB2KNJ4/2ylur8ssHUbb3LCji6BeYwgjNu5289e5Tk/nBkaUz1LIqxZdHG 85U71NQ9X+jEzY+4SWe3GVl4rZTnBzMcn5GP+f7yxTPKgqTUAXtr51jxuoy1/5IQ7gUw GEtBCMUdKhtg6TVeCNvzB0Rb5XAL5tbbalOlUanhCxE94BUD9S/b96fPcZYn6p3NdEyt k9wKEwBUK4zPaTK/dng8hdi9RoizECYQOrx4oEcop1TlKK4Ry0mLeiv4gEbeELyMgV0z xZXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=1uGQs0cU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s20si23810664edw.154.2021.08.11.07.43.51; Wed, 11 Aug 2021 07:44:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=1uGQs0cU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232494AbhHKOkP (ORCPT + 99 others); Wed, 11 Aug 2021 10:40:15 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:45200 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232468AbhHKOkO (ORCPT ); Wed, 11 Aug 2021 10:40:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=H04mt228TLJQ4ASnmfrV9b3FewFE2jggDXP/9KA7mws=; b=1uGQs0cUovIQKREwKGfpuLaxcZ aw64nyjB5W/+PwFJp96X+mCJJC1otAg9qnAuh6ahcQdJivhtDF5uG5L4/YrqguoD2XUCBw6ydfaZk U+S0oYE+G3+Jd0+O9PAonTbleZDozuDQFVuCbnBjZ0onDIFxGe+vUC9cK3H9GVW1h6Hw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mDpOT-00H8B3-W4; Wed, 11 Aug 2021 16:39:45 +0200 Date: Wed, 11 Aug 2021 16:39:45 +0200 From: Andrew Lunn To: "Ivan T. Ivanov" Cc: Russell King , Heiner Kallweit , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: phy: leds: Trigger leds only if PHY speed is known Message-ID: References: <20210716141142.12710-1-iivanov@suse.de> <162646032060.16633.4902744414139431224@localhost> <20210719152942.GQ22278@shell.armlinux.org.uk> <162737250593.8289.392757192031571742@localhost> <162806599009.5748.14837844278631256325@localhost> <20210809141633.GT22278@shell.armlinux.org.uk> <162867546407.30043.9226294532918992883@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <162867546407.30043.9226294532918992883@localhost> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I think will be easier if we protect public phylib API internally with > lock, otherwise it is easy to make mistakes, obviously. But still this > will not protect users which directly dereference phy_device members. Anybody directly dereference phy_device members, rather than going through the API, is directly responsible for any breakage they cause. This is not a supported use case. Andrew