diff mbox

[net-next,15/16] net: remove usage of dev->master

Message ID 1344871635-1052-16-git-send-email-jiri@resnulli.us (mailing list archive)
State Not Applicable
Headers show

Commit Message

Jiri Pirko Aug. 13, 2012, 3:27 p.m. UTC
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 net/core/dev.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ben Hutchings Aug. 13, 2012, 5:15 p.m. UTC | #1
On Mon, 2012-08-13 at 17:27 +0200, Jiri Pirko wrote:
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> ---
>  net/core/dev.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index c0f9adb..8977404 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -5461,8 +5461,8 @@ static void rollback_registered_many(struct list_head *head)
>  		if (dev->netdev_ops->ndo_uninit)
>  			dev->netdev_ops->ndo_uninit(dev);
>  
> -		/* Notifier chain MUST detach us from master device. */
> -		WARN_ON(dev->master);
> +		/* Notifier chain MUST detach us all upper devices. */
> +		WARN_ON(netdev_has_any_upper_dev(dev));
>  
>  		/* Remove entries from kobject tree */
>  		netdev_unregister_kobject(dev);

I think this should be folded into patch 1, since that already ensures
that any master device is included in the upper device list.

Ben.
Jiri Pirko Aug. 13, 2012, 5:31 p.m. UTC | #2
Mon, Aug 13, 2012 at 07:15:31PM CEST, bhutchings@solarflare.com wrote:
>On Mon, 2012-08-13 at 17:27 +0200, Jiri Pirko wrote:
>> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>> ---
>>  net/core/dev.c |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/net/core/dev.c b/net/core/dev.c
>> index c0f9adb..8977404 100644
>> --- a/net/core/dev.c
>> +++ b/net/core/dev.c
>> @@ -5461,8 +5461,8 @@ static void rollback_registered_many(struct list_head *head)
>>  		if (dev->netdev_ops->ndo_uninit)
>>  			dev->netdev_ops->ndo_uninit(dev);
>>  
>> -		/* Notifier chain MUST detach us from master device. */
>> -		WARN_ON(dev->master);
>> +		/* Notifier chain MUST detach us all upper devices. */
>> +		WARN_ON(netdev_has_any_upper_dev(dev));
>>  
>>  		/* Remove entries from kobject tree */
>>  		netdev_unregister_kobject(dev);
>
>I think this should be folded into patch 1, since that already ensures
>that any master device is included in the upper device list.

Right, I will squash it into patch 1

>
>Ben.
>
>-- 
>Ben Hutchings, Staff Engineer, Solarflare
>Not speaking for my employer; that's the marketing department's job.
>They asked us to note that Solarflare product names are trademarked.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/core/dev.c b/net/core/dev.c
index c0f9adb..8977404 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5461,8 +5461,8 @@  static void rollback_registered_many(struct list_head *head)
 		if (dev->netdev_ops->ndo_uninit)
 			dev->netdev_ops->ndo_uninit(dev);
 
-		/* Notifier chain MUST detach us from master device. */
-		WARN_ON(dev->master);
+		/* Notifier chain MUST detach us all upper devices. */
+		WARN_ON(netdev_has_any_upper_dev(dev));
 
 		/* Remove entries from kobject tree */
 		netdev_unregister_kobject(dev);