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]
Date:	Sat, 29 Dec 2007 02:38:43 +0100 (CET)
From:	Jan Engelhardt <jengelh@...putergmbh.de>
To:	chripell@...il.com
cc:	linux-kernel@...r.kernel.org,
	Christian Pellegrin <chripell@...e.org>
Subject: Re: [PATCH RESEND] max3100 driver


On Dec 28 2007 14:01, chripell@...il.com wrote:
>+
>+ * The initial minor number is 128 to prevent clashes with ttyS:
>+ * mknod /dev/ttyMAX0 c 4 128
>+ */

[4:128] is taken by ttyS64. Please look into Documentation/devices.txt.

>+struct max3100_port_s {
>+	struct uart_port port;
>+	struct spi_device *spi;
>+	struct tty_struct 	*tty;
>+
>+	struct mutex   spi_txrx;/* protects access to the hw */
>+
>+	int rts;		/* rts status, can be MAX3100_RTS or 0 */

possibly be bool then, if it only takes on two values?

>+	int conf;		/* configuration for the MAX31000
>+				 * (bits 0-7, bits 8-11 are irqs) */
>+	int last_cts_rx;	/* last CTS received for flow ctrl */
>+
>+	int tx_buf_cur;	        /* current char to tx */
>+	int tx_buf_tot;		/* current number of chars in tx buf */

Probably unsigned?

>+static int max3100_do_parity(struct max3100_port_s *s, u16 c)
>+{
>+	int parity;
>+	int i, n;
>+
>+	if (s->parity & MAX3100_PARITY_ODD)
>+		parity = 0;
>+	else
>+		parity = 1;

Or
	parity = !!(s->parity & MAX3100_PARITY_ODD);
	n = (s->parity & MAX3100_7BIT) ? 7 : 8;
(up to you)

>+	for (i = 0; i < n; i++)
>+		parity = parity ^ ((c>>i) & 1);

		parity ^= (c >> i) & 1;

>+	return parity;
>+}
>+
>+	if (s->loopback) {
>+		if ((tx & MAX3100_CMD) == MAX3100_RC)
>+			tx |= 1;
>+	}

	if (s->loopback && (tx & MAX3100_CMD) == MAX3100_RC)
		tx |= 1;

>+MODULE_DESCRIPTION("MAX3100 driver");
>+MODULE_LICENSE("GPL");

I notice a steep increase in serial drivers. Everyone got their
new chips for xmas, eh? :)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists