Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751590AbdITBAy (ORCPT ); Tue, 19 Sep 2017 21:00:54 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:38788 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751480AbdITBAx (ORCPT ); Tue, 19 Sep 2017 21:00:53 -0400 X-Google-Smtp-Source: AOwi7QAjM44cFwlz9VPqMSlVU9IK+Fx+OHM9Y5BZZr6k9Jap60QQTvbHQhLnPzi+WOdUV59u3Ifi6Q== From: Florian Fainelli To: netdev@vger.kernel.org Cc: Florian Fainelli , Andrew Lunn , Vivien Didelot , "David S. Miller" , linux-kernel@vger.kernel.org (open list) Subject: [PATCH net-next] net: dsa: Utilize dsa_slave_dev_check() Date: Tue, 19 Sep 2017 18:00:37 -0700 Message-Id: <20170920010038.12393-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.9.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 600 Lines: 22 Instead of open coding the check. Signed-off-by: Florian Fainelli --- net/dsa/slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index d51b10450e1b..6fc9eb094267 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -1294,7 +1294,7 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb, { struct net_device *dev = netdev_notifier_info_to_dev(ptr); - if (dev->netdev_ops != &dsa_slave_netdev_ops) + if (!dsa_slave_dev_check(dev)) return NOTIFY_DONE; if (event == NETDEV_CHANGEUPPER) -- 2.9.3