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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241102131201.GI1838431@kernel.org>
Date: Sat, 2 Nov 2024 13:12:01 +0000
From: Simon Horman <horms@...nel.org>
To: Michael Nemanov <michael.nemanov@...com>
Cc: Kalle Valo <kvalo@...nel.org>, "David S . Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, linux-wireless@...r.kernel.org,
	netdev@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, Sabeeh Khan <sabeeh-khan@...com>
Subject: Re: [PATCH v4 07/17] wifi: cc33xx: Add event.c, event.h

On Tue, Oct 29, 2024 at 07:23:44PM +0200, Michael Nemanov wrote:
> Unlike in wlcore, events are queued on linked list
> (cc->event_list) and are handled outside the IRQ
> context. This will be more clear when looking at main.c
> 
> Signed-off-by: Michael Nemanov <michael.nemanov@...com>
> ---
>  drivers/net/wireless/ti/cc33xx/event.c | 363 +++++++++++++++++++++++++
>  drivers/net/wireless/ti/cc33xx/event.h |  71 +++++
>  2 files changed, 434 insertions(+)
>  create mode 100644 drivers/net/wireless/ti/cc33xx/event.c
>  create mode 100644 drivers/net/wireless/ti/cc33xx/event.h
> 
> diff --git a/drivers/net/wireless/ti/cc33xx/event.c b/drivers/net/wireless/ti/cc33xx/event.c

...

> +struct event_node {
> +	struct llist_node node;
> +	struct cc33xx_event_mailbox event_data;
> +};
> +
> +void deffer_event(struct cc33xx *cc,
> +		  const void *event_payload, size_t event_length)
> +{
> +	struct event_node *event_node;
> +	bool ret;

Hi Michael,

A minor nit from my side: ret is set but otherwise unused in this function.
Probably it should be removed.

> +
> +	if (WARN_ON(event_length != sizeof(event_node->event_data)))
> +		return;
> +
> +	event_node = kzalloc(sizeof(*event_node), GFP_KERNEL);
> +	if (WARN_ON(!event_node))
> +		return;
> +
> +	memcpy(&event_node->event_data,
> +	       event_payload, sizeof(event_node->event_data));
> +
> +	llist_add(&event_node->node, &cc->event_list);
> +	ret = queue_work(cc->freezable_wq, &cc->irq_deferred_work);
> +}

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ