Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4019265ybv; Tue, 25 Feb 2020 11:34:29 -0800 (PST) X-Google-Smtp-Source: APXvYqxhh2awM+8G4bP6KmIQ474HsGN+WXvfOD/aMIZseHs6JJoqK0LWZLG56rD+HIwrsj/lT0xI X-Received: by 2002:aca:a9c3:: with SMTP id s186mr370697oie.31.1582659269550; Tue, 25 Feb 2020 11:34:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582659269; cv=none; d=google.com; s=arc-20160816; b=wwMopvvWB1L6GB+ACjBaVw3ScSA2SjoD3AX1feMhA1HKEKfHnVD9Bpm85IkZtsigQ6 yz9fYfeqxKsQFPpagtUZT5d1aZLUb4zP6FJPwx8anxE17Qg+HLToTmn2lDyTacP8cQ9W IiCZBvm7MvAjewjENvQo08/qaFOnMQb9z9m32sb+WEYGsrEtpMAGg3tjVM7m5tPYPBU+ 9DBpI/i2P4BfAaLyr3DSEQe06YrzV5sAA52IhboL7CPkgftZU95gEIIQZYXTYy6cFvfC onoQ7aqa8eTa0hld0w/VKNUJmkVZao0NepIvT1LZqjA0YgIxqOw6/TOsywP6TYSBy4Yp SMHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=in7aYmsN5xPAwxg2V32Kr728j+B1q+RuGctqX7GD+P0=; b=n4OSothHVQq/qVVLEz4DOrJoWX2pyE0RQ/3l0CYSesZtBCtUMWZo8i60DwC9Yr6Iyi enoBPRVtm3qxGMvBZrLTg+JA7bQqA5oFraeAfrCp2vI3OKDtKi5ANdFrbrtUNvuakdkj S4yy/2cjAbRqkO/jJleC5iHniOZyKZdXBqu3bcdoU0KRUTzt6B8DDd9ButMQBUyDvG5f GBQJFZZKl3uR8YaJA5RYK+QfqDbhlCtlRdCnF3Le3RuZ6wkmFsBb82kWjkrOrJJNMx5T j04KdRXGqu0yDQkFmXbki3taWkyb7c+nvzNn74DRPa/FfylYX/ruAHbZ8F1/OlrrdM4w QdrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s8si82403oic.7.2020.02.25.11.34.17; Tue, 25 Feb 2020 11:34:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731223AbgBYTKc (ORCPT + 99 others); Tue, 25 Feb 2020 14:10:32 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:48774 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728065AbgBYTKb (ORCPT ); Tue, 25 Feb 2020 14:10:31 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 0C11313B48C3E; Tue, 25 Feb 2020 11:10:31 -0800 (PST) Date: Tue, 25 Feb 2020 11:10:30 -0800 (PST) Message-Id: <20200225.111030.1608169659746789536.davem@davemloft.net> To: aaro.koskinen@nokia.com Cc: peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: stmmac: move notifier block to private data From: David Miller In-Reply-To: <20200225111615.17964-1-aaro.koskinen@nokia.com> References: <20200225111615.17964-1-aaro.koskinen@nokia.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 25 Feb 2020 11:10:31 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: aaro.koskinen@nokia.com Date: Tue, 25 Feb 2020 13:16:15 +0200 > From: Aaro Koskinen > > Move notifier block to private data. Otherwise notifier code will complain > about double register with multiple stmmac instances. > > Fixes: 481a7d154cbb ("stmmac: debugfs entry name is not be changed when udev rename device name.") > Signed-off-by: Aaro Koskinen This doesn't make any sense. We need only one instance of the stmmac notifier registered, no matter how many stmmac devices are probed. Please change it such that we only call register_notifier() once (when the first stmmac device is probed) and only unregister_notifier() when the last one is removed.