Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3458855ybi; Fri, 5 Jul 2019 07:42:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxq6cVKxim4mubGdTFpmALZm0DK+UJ8EwhYg6BB2149zzlvceUfq+Gp0NmIl/IeG0qn6aXx X-Received: by 2002:a65:47c1:: with SMTP id f1mr5849873pgs.169.1562337744590; Fri, 05 Jul 2019 07:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562337744; cv=none; d=google.com; s=arc-20160816; b=0ZhmUmME2ocg0RTV8Lsb0Wi/YQopIElP10Ww+3O1jvxFRuUhAOwvS8d9fxuxO4669K MOWQ+qrY5Zbc0dAKszHe5BZyMsKFfLrTUR/ZrFsqqsw7iDAOkp9CWXEi11I/XYJylcMp Ak+lUm6oiUvuDl7faMWblalyGEwvwxv+N5q9/0SpxjrF6TP7qL22GZxvfK/ZsGzWtZON c7lvsQJZnq/V3lt9xQmPswdKZXIq3BUWau3FJYGDnNCo+9BXToulhTARVui+MhDn9/9A FeUab/zJ4m3+IRq8WZY30lPB5rPAGwoZISxJMXFXBIA6NIh0kUJ7VfdQUe3kajQNO79X P8eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:reply-to:references:in-reply-to :message-id:date:subject:cc:to:from; bh=CwMW8uz+W2/4H5XCjKG8eVY8dVOqEpHF0h8gv86y/IA=; b=EnvjqQb2h6Cmm9KQTpEdqyuWAORRx21nIVYONTbcXLaHquZJPiVSMHc3EPVS6v2W8P Jd/h+AN997SU85fVeYCZ4ON8UMfkGgVQ1ScykQoq//CsmD2DU5UJtrdvFESuMm7a9e96 JaF2UJtW4Yilci7MyB6ZvrK1llzuFiv6LcPPyCNZusuV1jDmV4L2LkAS2L02eewwikPZ o5isKwsmyh2xNkooD/ylAhBbvt6dZW6wS3uUsl4I20Nj/G0iepqACohg5zNi1ValC9vO JFRGaOtc8pryUAUPOe4mRHADFxLFTki3HtPw7JnpgMYYhr92UJuKYr9xKjG4L7oVxkNi ojiA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si9920552pfn.40.2019.07.05.07.42.09; Fri, 05 Jul 2019 07:42:24 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727693AbfGEO1o (ORCPT + 99 others); Fri, 5 Jul 2019 10:27:44 -0400 Received: from inva021.nxp.com ([92.121.34.21]:50594 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725778AbfGEO1T (ORCPT ); Fri, 5 Jul 2019 10:27:19 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E6F0A20076B; Fri, 5 Jul 2019 16:27:17 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id DA71C20076A; Fri, 5 Jul 2019 16:27:17 +0200 (CEST) Received: from fsr-ub1464-137.ea.freescale.net (fsr-ub1464-137.ea.freescale.net [10.171.82.114]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 99FEA204D6; Fri, 5 Jul 2019 16:27:17 +0200 (CEST) From: Ioana Ciornei To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: ruxandra.radulescu@nxp.com, Razvan Stefanescu , Ioana Ciornei Subject: [PATCH v2 1/6] staging: fsl-dpaa2/ethsw: Fix setting port learning/flooding flags Date: Fri, 5 Jul 2019 17:27:11 +0300 Message-Id: <1562336836-17119-2-git-send-email-ioana.ciornei@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1562336836-17119-1-git-send-email-ioana.ciornei@nxp.com> References: <1562336836-17119-1-git-send-email-ioana.ciornei@nxp.com> Reply-to: ioana.ciornei@nxp.com X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Razvan Stefanescu ethsw_set_learning()/ethsw_set_flood() use flags parameter as an enable/disable (1/0) indicator. Previous usage sent incorrect values. Signed-off-by: Razvan Stefanescu Signed-off-by: Ioana Ciornei --- Changes in v2: - none drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index f73edaf6ce87..87470070c3a5 100644 --- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c +++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c @@ -673,11 +673,12 @@ static int port_attr_br_flags_set(struct net_device *netdev, return 0; /* Learning is enabled per switch */ - err = ethsw_set_learning(port_priv->ethsw_data, flags & BR_LEARNING); + err = ethsw_set_learning(port_priv->ethsw_data, + !!(flags & BR_LEARNING)); if (err) goto exit; - err = ethsw_port_set_flood(port_priv, flags & BR_FLOOD); + err = ethsw_port_set_flood(port_priv, !!(flags & BR_FLOOD)); exit: return err; -- 1.9.1