Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2963092pxb; Fri, 12 Feb 2021 06:07:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWfe8QBbAefrDo/Wzb163B3P8gkzMtR1PwF0ir5GGpM6d4g69Y+m1TB3iSY3qQ/DHjVVyD X-Received: by 2002:a17:906:da1e:: with SMTP id fi30mr3137957ejb.151.1613138826465; Fri, 12 Feb 2021 06:07:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613138826; cv=none; d=google.com; s=arc-20160816; b=yQgPQOnoSTyKeSHF4T8g0OqX4MtW3ZgfAuGloIJv8Izwiw3kyZBhqZrWiUPheSI9jb Gttgki98teVOdSeS6v4NPRKrpWDxYJ0TlyG9cbiIWZjXYEAU2HR1lHfBArUPFEODcLul AfFrbkyjiOGeDtnRP07Koq5x+msM5UYRWddXo0xKOBz1dShwhYBMtoGU1Jd8ttt9fkMM 8URZVXrHHfmxfnO2S/uoIImnPjGqPhBNEQrnAlwIa5e2FZJBTyTxdUnbI70iUyRO42/5 JmVQn0jTFn9LO5KE8Xu0kNOrDOnpZxfVMJWfORqpC9nmcSx808LCd6PsJFZc+JlioojZ kbgw== 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; bh=T1H7lPwBisizhlfUr3Y9TBLgNsf7qmFzr59cc1eP6K4=; b=wQpTafvyO8tYNjAw+VI44U21HTRrv9wZd53kN6fORGePzvIgTtLGJosvkq1iM/I+Rm 7oglw1UlhL0Bg4EEWX0MAUEyWi8IG1GTCeIAwIGoSvle+ZxU7z+zRRfUC7YbK9/MALDR jQp/F1yxcos0q6w4KfFgRPRXGUeQdzGOMIsRJq6y9yjggEl9sigFXislMFF/0j0sYouW SHnlG8ZXcDb5IGBXzcNxOVPdgMY+DUFjtcLA9nvRFwrWDENo8ECFHk7V8iurQZ5qikRV RTttoKYB4Pp9D4IU3vq9C7tCklMq5xYApM9Gzun4NtyspjcIlJfNtFksPK43+8pHofru 7gJA== ARC-Authentication-Results: i=1; mx.google.com; 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 gv30si6121696ejc.474.2021.02.12.06.06.42; Fri, 12 Feb 2021 06:07:06 -0800 (PST) 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; 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 S231178AbhBLOFv (ORCPT + 99 others); Fri, 12 Feb 2021 09:05:51 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:36880 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230182AbhBLOFi (ORCPT ); Fri, 12 Feb 2021 09:05:38 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lAZ3y-005q4A-U6; Fri, 12 Feb 2021 15:04:50 +0100 Date: Fri, 12 Feb 2021 15:04:50 +0100 From: Andrew Lunn To: Saravana Kannan Cc: Heiner Kallweit , Russell King , "David S. Miller" , Jakub Kicinski , Android Kernel Team , netdev , LKML , Jon Hunter Subject: Re: phy_attach_direct()'s use of device_bind_driver() Message-ID: References: <4f0086ad-1258-063d-0ace-fe4c6c114991@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > So the plan to fix this warning is, when device_bind_driver() is called: > 1. Delete all device links from the device (in this case, the PHY) to > suppliers that haven't probed yet because there's no probe function > that can defer at this point. Just because it currently does not happen, does not mean it couldn't happen in the future. What are the implications of removing the links? > 2. Then call the usual device link status update code so that it > updates the status of the remaining device links correctly. This will > avoid the warning. > > This seems like a generic solution that works for PHY and for any > device that is force bound. I don't know if there is any other case in the kernel where a fallback driver is force bound on a device. But i agree this should be generic. And hidden away in the drive core, with maybe a new call? Andrew