From 1750b3792e6eb0ab9327fb86ab12b8b97c172d93 Mon Sep 17 00:00:00 2001 From: Krzysztof Mazur Date: Sat, 4 Feb 2012 11:48:56 +0100 Subject: [PATCH 61/84] lsbd: add static keyword to static functions Signed-off-by: Krzysztof Mazur --- drivers/block/lsbd.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/block/lsbd.c b/drivers/block/lsbd.c index 1b65007..d6df164 100644 --- a/drivers/block/lsbd.c +++ b/drivers/block/lsbd.c @@ -167,7 +167,7 @@ static unsigned int block_prev(struct lsbd *p, unsigned int block) * @a: later block * @b: earlier block */ -unsigned int block_diff(struct lsbd *p, unsigned int a, unsigned int b) +static unsigned int block_diff(struct lsbd *p, unsigned int a, unsigned int b) { if (a >= b) return a - b; @@ -368,7 +368,8 @@ static void lsbd_put_buffer(struct lsbd *p, struct buffer_head *bh) * * This function NULL on failure; pointer to allocated buffer otherwise. */ -struct buffer_head *lsbd_getblk(struct lsbd *p, int block, unsigned int sector) +static struct buffer_head *lsbd_getblk(struct lsbd *p, int block, + unsigned int sector) { struct buffer_head *bh; @@ -392,7 +393,7 @@ struct buffer_head *lsbd_getblk(struct lsbd *p, int block, unsigned int sector) * * This function NULL on failure; pointer to allocated buffer otherwise. */ -struct buffer_head *__lsbd_getblk(struct lsbd *p, int block, +static struct buffer_head *__lsbd_getblk(struct lsbd *p, int block, unsigned int sector) { struct buffer_head *bh; @@ -408,7 +409,7 @@ struct buffer_head *__lsbd_getblk(struct lsbd *p, int block, * Default synchronous end-of-IO handler.. Just mark it up-to-date and * unlock the buffer. This is what ll_rw_block uses too. */ -void lsbd_end_buffer_io_sync(struct buffer_head *bh, int uptodate) +static void lsbd_end_buffer_io_sync(struct buffer_head *bh, int uptodate) { mark_buffer_uptodate(bh, uptodate); unlock_buffer(bh); @@ -423,7 +424,8 @@ void lsbd_end_buffer_io_sync(struct buffer_head *bh, int uptodate) * * This function NULL on failure; pointer to allocated buffer otherwise. */ -struct buffer_head *__lsbd_sread(struct lsbd *p, int block, unsigned int sector) +static struct buffer_head *__lsbd_sread(struct lsbd *p, int block, + unsigned int sector) { struct buffer_head *bh; @@ -455,7 +457,8 @@ struct buffer_head *__lsbd_sread(struct lsbd *p, int block, unsigned int sector) * * This function NULL on failure; pointer to allocated buffer otherwise. */ -struct buffer_head *lsbd_sread(struct lsbd *p, int block, unsigned int sector) +static struct buffer_head *lsbd_sread(struct lsbd *p, int block, + unsigned int sector) { struct buffer_head *bh; @@ -708,7 +711,7 @@ out: * lsbd_check_sectors - check recently written sectors * @p: LSBD device */ -int lsbd_check_sectors(struct lsbd *p) +static int lsbd_check_sectors(struct lsbd *p) { struct buffer_head *bh; struct lsbd_block *b; @@ -785,7 +788,7 @@ int lsbd_check_sectors(struct lsbd *p) * The lcache is generated using block sectors -> logical sector mappings * and lcache chunks stored in metadata. */ -int lsbd_read_lcache(struct lsbd *p) +static int lsbd_read_lcache(struct lsbd *p) { struct buffer_head *bh; struct lsbd_block *b; @@ -1818,7 +1821,7 @@ static int lsbd_sector_eq(struct lsbd *p, unsigned int a, unsigned b) * add all recent sectors in this block to write queue. These sectors * should be written at least 2 blocks before this block. */ -void lsbd_clean_block(struct lsbd *p) +static void lsbd_clean_block(struct lsbd *p) { unsigned long block = p->clean_block; struct buffer_head *bh; -- 1.8.4.652.g0d6e0ce