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: <Z4UMP1-0x25g1fX2@smile.fi.intel.com>
Date: Mon, 13 Jan 2025 14:51:11 +0200
From: Andy Shevchenko <andy@...nel.org>
To: Andre Werner <andre.werner@...tec-electronic.com>
Cc: gregkh@...uxfoundation.org, jirislaby@...nel.org,
	hvilleneuve@...onoff.com, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
	lech.perczak@...lingroup.com, krzk+dt@...nel.org,
	conor+dt@...nel.org, robh@...nel.org
Subject: Re: [PATCH v6 2/2] serial: sc16is7xx: Add polling mode if no IRQ pin
 is available

On Mon, Jan 13, 2025 at 08:30:30AM +0100, Andre Werner wrote:
> Fall back to polling mode if no interrupt is configured because there
> is no possibility to connect the interrupt pin.
> If "interrupts" property is missing in devicetree the driver
> uses a delayed worker to pull the state of interrupt status registers.

pull ? Hmm...

...

> V6:
> - Use polling mode for IRQ numbers <= 0 which encounter no valid IRQ
>   were found/defined.

Thanks, this part looks better now.

...

> +static void sc16is7xx_poll_proc(struct kthread_work *ws)
> +{
> +	struct sc16is7xx_port *s = container_of(ws, struct sc16is7xx_port, poll_work.work);
> +
> +	/* Reuse standard IRQ handler. Interrupt ID is unused in this context. */

Period.

> +	sc16is7xx_irq(0, s);
> +
> +	/* Setup delay based on SC16IS7XX_POLL_PERIOD_MS */

No period.

> +	kthread_queue_delayed_work(&s->kworker, &s->poll_work,
> +				   msecs_to_jiffies(SC16IS7XX_POLL_PERIOD_MS));
> +}

Please, go through the comments you added in the patch and use the style that
is mostly used in the driver for the similar (one-line comment) situations.

...

> +		/* Initialize kernel thread for polling */

Again, no period.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ