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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200708261621.30563.vda.linux@googlemail.com>
Date:	Sun, 26 Aug 2007 16:21:30 +0100
From:	Denys Vlasenko <vda.linux@...glemail.com>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	Andrew Morton <akpm@...l.org>, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org, hare@...e.de
Subject: Re: [PATCH] debloat aic7xxx and aic79xx drivers by deinlining

On Saturday 25 August 2007 22:57, Arjan van de Ven wrote:
> On Sat, 25 Aug 2007 22:57:07 +0100
>
> Denys Vlasenko <vda.linux@...glemail.com> wrote:
> > Hi,
> >
> > Attached patch deinlines and moves big functions from .h to .c files
> > in drivers/scsi/aic7xxx/*. I also had to add prototypes for
> > ahc_lookup_scb and ahd_lookup_scb to .h files.
>
> one question... how many of these can actually be static (or would be
> if they were in their only-caller-c-file) ?

Seeing this patch ignored two or three times already,
I tried to make as non-intrusive change as possible,
thus maximizing the chances that it will be applied.

Come on, this patch saves 60k-90k of text, or 30-40% of driver size.
This is ridiculous to have such enormous bloat.

In the functions I converted there are no non-static functions
which are not declared in a .h file.

There are indeed functions which are used only in one .c file:

ahc_check_cmdcmpltqueues: aic7xxx_core.c
ahc_get_sense_bufaddr: aic7xxx_core.c
ahc_hscb_busaddr: aic7xxx_core.c
ahc_inq: aic7xxx_core.c
ahc_outq: aic7xxx_core.c
ahc_pause_bug_fix: aic7xxx_core.c
ahc_sg_bus_to_virt: aic7xxx_core.c
ahc_sg_virt_to_bus: aic7xxx_core.c
ahc_swap_with_next_hscb: aic7xxx_core.c
ahc_sync_qoutfifo: aic7xxx_core.c
ahc_sync_scb: aic7xxx_core.c
ahc_sync_tqinfifo: aic7xxx_core.c
ahc_targetcmd_offset: aic7xxx_core.c
ahc_update_residual: aic7xxx_core.c
ahd_assert_modes: aic79xx_core.c
ahd_check_cmdcmpltqueues: aic79xx_core.c
ahd_get_hescb_qoff: aic79xx_core.c
ahd_get_hnscb_qoff: aic79xx_core.c
ahd_get_sdscb_qoff: aic79xx_core.c
ahd_get_sescb_qoff: aic79xx_core.c
ahd_get_snscb_qoff: aic79xx_core.c
ahd_inl_scbram: aic79xx_core.c
ahd_inq: aic79xx_core.c
ahd_inq_scbram: aic79xx_core.c
ahd_outq: aic79xx_core.c
ahd_set_hescb_qoff: aic79xx_core.c
ahd_set_hnscb_qoff: aic79xx_core.c
ahd_set_sdscb_qoff: aic79xx_core.c
ahd_set_sescb_qoff: aic79xx_core.c
ahd_set_snscb_qoff: aic79xx_core.c
ahd_setup_data_scb: aic79xx_core.c
ahd_setup_noxfer_scb: aic79xx_core.c
ahd_setup_scb_common: aic79xx_core.c
ahd_sg_bus_to_virt: aic79xx_core.c
ahd_sg_virt_to_bus: aic79xx_core.c
ahd_swap_with_next_hscb: aic79xx_core.c
ahd_sync_qoutfifo: aic79xx_core.c
ahd_sync_scb: aic79xx_core.c
ahd_sync_sense: aic79xx_core.c
ahd_sync_tqinfifo: aic79xx_core.c
ahd_targetcmd_offset: aic79xx_core.c
ahd_update_modes: aic79xx_core.c

Converting them to static may save additional 3 or 4k,
if gcc will be smart enough...

I, too, have many questions regarding this driver:
why __inline? why u_int?... and who's maintainer, btw?

> Did you run the find static
> script or are you waiting for Adrian to do that ;-)

$ find -name '*find*static*'
$
--
vda
-
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