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: <201301230002.48551.PeterHuewe@gmx.de>
Date:	Wed, 23 Jan 2013 00:02:48 +0100
From:	Peter Hüwe <PeterHuewe@....de>
To:	H Hartley Sweeten <hartleys@...ionengravers.com>
Cc:	Ian Abbott <abbotti@....co.uk>,
	Mori Hess <fmhess@...rs.sourceforge.net>,
	"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging/comedi: Use comedi_pci_auto_unconfig directly for pci_driver.remove

Am Dienstag, 22. Januar 2013, 23:49:53 schrieb H Hartley Sweeten:
> On Tuesday, January 22, 2013 3:40 PM, Peter Huewe wrote:
> >  (Almost) all comedi pci drivers have some wrapper for their
> > 
> > pci_driver.remove function which simply calls comedi_pci_auto_unconfig
> > which has the same function prototype as the wrapper.
> > 
> > -> we can remove these wrappers and call comedi_pci_auto_unconfig
> > directly. This removes a lot some boilerplate code and saves some bytes.
> > 
> > Signed-off-by: Peter Huewe <peterhuewe@....de>
> > ---
> > Maybe we should move the implementation now to drivers.c,
> > because now it cannot be inlined anymore.
> > This would save some more bytes in the .kos but comedi_pci_auto_unconfig
> > then has to become an exported symbol.
> 
> Did you build this?
> 
> As you mention above, the inlined comedi_pci_auto_unconfig() will not
> work as a function pointer in the pci_driver structs.
> 
> This cannot work until/if comedi_pci_auto_unconfig() is made an exported
> symbol. I'll leave that decision up to Ian.
> 
> Regards,
> Hartley

Hi,

yes I did build it - and it did build fine.
That's how I could find out about the size of the .kos 

On my machine all comedi .kos before the patch sum up to 9828 bytes.
After applying this patch it comes down to 9812 bytes
If I put the comedi_pci_auto_unconfig into drivers.c and export it, it comes 
down to 9752 bytes.


The gcc probably simply does not inline it anymore - inline is just a 
suggestion to the compiler.

I did some google searching before submitting it, and it seems that is indeed 
possible.
e.g.:
http://stackoverflow.com/questions/8885665/c-pointer-to-inline-function

Nevertheless I'll send a patch which moves the  comedi_pci_auto_unconfig to 
drivers.c

Thanks,
Peter



--
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