lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220708203907.253df7a9@kernel.org>
Date:   Fri, 8 Jul 2022 20:39:07 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Oleksandr Mazur <oleksandr.mazur@...ision.eu>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        tchornyi@...vell.com, davem@...emloft.net, edumazet@...gle.com,
        pabeni@...hat.com, lkp@...el.com,
        Yevhen Orlov <yevhen.orlov@...ision.eu>
Subject: Re: [PATCH V4 net-next 4/4] net: marvell: prestera: implement
 software MDB entries allocation

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ