lkml.org 
[lkml]   [2006]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] deinline some functions in aic7xxx drivers, save 80k of text
    Denis Vlasenko wrote:
    ...
    > +++ linux-2.6.16.aic7/drivers/scsi/aic7xxx/aic79xx_core.c Sun Apr 9 21:49:25 2006
    ...
    > +#include "aic79xx_osm_o.c"
    > +#include "aic79xx_inline.c"
    ...
    > +++ linux-2.6.16.aic7/drivers/scsi/aic7xxx/aic7xxx_core.c Sun Apr 9 21:49:25 2006
    ...
    > +#include "aic7xxx_osm_o.c"
    > +#include "aic7xxx_inline.c"
    ...

    Instead of including c files with function definitions, you should add
    function prototypes to header files (it seems you already did so) and
    include only the header files. Include these header files in the c files
    which call the functions as well as in the c files which define the
    functions.

    It is obviously necessary to modify the Makefile to have aic7?xx_osm_o.o
    and aic7?xx_inline.o linked to an appropriate .ko file.

    Furthermore, aic7?xx_inline.c are not very fitting file names since they
    do not contain inline functions. aic7?xx_osm_o.c are somewhat strange
    names either. Can't you move the functions into existing c files? E.g.
    into those which contain most of the calls to the now de-inlined
    functions. From the point of view of cross-OS driver maintenance (but
    not necessarily from the point of view of Linux driver maintenance), it
    may be useful to distinguish between functions used across OSs and those
    used only in Linux when deciding where to move the functions.
    --
    Stefan Richter
    -=====-=-==- -=-- -=-=-
    http://arcgraph.de/sr/
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-04-10 10:46    [W:3.691 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site