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:	Fri, 22 Jan 2010 12:07:43 +0100
From:	Sjur Brændeland <sjur.brandeland@...ricsson.com>
To:	"Randy Dunlap" <randy.dunlap@...cle.com>
Cc:	<netdev@...r.kernel.org>, <davem@...emloft.net>,
	<marcel@...tmann.org>, <stefano.babic@...ic.homelinux.org>
Subject: RE: [PATCH net-next-2.6 13/13] net-caif-driver: add CAIF serial driver (ldisc)

Hi Randy.

Randy Dunlap wrote:
>> +++ b/drivers/net/caif/caif_serial.c
>> +struct net_device *device;
>> +char *ser_ttyname = "/dev/ttyS0";
>> +module_param(ser_ttyname, charp, S_IRUGO);
>> +MODULE_PARM_DESC(ser_ttyname, "TTY to open.");
>> +
> 
> Can't a lot of these data items be static?  (above & below)
Yes, you're right. Thank you.

....
>> +static int start_ldisc(struct ser_device *ser) {
>> +	struct file *f;
>> +	mm_segment_t oldfs;
>> +	struct termios tio;
>> +	int ldiscnr = N_CAIF;
>> +	int ret;
>> +	f = filp_open(ser->tty_name, 0, 0);
>> +	if (IS_ERR(f)) {
>> +		dev_err(&ser->dev->dev, "CAIF cannot open:%s\n", ser->tty_name);
>> +		ret = -EINVAL; +		goto error;
>> +	}
>> +	if (f == NULL || f->f_op == NULL || f->f_op->unlocked_ioctl ==
>> NULL) { +		dev_err(&ser->dev->dev, "TTY cannot do IOCTL:%s\n",
>> +			ser->tty_name); +		ret = -EINVAL;
> 
> I'm thinking that the errcode should be (negative) ENOTTY...

Yes, agree - I'll fix this.


BR/Sjur
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists