Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp835761rwi; Thu, 20 Oct 2022 05:57:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5p251NM8DjFSVBOG6XdTciGLDI8DRrupsvftW2Jacmgt4nAgY3n6er0MdAJ4d1VavfZypm X-Received: by 2002:a05:6402:5cd:b0:446:5965:f4af with SMTP id n13-20020a05640205cd00b004465965f4afmr11977245edx.12.1666270662400; Thu, 20 Oct 2022 05:57:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666270662; cv=none; d=google.com; s=arc-20160816; b=rUybOzuCCWNQA50u8guLJoAra5jlrTFyA5KSWhfkDKeacymGYrfwn3Yx7mjMKoqJdS tY2L7oDxHZN3HGhSzuKU6fzrTVBc5+oSqSZKzD4SHg/q5GJ7MSH6mqReh8KrkrFOaOhq ZmYxZG9jzUH5s3+PpLX/LDXinKmxGIHYSefIAdDD/tjMiUisTKyibXVu0iIEvsJGKzFg IR2hrHH99IcAKRUW3ZPuJTAhCXpXqMga3e/EmBNEuH+14leD5+q9j/pkbrT5lUkcXyBX m+WywTMCd2pBrbVMRuoC5dDsVxCF6DdOcbpehTHZwFa1viiMLkBPb+7oTKIvqzymhXgI MlKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Zykh0+WPGN9uC9knxmTn71hjuvUREHosM5NpuyOqmLE=; b=Hwvs+W+nrecBV8whGc0mQB3kgvkRUPgcqlf0/1lBnXkI1aTwW2FpDTmvDUNDtgO/YR ztMMK8gR55HZGcFkt2WKU+GBFFowgxv+nG2jGvHkfLR0j9cNGGMb+iDGsAjwk3XxDTCn gWMMbOwy6h8Ei/9JK+9vcXfFrO0mYU5YnxgG8ORmGyAIR3ex8HVqugfqkihNMYlXat/e XSTnW/q9ssvyytxE/1eEHN8WIp5te6kvdWbZQ2UzTdpZGEyK1gda8fowQOx/iKPPIic+ BrFNTQudOc5PWRn/NuqHdo3isMNoROeyznkvs3OaTuReBVJgBpGhXx+6UVf8r4+w0KJ1 XGRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=ak23Vnaq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs20-20020a170906dc9400b00791bcf8aa61si4532978ejc.505.2022.10.20.05.57.16; Thu, 20 Oct 2022 05:57:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=ak23Vnaq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231338AbiJTL20 (ORCPT + 99 others); Thu, 20 Oct 2022 07:28:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231335AbiJTL2Y (ORCPT ); Thu, 20 Oct 2022 07:28:24 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04EBE11CB4F; Thu, 20 Oct 2022 04:28:21 -0700 (PDT) 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=Zykh0+WPGN9uC9knxmTn71hjuvUREHosM5NpuyOqmLE=; b=ak23Vnaqq9Qv1bB9sejzP8Afv0 aztN6bxfGj6qgx77Dbjg5PaK/OHt2DBNZUngZb4x+hI6eZ+rc2xGHf89c72/a8+T1Fl9F/gRv8Ad7 jmQgrsvd04lB84yTh+gJJVWYV2qvy7e8Ezb7yEnEpjlLlA+dylVxTYdUlXsdSiFo9HBpafxl5gzY4 URaqvIw82Cd8h0k/frDSzbgabj6UnSJ7K/zX6bO1/UnMp3qRpsCwbp7LOqsBZ0NQerqp9I4CcYXHb G2CEZA/rX4R95t2mrppMqtPRT/UzPSj8OIz8aft+5TGx8O+Lyzk86gMmSr0Zek3EH/O6hl8oBUWUW 1IHtFjxw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34820) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1olTij-0006wC-Q6; Thu, 20 Oct 2022 12:28:17 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1olTif-00037n-DO; Thu, 20 Oct 2022 12:28:13 +0100 Date: Thu, 20 Oct 2022 12:28:13 +0100 From: "Russell King (Oracle)" To: Alexandru Tachici Cc: linux-kernel@vger.kernel.org, andrew@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, lennart@lfdomain.com Subject: Re: [net v2 1/1] net: ethernet: adi: adin1110: Fix notifiers Message-ID: References: <20221020094804.13527-1-alexandru.tachici@analog.com> <20221020094804.13527-2-alexandru.tachici@analog.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221020094804.13527-2-alexandru.tachici@analog.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Oct 20, 2022 at 12:48:04PM +0300, Alexandru Tachici wrote: > @@ -1688,7 +1684,31 @@ static struct spi_driver adin1110_driver = { > .probe = adin1110_probe, > .id_table = adin1110_spi_id, > }; > -module_spi_driver(adin1110_driver); > + > +static int __init adin1110_driver_init(void) > +{ > + int err; > + > + err = spi_register_driver(&adin1110_driver); > + if (err) > + return err; This is the point that devices can be bound and thus published to userspace. > + > + err = adin1110_setup_notifiers(); > + if (err) { > + spi_unregister_driver(&adin1110_driver); > + return err; > + } And you setup the notifier after, so there is a window when notifications could be lost. Is this safe? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!