Skip to content

Commit

Permalink
[PATCH] Unlinline a bunch of other functions
Browse files Browse the repository at this point in the history
Remove the "inline" keyword from a bunch of big functions in the kernel with
the goal of shrinking it by 30kb to 40kb

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Arjan van de Ven authored and Linus Torvalds committed Jan 15, 2006
1 parent b0a9499 commit 858119e
Show file tree
Hide file tree
Showing 74 changed files with 226 additions and 227 deletions.
2 changes: 1 addition & 1 deletion drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static int acpi_ec_polling_mode = EC_POLLING;
Transaction Management
-------------------------------------------------------------------------- */

static inline u32 acpi_ec_read_status(union acpi_ec *ec)
static u32 acpi_ec_read_status(union acpi_ec *ec)
{
u32 status = 0;

Expand Down
2 changes: 1 addition & 1 deletion drivers/base/firmware_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct firmware_priv {
struct timer_list timeout;
};

static inline void
static void
fw_load_abort(struct firmware_priv *fw_priv)
{
set_bit(FW_STATUS_ABORT, &fw_priv->status);
Expand Down
2 changes: 1 addition & 1 deletion drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec,
* This helper just factors out common code between do_lo_send_direct_write()
* and do_lo_send_write().
*/
static inline int __do_lo_send_write(struct file *file,
static int __do_lo_send_write(struct file *file,
u8 __user *buf, const int len, loff_t pos)
{
ssize_t bw;
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci_bcsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ static inline void bcsp_unslip_one_byte(struct bcsp_struct *bcsp, unsigned char
}
}

static inline void bcsp_complete_rx_pkt(struct hci_uart *hu)
static void bcsp_complete_rx_pkt(struct hci_uart *hu)
{
struct bcsp_struct *bcsp = hu->priv;
int pass_up;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/drm/r128_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static __inline__ void r128_emit_tex1(drm_r128_private_t * dev_priv)
ADVANCE_RING();
}

static __inline__ void r128_emit_state(drm_r128_private_t * dev_priv)
static void r128_emit_state(drm_r128_private_t * dev_priv)
{
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
unsigned int dirty = sarea_priv->dirty;
Expand Down
7 changes: 3 additions & 4 deletions drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ static DEFINE_SPINLOCK(cpufreq_driver_lock);
/* internal prototypes */
static int __cpufreq_governor(struct cpufreq_policy *policy, unsigned int event);
static void handle_update(void *data);
static inline void adjust_jiffies(unsigned long val, struct cpufreq_freqs *ci);

/**
* Two notifier lists: the "policy" list is involved in the
Expand Down Expand Up @@ -127,7 +126,7 @@ static unsigned int debug_ratelimit = 1;
static unsigned int disable_ratelimit = 1;
static DEFINE_SPINLOCK(disable_ratelimit_lock);

static inline void cpufreq_debug_enable_ratelimit(void)
static void cpufreq_debug_enable_ratelimit(void)
{
unsigned long flags;

Expand All @@ -137,7 +136,7 @@ static inline void cpufreq_debug_enable_ratelimit(void)
spin_unlock_irqrestore(&disable_ratelimit_lock, flags);
}

static inline void cpufreq_debug_disable_ratelimit(void)
static void cpufreq_debug_disable_ratelimit(void)
{
unsigned long flags;

Expand Down Expand Up @@ -206,7 +205,7 @@ static inline void cpufreq_debug_disable_ratelimit(void) { return; }
static unsigned long l_p_j_ref;
static unsigned int l_p_j_ref_freq;

static inline void adjust_jiffies(unsigned long val, struct cpufreq_freqs *ci)
static void adjust_jiffies(unsigned long val, struct cpufreq_freqs *ci)
{
if (ci->flags & CPUFREQ_CONST_LOOPS)
return;
Expand Down
4 changes: 2 additions & 2 deletions drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ static void cdrom_buffer_sectors (ide_drive_t *drive, unsigned long sector,
* and attempt to recover if there are problems. Returns 0 if everything's
* ok; nonzero if the request has been terminated.
*/
static inline
static
int cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason)
{
if (ireason == 2)
Expand Down Expand Up @@ -1539,7 +1539,7 @@ int cdrom_queue_packet_command(ide_drive_t *drive, struct request *rq)
/*
* Write handling
*/
static inline int cdrom_write_check_ireason(ide_drive_t *drive, int len, int ireason)
static int cdrom_write_check_ireason(ide_drive_t *drive, int len, int ireason)
{
/* Two notes about IDE interrupt reason here - 0 means that
* the drive wants to receive data from us, 2 means that
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ static inline int idedisk_supports_lba48(const struct hd_driveid *id)
&& id->lba_capacity_2;
}

static inline void idedisk_check_hpa(ide_drive_t *drive)
static void idedisk_check_hpa(ide_drive_t *drive)
{
unsigned long long capacity, set_max;
int lba48 = idedisk_supports_lba48(drive->id);
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/ide-taskfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ static void ide_pio_multi(ide_drive_t *drive, unsigned int write)
ide_pio_sector(drive, write);
}

static inline void ide_pio_datablock(ide_drive_t *drive, struct request *rq,
static void ide_pio_datablock(ide_drive_t *drive, struct request *rq,
unsigned int write)
{
if (rq->bio) /* fs request */
Expand Down
4 changes: 2 additions & 2 deletions drivers/infiniband/core/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ static void cm_format_req(struct cm_req_msg *req_msg,
param->private_data_len);
}

static inline int cm_validate_req_param(struct ib_cm_req_param *param)
static int cm_validate_req_param(struct ib_cm_req_param *param)
{
/* peer-to-peer not supported */
if (param->peer_to_peer)
Expand Down Expand Up @@ -1005,7 +1005,7 @@ static inline int cm_is_active_peer(__be64 local_ca_guid, __be64 remote_ca_guid,
(be32_to_cpu(local_qpn) > be32_to_cpu(remote_qpn))));
}

static inline void cm_format_paths_from_req(struct cm_req_msg *req_msg,
static void cm_format_paths_from_req(struct cm_req_msg *req_msg,
struct ib_sa_path_rec *primary_path,
struct ib_sa_path_rec *alt_path)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/isdn/hisax/avm_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ hdlc_fill_fifo(struct BCState *bcs)
}
}

static inline void
static void
HDLC_irq(struct BCState *bcs, u_int stat) {
int len;
struct sk_buff *skb;
Expand Down
2 changes: 1 addition & 1 deletion drivers/isdn/hisax/diva.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ Memhscx_fill_fifo(struct BCState *bcs)
}
}

static inline void
static void
Memhscx_interrupt(struct IsdnCardState *cs, u_char val, u_char hscx)
{
u_char r;
Expand Down
4 changes: 2 additions & 2 deletions drivers/isdn/hisax/hscx_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ hscx_fill_fifo(struct BCState *bcs)
}
}

static inline void
static void
hscx_interrupt(struct IsdnCardState *cs, u_char val, u_char hscx)
{
u_char r;
Expand Down Expand Up @@ -221,7 +221,7 @@ hscx_interrupt(struct IsdnCardState *cs, u_char val, u_char hscx)
}
}

static inline void
static void
hscx_int_main(struct IsdnCardState *cs, u_char val)
{

Expand Down
2 changes: 1 addition & 1 deletion drivers/isdn/hisax/jade_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jade_fill_fifo(struct BCState *bcs)
}


static inline void
static void
jade_interrupt(struct IsdnCardState *cs, u_char val, u_char jade)
{
u_char r;
Expand Down
2 changes: 1 addition & 1 deletion drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static int bitmap_checkpage(struct bitmap *bitmap, unsigned long page, int creat
/* if page is completely empty, put it back on the free list, or dealloc it */
/* if page was hijacked, unmark the flag so it might get alloced next time */
/* Note: lock should be held when calling this */
static inline void bitmap_checkfree(struct bitmap *bitmap, unsigned long page)
static void bitmap_checkfree(struct bitmap *bitmap, unsigned long page)
{
char *ptr;

Expand Down
2 changes: 1 addition & 1 deletion drivers/md/dm-crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ static struct crypt_iv_operations crypt_iv_essiv_ops = {
};


static inline int
static int
crypt_convert_scatterlist(struct crypt_config *cc, struct scatterlist *out,
struct scatterlist *in, unsigned int length,
int write, sector_t sector)
Expand Down
4 changes: 2 additions & 2 deletions drivers/md/dm-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ static int dev_create(struct dm_ioctl *param, size_t param_size)
/*
* Always use UUID for lookups if it's present, otherwise use name or dev.
*/
static inline struct hash_cell *__find_device_hash_cell(struct dm_ioctl *param)
static struct hash_cell *__find_device_hash_cell(struct dm_ioctl *param)
{
if (*param->uuid)
return __get_uuid_cell(param->uuid);
Expand All @@ -608,7 +608,7 @@ static inline struct hash_cell *__find_device_hash_cell(struct dm_ioctl *param)
return dm_get_mdptr(huge_decode_dev(param->dev));
}

static inline struct mapped_device *find_device(struct dm_ioctl *param)
static struct mapped_device *find_device(struct dm_ioctl *param)
{
struct hash_cell *hc;
struct mapped_device *md = NULL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/md/dm-snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ static void copy_callback(int read_err, unsigned int write_err, void *context)
/*
* Dispatches the copy operation to kcopyd.
*/
static inline void start_copy(struct pending_exception *pe)
static void start_copy(struct pending_exception *pe)
{
struct dm_snapshot *s = pe->snap;
struct io_region src, dest;
Expand Down
2 changes: 1 addition & 1 deletion drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ struct dm_table *dm_get_table(struct mapped_device *md)
* Decrements the number of outstanding ios that a bio has been
* cloned into, completing the original io if necc.
*/
static inline void dec_pending(struct dm_io *io, int error)
static void dec_pending(struct dm_io *io, int error)
{
if (error)
io->error = error;
Expand Down
4 changes: 2 additions & 2 deletions drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static void put_all_bios(conf_t *conf, r1bio_t *r1_bio)
}
}

static inline void free_r1bio(r1bio_t *r1_bio)
static void free_r1bio(r1bio_t *r1_bio)
{
conf_t *conf = mddev_to_conf(r1_bio->mddev);

Expand All @@ -190,7 +190,7 @@ static inline void free_r1bio(r1bio_t *r1_bio)
mempool_free(r1_bio, conf->r1bio_pool);
}

static inline void put_buf(r1bio_t *r1_bio)
static void put_buf(r1bio_t *r1_bio)
{
conf_t *conf = mddev_to_conf(r1_bio->mddev);
int i;
Expand Down
4 changes: 2 additions & 2 deletions drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static void put_all_bios(conf_t *conf, r10bio_t *r10_bio)
}
}

static inline void free_r10bio(r10bio_t *r10_bio)
static void free_r10bio(r10bio_t *r10_bio)
{
conf_t *conf = mddev_to_conf(r10_bio->mddev);

Expand All @@ -190,7 +190,7 @@ static inline void free_r10bio(r10bio_t *r10_bio)
mempool_free(r10_bio, conf->r10bio_pool);
}

static inline void put_buf(r10bio_t *r10_bio)
static void put_buf(r10bio_t *r10_bio)
{
conf_t *conf = mddev_to_conf(r10_bio->mddev);

Expand Down
10 changes: 5 additions & 5 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

static void print_raid5_conf (raid5_conf_t *conf);

static inline void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh)
static void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh)
{
if (atomic_dec_and_test(&sh->count)) {
if (!list_empty(&sh->lru))
Expand Down Expand Up @@ -118,7 +118,7 @@ static inline void remove_hash(struct stripe_head *sh)
hlist_del_init(&sh->hash);
}

static inline void insert_hash(raid5_conf_t *conf, struct stripe_head *sh)
static void insert_hash(raid5_conf_t *conf, struct stripe_head *sh)
{
struct hlist_head *hp = stripe_hash(conf, sh->sector);

Expand Down Expand Up @@ -178,7 +178,7 @@ static int grow_buffers(struct stripe_head *sh, int num)

static void raid5_build_block (struct stripe_head *sh, int i);

static inline void init_stripe(struct stripe_head *sh, sector_t sector, int pd_idx)
static void init_stripe(struct stripe_head *sh, sector_t sector, int pd_idx)
{
raid5_conf_t *conf = sh->raid_conf;
int disks = conf->raid_disks, i;
Expand Down Expand Up @@ -1415,7 +1415,7 @@ static void handle_stripe(struct stripe_head *sh)
}
}

static inline void raid5_activate_delayed(raid5_conf_t *conf)
static void raid5_activate_delayed(raid5_conf_t *conf)
{
if (atomic_read(&conf->preread_active_stripes) < IO_THRESHOLD) {
while (!list_empty(&conf->delayed_list)) {
Expand All @@ -1431,7 +1431,7 @@ static inline void raid5_activate_delayed(raid5_conf_t *conf)
}
}

static inline void activate_bit_delay(raid5_conf_t *conf)
static void activate_bit_delay(raid5_conf_t *conf)
{
/* device_lock is held */
struct list_head head;
Expand Down
8 changes: 4 additions & 4 deletions drivers/md/raid6main.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static inline int raid6_next_disk(int disk, int raid_disks)

static void print_raid6_conf (raid6_conf_t *conf);

static inline void __release_stripe(raid6_conf_t *conf, struct stripe_head *sh)
static void __release_stripe(raid6_conf_t *conf, struct stripe_head *sh)
{
if (atomic_dec_and_test(&sh->count)) {
if (!list_empty(&sh->lru))
Expand Down Expand Up @@ -197,7 +197,7 @@ static int grow_buffers(struct stripe_head *sh, int num)

static void raid6_build_block (struct stripe_head *sh, int i);

static inline void init_stripe(struct stripe_head *sh, sector_t sector, int pd_idx)
static void init_stripe(struct stripe_head *sh, sector_t sector, int pd_idx)
{
raid6_conf_t *conf = sh->raid_conf;
int disks = conf->raid_disks, i;
Expand Down Expand Up @@ -1577,7 +1577,7 @@ static void handle_stripe(struct stripe_head *sh, struct page *tmp_page)
}
}

static inline void raid6_activate_delayed(raid6_conf_t *conf)
static void raid6_activate_delayed(raid6_conf_t *conf)
{
if (atomic_read(&conf->preread_active_stripes) < IO_THRESHOLD) {
while (!list_empty(&conf->delayed_list)) {
Expand All @@ -1593,7 +1593,7 @@ static inline void raid6_activate_delayed(raid6_conf_t *conf)
}
}

static inline void activate_bit_delay(raid6_conf_t *conf)
static void activate_bit_delay(raid6_conf_t *conf)
{
/* device_lock is held */
struct list_head head;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/tvp5150.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ struct tvp5150 {
int sat;
};

static inline int tvp5150_read(struct i2c_client *c, unsigned char addr)
static int tvp5150_read(struct i2c_client *c, unsigned char addr)
{
unsigned char buffer[1];
int rc;
Expand Down
4 changes: 2 additions & 2 deletions drivers/message/fusion/mptlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
}

/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
static inline void
static void
mpt_lan_wake_post_buckets_task(struct net_device *dev, int priority)
/*
* @priority: 0 = put it on the timer queue, 1 = put it on the immediate queue
Expand All @@ -866,7 +866,7 @@ mpt_lan_wake_post_buckets_task(struct net_device *dev, int priority)
}

/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
static inline int
static int
mpt_lan_receive_skb(struct net_device *dev, struct sk_buff *skb)
{
struct mpt_lan_priv *priv = dev->priv;
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/devices/doc2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static inline int DoC_WaitReady(struct DiskOnChip *doc)
bypass the internal pipeline. Each of 4 delay cycles (read from the NOP register) is
required after writing to CDSN Control register, see Software Requirement 11.4 item 3. */

static inline int DoC_Command(struct DiskOnChip *doc, unsigned char command,
static int DoC_Command(struct DiskOnChip *doc, unsigned char command,
unsigned char xtraflags)
{
void __iomem *docptr = doc->virtadr;
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/devices/doc2001.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static inline int DoC_WaitReady(void __iomem * docptr)
with the internal pipeline. Each of 4 delay cycles (read from the NOP register) is
required after writing to CDSN Control register, see Software Requirement 11.4 item 3. */

static inline void DoC_Command(void __iomem * docptr, unsigned char command,
static void DoC_Command(void __iomem * docptr, unsigned char command,
unsigned char xtraflags)
{
/* Assert the CLE (Command Latch Enable) line to the flash chip */
Expand Down
Loading

0 comments on commit 858119e

Please sign in to comment.