Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1173566imw; Fri, 8 Jul 2022 21:22:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1treaJfNkP/eGUpvK14H/xPWRt6+1dD81BF/vk/S9Q7HE6GI4RZZL8YH8OM4qe49oa/YsMl X-Received: by 2002:a63:68c7:0:b0:405:1da9:ab69 with SMTP id d190-20020a6368c7000000b004051da9ab69mr6346168pgc.233.1657340550004; Fri, 08 Jul 2022 21:22:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657340549; cv=none; d=google.com; s=arc-20160816; b=BWF+Nn6btRhbD9QVXPhDfHOX0ctZrPIWB3xFZyHFfNeBk1wb9m1Nj6UIBoB4ciGyh4 5ltb0jokfTb+50S7Oo1t5d+rrbjqy8OTUQWrPWQC5r+J37Avb9nEuLa1JTSOKNw2O8KB xzoUXgW/Bjh+WSZ+Ut9xK8Qht8RaQFx/JFOGTkAgrrzbh16QP6u14XiyVHHcCvIv8Jii KJFvPnMin0g7Yxt5oLgJnugPzdHFW7K78DABvi4HuakwFtUaLMmt7HOIb2uDjoG60XRx CizV53Hv88QXb2NGLHcJju0b6lMUTgAWZ/oCE84AhSGzC4eysea9U+AfBARyL4s6mtRW hycg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=AwzYD485itWvC65nxOa5NnlpCor0C1SROlvXcr/DAyk=; b=MvhPBgWJLkUMX7rRl7PgaoEAd/V/Rh9G5vU5d6e5j6HWcVAv5Vd9WwJPwV/R+AjM36 Hw2Y/wBbg4f5cVpAWy/kpImwP8GGIG9FqozFWThQ6jWK4UyUofBfsWDOt/PGQLSi6Xnm 2B74VTSzyVgZYN02IjJW0fW5zJLrH50O5idmWP0bxm7QqjTvVofQAxEyr8hoSABUXrnk lrKL+ptLn7Oz//YXiWqXxL9sXkElsfan8121M/4XmYAAF2XoBzURcP6ibZc51N6rp7j6 H0Z7Ni2uSQBiQXu2/Qf8bJSnQIHAeRTVVt6fJZmhO46W+oumUcB5qATaomsl0jey++OT EIxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=slEcjB1j; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z25-20020a056a001d9900b00524cfcbae7csi1005553pfw.41.2022.07.08.21.22.17; Fri, 08 Jul 2022 21:22:29 -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=pass header.i=@kernel.org header.s=k20201202 header.b=slEcjB1j; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229536AbiGIDjO (ORCPT + 99 others); Fri, 8 Jul 2022 23:39:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbiGIDjM (ORCPT ); Fri, 8 Jul 2022 23:39:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 097FC820D9; Fri, 8 Jul 2022 20:39:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4FCABB82A4F; Sat, 9 Jul 2022 03:39:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9EAC2C341C0; Sat, 9 Jul 2022 03:39:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657337948; bh=XWVQ/Q6W3I3bvxKqfJpupU4xGnWGQM+x9j/rteGJzrc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=slEcjB1j+8CrEvsCLvwTmy1AWPlIYyAtooUq5uQJOQCy1YHCeJn8aZZLu1R7fUiO+ bM1bkhRj2Y/6WVuHI8W9CyFLEZyaAtvvwQeLmLg4iAhMoAmtTvuPeShmSe2vnn5Eui c4wqF17CZvDgNeMiuX5Ri4OEUN9UCLcjRGltONtRFqNO1+a+2KfAXzbJSyw6rMe+El jaRA5o5eWAghYX7FbkIDMNO05rfoaDPXi7B6ipRexDp8qLAc1eaNLxWnOj+mtx5f3S nmN2v6+q+7SwC51vY4yjZB2g6AoEu/gRB6f9IGXYkzYZm/lENRSDffYDseiUVcVy0C qdIV3Yp9lEbXg== Date: Fri, 8 Jul 2022 20:39:07 -0700 From: Jakub Kicinski To: Oleksandr Mazur Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, tchornyi@marvell.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, lkp@intel.com, Yevhen Orlov Subject: Re: [PATCH V4 net-next 4/4] net: marvell: prestera: implement software MDB entries allocation Message-ID: <20220708203907.253df7a9@kernel.org> In-Reply-To: <20220708174324.18862-5-oleksandr.mazur@plvision.eu> References: <20220708174324.18862-1-oleksandr.mazur@plvision.eu> <20220708174324.18862-5-oleksandr.mazur@plvision.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Fri, 8 Jul 2022 20:43:24 +0300 Oleksandr Mazur wrote: > +static int > +prestera_mdb_port_addr_obj_add(const struct switchdev_obj_port_mdb *mdb); > +static int > +prestera_mdb_port_addr_obj_del(struct prestera_port *port, > + const struct switchdev_obj_port_mdb *mdb); > + > +static void > +prestera_mdb_flush_bridge_port(struct prestera_bridge_port *br_port); > +static int > +prestera_mdb_port_add(struct prestera_mdb_entry *br_mdb, > + struct net_device *orig_dev, > + const unsigned char addr[ETH_ALEN], u16 vid); > + > +static void > +prestera_br_mdb_entry_put(struct prestera_br_mdb_entry *br_mdb_entry); > +static int prestera_br_mdb_mc_enable_sync(struct prestera_bridge *br_dev); > +static int prestera_br_mdb_sync(struct prestera_bridge *br_dev); > +static int prestera_br_mdb_port_add(struct prestera_br_mdb_entry *br_mdb, > + struct prestera_bridge_port *br_port); > +static void > +prestera_mdb_port_del(struct prestera_mdb_entry *mdb, > + struct net_device *orig_dev); No forward declarations in the kernel, unless the there is a circular dependency. You should be able to just order the functions correctly. > + list_for_each_entry(br_mdb, &br_dev->br_mdb_entry_list, > + br_mdb_entry_node) > + if ((err = prestera_mdb_enable_set(br_mdb, enable))) > + return err; Like checkpatch says, no assignments in the if statements.