From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF11EC43387 for ; Tue, 15 Jan 2019 22:40:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9FD632133D for ; Tue, 15 Jan 2019 22:40:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="FdXLhix4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387447AbfAOWkQ (ORCPT ); Tue, 15 Jan 2019 17:40:16 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:44405 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729846AbfAOWkQ (ORCPT ); Tue, 15 Jan 2019 17:40:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=TH40VLwGLcmT+dNH9/ms165MLGaPKOedQINGQpr6vPc=; b=FdXLhix4QQhj0UwutrK1ZtA+d6+vk9ClZ5iBgjGk+bQ5hp0So9fT8lVTebVgnDaoF0Xpb4F/BU4e1vHaPlhte42Z9h6Mv4ZqHgZkptjOkcVWHaQ7pzKbJLzhO/8KmMhajN+RysJpi3Nl7J0Tv7Dn4+JKWHgWCVObcs8y4Qnnsiw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1gjXNU-0001Dk-Nb; Tue, 15 Jan 2019 23:40:12 +0100 Date: Tue, 15 Jan 2019 23:40:12 +0100 From: Andrew Lunn To: Heiner Kallweit Cc: Florian Fainelli , David Miller , "netdev@vger.kernel.org" Subject: Re: [PATCH net-next] net: phy: check return code when requesting PHY driver module Message-ID: <20190115224012.GF26788@lunn.ch> References: <7943c933-c353-1c0e-14c0-cdbb4d874d0a@gmail.com> <20190115214327.GD26788@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > I explicitly check for ret < 0. If there's no PHY driver module for > a specific PHY ID then the return code would be > 0. > My understanding of request_module() is that a return code < 0 > is returned if something bad happens in modprobe() call as such. Ah, O.K. I was expecting an ENODEV or similar if there was no module to load. I wonder if this depends on the user space implementation? busybox might do something different to udev? Maybe add a comment about the expectation that no error is given when the module does not exist. Andrew