Skip to content

Commit

Permalink
[S390] Avoid excessive inlining.
Browse files Browse the repository at this point in the history
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Feb 5, 2007
1 parent 162e006 commit 4d284ca
Show file tree
Hide file tree
Showing 46 changed files with 278 additions and 354 deletions.
2 changes: 1 addition & 1 deletion arch/s390/kernel/binfmt_elf32.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ MODULE_AUTHOR("Gerhard Tonn <ton@de.ibm.com>");

#undef cputime_to_timeval
#define cputime_to_timeval cputime_to_compat_timeval
static __inline__ void
static inline void
cputime_to_compat_timeval(const cputime_t cputime, struct compat_timeval *value)
{
value->tv_usec = cputime % 1000000;
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void module_free(struct module *mod, void *module_region)
table entries. */
}

static inline void
static void
check_rela(Elf_Rela *rela, struct module *me)
{
struct mod_arch_syminfo *info;
Expand Down Expand Up @@ -182,7 +182,7 @@ apply_relocate(Elf_Shdr *sechdrs, const char *strtab, unsigned int symindex,
return -ENOEXEC;
}

static inline int
static int
apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
struct module *me)
{
Expand Down
6 changes: 3 additions & 3 deletions arch/s390/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ char vmhalt_cmd[128] = "";
char vmpoff_cmd[128] = "";
static char vmpanic_cmd[128] = "";

static inline void strncpy_skip_quote(char *dst, char *src, int n)
static void strncpy_skip_quote(char *dst, char *src, int n)
{
int sx, dx;

Expand Down Expand Up @@ -396,8 +396,8 @@ early_param("ipldelay", early_parse_ipldelay);
unsigned int switch_amode = 0;
EXPORT_SYMBOL_GPL(switch_amode);

static inline void set_amode_and_uaccess(unsigned long user_amode,
unsigned long user32_amode)
static void set_amode_and_uaccess(unsigned long user_amode,
unsigned long user32_amode)
{
psw_user_bits = PSW_BASE_BITS | PSW_MASK_DAT | user_amode |
PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK |
Expand Down
8 changes: 4 additions & 4 deletions arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ int smp_call_function_on(void (*func) (void *info), void *info,
}
EXPORT_SYMBOL(smp_call_function_on);

static inline void do_send_stop(void)
static void do_send_stop(void)
{
int cpu, rc;

Expand All @@ -208,7 +208,7 @@ static inline void do_send_stop(void)
}
}

static inline void do_store_status(void)
static void do_store_status(void)
{
int cpu, rc;

Expand All @@ -224,7 +224,7 @@ static inline void do_store_status(void)
}
}

static inline void do_wait_for_stop(void)
static void do_wait_for_stop(void)
{
int cpu;

Expand Down Expand Up @@ -534,7 +534,7 @@ smp_put_cpu(int cpu)
spin_unlock_irqrestore(&smp_reserve_lock, flags);
}

static inline int
static int
cpu_stopped(int cpu)
{
__u32 status;
Expand Down
10 changes: 5 additions & 5 deletions arch/s390/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
#include <linux/stacktrace.h>
#include <linux/kallsyms.h>

static inline unsigned long save_context_stack(struct stack_trace *trace,
unsigned int *skip,
unsigned long sp,
unsigned long low,
unsigned long high)
static unsigned long save_context_stack(struct stack_trace *trace,
unsigned int *skip,
unsigned long sp,
unsigned long low,
unsigned long high)
{
struct stack_frame *sf;
struct pt_regs *regs;
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ int sysctl_hz_timer = 1;
* Stop the HZ tick on the current CPU.
* Only cpu_idle may call this function.
*/
static inline void stop_hz_timer(void)
static void stop_hz_timer(void)
{
unsigned long flags;
unsigned long seq, next;
Expand Down Expand Up @@ -210,7 +210,7 @@ static inline void stop_hz_timer(void)
* Start the HZ tick on the current CPU.
* Only cpu_idle may call this function.
*/
static inline void start_hz_timer(void)
static void start_hz_timer(void)
{
BUG_ON(!in_interrupt());

Expand Down
10 changes: 5 additions & 5 deletions arch/s390/lib/uaccess_pt.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include <asm/futex.h>
#include "uaccess.h"

static inline int __handle_fault(struct mm_struct *mm, unsigned long address,
int write_access)
static int __handle_fault(struct mm_struct *mm, unsigned long address,
int write_access)
{
struct vm_area_struct *vma;
int ret = -EFAULT;
Expand Down Expand Up @@ -81,8 +81,8 @@ static inline int __handle_fault(struct mm_struct *mm, unsigned long address,
return ret;
}

static inline size_t __user_copy_pt(unsigned long uaddr, void *kptr,
size_t n, int write_user)
static size_t __user_copy_pt(unsigned long uaddr, void *kptr,
size_t n, int write_user)
{
struct mm_struct *mm = current->mm;
unsigned long offset, pfn, done, size;
Expand Down Expand Up @@ -139,7 +139,7 @@ static inline size_t __user_copy_pt(unsigned long uaddr, void *kptr,
* Do DAT for user address by page table walk, return kernel address.
* This function needs to be called with current->mm->page_table_lock held.
*/
static inline unsigned long __dat_user_addr(unsigned long uaddr)
static unsigned long __dat_user_addr(unsigned long uaddr)
{
struct mm_struct *mm = current->mm;
unsigned long pfn, ret;
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/mm/cmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ cmm_set_timeout(long nr, long seconds)
cmm_set_timer();
}

static inline int
static int
cmm_skip_blanks(char *cp, char **endp)
{
char *str;
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/mm/extmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static char *segtype_string[] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC",
* Create the 8 bytes, ebcdic VM segment name from
* an ascii name.
*/
static void inline
static void
dcss_mkname(char *name, char *dcss_name)
{
int i;
Expand Down
12 changes: 6 additions & 6 deletions drivers/s390/block/dasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ unsigned int dasd_profile_level = DASD_PROFILE_OFF;
/*
* Add profiling information for cqr before execution.
*/
static inline void
static void
dasd_profile_start(struct dasd_device *device, struct dasd_ccw_req * cqr,
struct request *req)
{
Expand All @@ -505,7 +505,7 @@ dasd_profile_start(struct dasd_device *device, struct dasd_ccw_req * cqr,
/*
* Add profiling information for cqr after execution.
*/
static inline void
static void
dasd_profile_end(struct dasd_device *device, struct dasd_ccw_req * cqr,
struct request *req)
{
Expand Down Expand Up @@ -1102,7 +1102,7 @@ __dasd_process_erp(struct dasd_device *device, struct dasd_ccw_req *cqr)
/*
* Process ccw request queue.
*/
static inline void
static void
__dasd_process_ccw_queue(struct dasd_device * device,
struct list_head *final_queue)
{
Expand Down Expand Up @@ -1181,7 +1181,7 @@ dasd_end_request_cb(struct dasd_ccw_req * cqr, void *data)
/*
* Fetch requests from the block device queue.
*/
static inline void
static void
__dasd_process_blk_queue(struct dasd_device * device)
{
request_queue_t *queue;
Expand Down Expand Up @@ -1267,7 +1267,7 @@ __dasd_process_blk_queue(struct dasd_device * device)
* Take a look at the first request on the ccw queue and check
* if it reached its expire time. If so, terminate the IO.
*/
static inline void
static void
__dasd_check_expire(struct dasd_device * device)
{
struct dasd_ccw_req *cqr;
Expand Down Expand Up @@ -1298,7 +1298,7 @@ __dasd_check_expire(struct dasd_device * device)
* Take a look at the first request on the ccw queue and check
* if it needs to be started.
*/
static inline void
static void
__dasd_start_head(struct dasd_device * device)
{
struct dasd_ccw_req *cqr;
Expand Down
6 changes: 3 additions & 3 deletions drivers/s390/block/dasd_devmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ __setup ("dasd=", dasd_call_setup);
/*
* Read a device busid/devno from a string.
*/
static inline int
static int
dasd_busid(char **str, int *id0, int *id1, int *devno)
{
int val, old_style;
Expand Down Expand Up @@ -182,7 +182,7 @@ dasd_busid(char **str, int *id0, int *id1, int *devno)
* only one: "ro" for read-only devices. The default feature set
* is empty (value 0).
*/
static inline int
static int
dasd_feature_list(char *str, char **endp)
{
int features, len, rc;
Expand Down Expand Up @@ -341,7 +341,7 @@ dasd_parse_range( char *parsestring ) {
return ERR_PTR(-EINVAL);
}

static inline char *
static char *
dasd_parse_next_element( char *parsestring ) {
char * residual_str;
residual_str = dasd_parse_keyword(parsestring);
Expand Down
4 changes: 2 additions & 2 deletions drivers/s390/block/dasd_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static inline int dia250(void *iob, int cmd)
* block offset. On success, return zero and set end_block to contain the
* number of blocks on the device minus the specified offset. Return non-zero
* otherwise. */
static __inline__ int
static inline int
mdsk_init_io(struct dasd_device *device, unsigned int blocksize,
blocknum_t offset, blocknum_t *end_block)
{
Expand All @@ -117,7 +117,7 @@ mdsk_init_io(struct dasd_device *device, unsigned int blocksize,

/* Remove block I/O environment for device. Return zero on success, non-zero
* otherwise. */
static __inline__ int
static inline int
mdsk_term_io(struct dasd_device * device)
{
struct dasd_diag_private *private;
Expand Down
47 changes: 5 additions & 42 deletions drivers/s390/block/dasd_eckd.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,44 +134,7 @@ ceil_quot(unsigned int d1, unsigned int d2)
return (d1 + (d2 - 1)) / d2;
}

static inline int
bytes_per_record(struct dasd_eckd_characteristics *rdc, int kl, int dl)
{
unsigned int fl1, fl2, int1, int2;
int bpr;

switch (rdc->formula) {
case 0x01:
fl1 = round_up_multiple(ECKD_F2(rdc) + dl, ECKD_F1(rdc));
fl2 = round_up_multiple(kl ? ECKD_F2(rdc) + kl : 0,
ECKD_F1(rdc));
bpr = fl1 + fl2;
break;
case 0x02:
int1 = ceil_quot(dl + ECKD_F6(rdc), ECKD_F5(rdc) << 1);
int2 = ceil_quot(kl + ECKD_F6(rdc), ECKD_F5(rdc) << 1);
fl1 = round_up_multiple(ECKD_F1(rdc) * ECKD_F2(rdc) + dl +
ECKD_F6(rdc) + ECKD_F4(rdc) * int1,
ECKD_F1(rdc));
fl2 = round_up_multiple(ECKD_F1(rdc) * ECKD_F3(rdc) + kl +
ECKD_F6(rdc) + ECKD_F4(rdc) * int2,
ECKD_F1(rdc));
bpr = fl1 + fl2;
break;
default:
bpr = 0;
break;
}
return bpr;
}

static inline unsigned int
bytes_per_track(struct dasd_eckd_characteristics *rdc)
{
return *(unsigned int *) (rdc->byte_per_track) >> 8;
}

static inline unsigned int
static unsigned int
recs_per_track(struct dasd_eckd_characteristics * rdc,
unsigned int kl, unsigned int dl)
{
Expand Down Expand Up @@ -204,7 +167,7 @@ recs_per_track(struct dasd_eckd_characteristics * rdc,
return 0;
}

static inline int
static int
check_XRC (struct ccw1 *de_ccw,
struct DE_eckd_data *data,
struct dasd_device *device)
Expand All @@ -230,7 +193,7 @@ check_XRC (struct ccw1 *de_ccw,
return rc;
}

static inline int
static int
define_extent(struct ccw1 * ccw, struct DE_eckd_data * data, int trk,
int totrk, int cmd, struct dasd_device * device)
{
Expand Down Expand Up @@ -317,7 +280,7 @@ define_extent(struct ccw1 * ccw, struct DE_eckd_data * data, int trk,
return rc;
}

static inline void
static void
locate_record(struct ccw1 *ccw, struct LO_eckd_data *data, int trk,
int rec_on_trk, int no_rec, int cmd,
struct dasd_device * device, int reclen)
Expand Down Expand Up @@ -1617,7 +1580,7 @@ dasd_eckd_ioctl(struct dasd_device *device, unsigned int cmd, void __user *argp)
* Dump the range of CCWs into 'page' buffer
* and return number of printed chars.
*/
static inline int
static int
dasd_eckd_dump_ccw_range(struct ccw1 *from, struct ccw1 *to, char *page)
{
int len, count;
Expand Down
19 changes: 0 additions & 19 deletions drivers/s390/block/dasd_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,25 +152,6 @@ dasd_default_erp_postaction(struct dasd_ccw_req * cqr)

} /* end default_erp_postaction */

/*
* Print the hex dump of the memory used by a request. This includes
* all error recovery ccws that have been chained in from of the
* real request.
*/
static inline void
hex_dump_memory(struct dasd_device *device, void *data, int len)
{
int *pint;

pint = (int *) data;
while (len > 0) {
DEV_MESSAGE(KERN_ERR, device, "%p: %08x %08x %08x %08x",
pint, pint[0], pint[1], pint[2], pint[3]);
pint += 4;
len -= 16;
}
}

void
dasd_log_sense(struct dasd_ccw_req *cqr, struct irb *irb)
{
Expand Down
4 changes: 2 additions & 2 deletions drivers/s390/block/dasd_fba.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static struct ccw_driver dasd_fba_driver = {
.notify = dasd_generic_notify,
};

static inline void
static void
define_extent(struct ccw1 * ccw, struct DE_fba_data *data, int rw,
int blksize, int beg, int nr)
{
Expand All @@ -95,7 +95,7 @@ define_extent(struct ccw1 * ccw, struct DE_fba_data *data, int rw,
data->ext_end = nr - 1;
}

static inline void
static void
locate_record(struct ccw1 * ccw, struct LO_fba_data *data, int rw,
int block_nr, int block_ct)
{
Expand Down
Loading

0 comments on commit 4d284ca

Please sign in to comment.