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: <20150322144209.14abc603@notabene.brown>
Date:	Sun, 22 Mar 2015 14:42:09 +1100
From:	NeilBrown <neilb@...e.de>
To:	Pavel Machek <pavel@....cz>
Cc:	NeilBrown <neil@...wn.name>, Mark Rutland <mark.rutland@....com>,
	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
	Peter Hurley <peter@...leysoftware.com>,
	Arnd Bergmann <arnd@...db.de>, devicetree@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Sebastian Reichel <sre@...nel.org>,
	linux-kernel@...r.kernel.org,
	GTA04 owners <gta04-owner@...delico.com>,
	Grant Likely <grant.likely@...aro.org>,
	Jiri Slaby <jslaby@...e.cz>
Subject: Re: [Gta04-owner] [PATCH 2/3] TTY: add support for tty_slave
 devices.

On Fri, 20 Mar 2015 20:41:50 +0100 Pavel Machek <pavel@....cz> wrote:

> Hi!
> 
> (And yes, I now see dts examples, sorry for the noise.)
> 
> Acked-by: Pavel Machek <pavel@....cz>
> 
> Minor nits below.
> 
> > --- /dev/null
> > +++ b/drivers/tty/slave/tty_slave_core.c
> > @@ -0,0 +1,136 @@
> > +/*
> > + * tty-slave-core - device bus for tty slaves
> 
> Filename actually uses underscores.

The filename uses underscores because all the filenames in drivers/tty do.
And this isn't a file name, it is more like a module name, and the module
tools treat '-' and '_' as equivalent.
And I prefer hyphen....

I looked at other files in drivers/tty and decided noticed that they use
spaces to separate words in this context (novel concept :-) so I've done the
same.

> 
> > +			container_of(parent, struct tty_slave, dev);
> > +		tty->ops = &dev->ops;
> > +	}
> > +}
> > +EXPORT_SYMBOL(tty_slave_activate);
> 
> Not "_GPL"?

Other exports in the files are just EXPORT_SYMBOL, so I copied.
I don't feel strongly (the code is GPL anyway) so just follow what
surrounding code does.

> 
> > +postcore_initcall(tty_slave_init);
> > +module_exit(tty_slave_exit);
> 
> Should it have MODULE_LICENSE tag?

Yes. Added.

> 
> 
> > +int tty_register_finalize(struct tty_driver *driver, struct device *dev)
> > +{
> > +	int retval;
> > +	bool cdev = false;
> > +	int index = dev->devt - MKDEV(driver->major,
> > +				      driver->minor_start);
> > +	printk("REGISTER %d %d 0x%x %d\n", driver->major, driver->minor_start, dev->devt, index);
> 
> That printk should probably be removed for merge?

Gone.

> 
> > +	if (!(driver->flags & TTY_DRIVER_DYNAMIC_ALLOC)) {
> > +		retval = tty_cdev_add(driver,
> > +				      dev->devt,
> > +				      index, 1);
> 
> You can put this on one line.

Indeed.  Done.

> 
> > --- /dev/null
> > +++ b/include/linux/tty_slave.h
> > @@ -0,0 +1,26 @@
> > +
> > +struct tty_slave {
> > +	struct device *tty_dev;
> > +	struct tty_driver *tty_drv;
> > +	struct tty_operations ops;
> > +	struct device dev;
> > +};
> 
> Header files usually have #include guards, and some kind of comment on
> top.
> 
> 									Pavel

Of 1996 files in include/linux, 1851 seem to do that.  That's enough to
convince me.  I've done it too.

Thanks,
NeilBrown


Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ