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: <20141104000442.GC8890@steph-desktop>
Date:	Mon, 3 Nov 2014 16:04:42 -0800
From:	steph <stephanie.s.wallick@...el.com>
To:	Greg KH <gregkh@...uxfoundation.org>
Cc:	linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
	"Sean O. Stalley" <sean.stalley@...el.com>
Subject: Re: [PATCH 01/10] added media agnostic (MA) USB HCD driver

On Mon, Nov 03, 2014 at 01:21:39PM -0800, Greg KH wrote:
> On Mon, Nov 03, 2014 at 12:42:48PM -0800, Stephanie Wallick wrote:
> > +EXPORT_SYMBOL(mausb_register_ms_driver);
> 
> EXPORT_SYMBOL_GPL()?  I have to ask...
>
The source is dual-licenced under BSD and GPL. It was our understanding
that dual-licensed should use EXPORT_SYMBOL() instead. Is that wrong?
 
> > +static int mausb_hcd_init(void)
> > +{
> > +	int ret;
> > +
> > +	/* register HCD driver */
> > +	ret = platform_driver_register(&mausb_driver);
> 
> Why is this a platform driver?  How does this relate to platform
> hardware?
> 
The driver doesn't require platform resources. It looks like a host
controller driver but communicates over the network instead of to
a physical host controller. There is no MA USB-specific hardware.

Should we use a struct device instead of a struct platform_device?

> > +	if (ret < 0) {
> > +		printk(KERN_DEBUG "%s: failed to register HC driver: "
> > +			" error number %d\n", __func__, ret);
> 
> pr_err()?
>
Will change all printk() to pr_err() in next patch.
 
> return here, that way you don't need:
> 
> > +	} else {
> 
> This indentation.
> 
Will fix in next patch.

> > +		/* register HCD device */
> > +		ret = platform_device_register(&mausb_pdev);
> 
> But again, why is this a platform device?  What platform resources does
> it have / require?
> 
See above.

> > +
> > +		if (ret < 0) {
> > +			printk(KERN_DEBUG "%s: failed to register HC device:"
> > +				"error number %d\n", __func__, ret);
> 
> pr_err()?
> 
See above.

> > +			platform_driver_unregister(&mausb_driver);
> > +		} else {
> > +			/* direct the release function (for exiting) */
> > +			mausb_pdev.dev.release = &mausb_dev_release;
> 
> That seems like a serious hack, why do you need to do this in this
> manner?
> 
This will go away when we get rid of the platform device.

> > +
> > +			if (ret < 0) {
> > +				printk(KERN_DEBUG "failed to register HC"
> > +					" chardev: error number %d\n", ret);
> 
> pr_err()?
>
See above.
 
> thanks,
> 
> greg k-h

Thanks,
Stephanie
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ