From fd5a038b3e8a520465d230df4d3df28d21c36f3a Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Tue, 31 Dec 2002 01:28:13 -0100 Subject: Fix up numerous '`xxxxx' is not at beginning of declaration' style warnings. --- include/linux/ncp_fs.h | 2 +- include/linux/pci.h | 10 +++++----- include/linux/sunrpc/cache.h | 2 +- include/linux/sunrpc/svc.h | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'include/linux') diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index a15a7ac2f6a3..9e2f1923ce5c 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h @@ -248,7 +248,7 @@ int ncp_ioctl(struct inode *, struct file *, unsigned int, unsigned long); /* linux/fs/ncpfs/sock.c */ int ncp_request2(struct ncp_server *server, int function, void* reply, int max_reply_size); -static int inline ncp_request(struct ncp_server *server, int function) { +static inline int ncp_request(struct ncp_server *server, int function) { return ncp_request2(server, function, server->packet, server->packet_size); } int ncp_connect(struct ncp_server *server); diff --git a/include/linux/pci.h b/include/linux/pci.h index 553864c6a5fb..7b693e39425f 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -592,23 +592,23 @@ static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val) { return pci_bus_read_config_byte (dev->bus, dev->devfn, where, val); } -static int inline pci_read_config_word(struct pci_dev *dev, int where, u16 *val) +static inline int pci_read_config_word(struct pci_dev *dev, int where, u16 *val) { return pci_bus_read_config_word (dev->bus, dev->devfn, where, val); } -static int inline pci_read_config_dword(struct pci_dev *dev, int where, u32 *val) +static inline int pci_read_config_dword(struct pci_dev *dev, int where, u32 *val) { return pci_bus_read_config_dword (dev->bus, dev->devfn, where, val); } -static int inline pci_write_config_byte(struct pci_dev *dev, int where, u8 val) +static inline int pci_write_config_byte(struct pci_dev *dev, int where, u8 val) { return pci_bus_write_config_byte (dev->bus, dev->devfn, where, val); } -static int inline pci_write_config_word(struct pci_dev *dev, int where, u16 val) +static inline int pci_write_config_word(struct pci_dev *dev, int where, u16 val) { return pci_bus_write_config_word (dev->bus, dev->devfn, where, val); } -static int inline pci_write_config_dword(struct pci_dev *dev, int where, u32 val) +static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val) { return pci_bus_write_config_dword (dev->bus, dev->devfn, where, val); } diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 3d37e47dd968..74e53a04907e 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h @@ -244,7 +244,7 @@ static inline struct cache_head *cache_get(struct cache_head *h) } -static int inline cache_put(struct cache_head *h, struct cache_detail *cd) +static inline int cache_put(struct cache_head *h, struct cache_detail *cd) { atomic_dec(&h->refcnt); if (!atomic_read(&h->refcnt) && diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index cb36271f1376..9408ba6dbe34 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -171,7 +171,7 @@ xdr_ressize_check(struct svc_rqst *rqstp, u32 *p) return vec->iov_len <= PAGE_SIZE; } -static int inline svc_take_page(struct svc_rqst *rqstp) +static inline int svc_take_page(struct svc_rqst *rqstp) { if (rqstp->rq_arghi <= rqstp->rq_argused) return -ENOMEM; @@ -180,7 +180,7 @@ static int inline svc_take_page(struct svc_rqst *rqstp) return 0; } -static void inline svc_pushback_allpages(struct svc_rqst *rqstp) +static inline void svc_pushback_allpages(struct svc_rqst *rqstp) { while (rqstp->rq_resused) { if (rqstp->rq_respages[--rqstp->rq_resused] == NULL) @@ -191,7 +191,7 @@ static void inline svc_pushback_allpages(struct svc_rqst *rqstp) } } -static void inline svc_pushback_unused_pages(struct svc_rqst *rqstp) +static inline void svc_pushback_unused_pages(struct svc_rqst *rqstp) { while (rqstp->rq_resused) { if (rqstp->rq_respages[--rqstp->rq_resused] != NULL) { @@ -204,7 +204,7 @@ static void inline svc_pushback_unused_pages(struct svc_rqst *rqstp) } } -static void inline svc_free_allpages(struct svc_rqst *rqstp) +static inline void svc_free_allpages(struct svc_rqst *rqstp) { while (rqstp->rq_resused) { if (rqstp->rq_respages[--rqstp->rq_resused] == NULL) -- cgit v1.2.3 From ee0d7c25e5c9385337db9ffe4eba0a1bfde3b19f Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 30 Dec 2002 19:01:43 -0800 Subject: [PATCH] Atari NCR5380 SCSI: bitops operate on long Atari NCR5380 SCSI driver tag bitmap updates: - Use DECLARE_BITMAP() to declare the tag bitmap - Remove `MAX_TAGS must be a multiple of 32', which is no longer true - Declare and use CLEAR_BITMAP() to set all bits in a bitmap to zero - Fix bitops call problems that got unnoticed before --- drivers/scsi/atari_NCR5380.c | 17 ++++++----------- include/linux/types.h | 2 ++ 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'include/linux') diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c index 70da49bc0372..f7a944485be2 100644 --- a/drivers/scsi/atari_NCR5380.c +++ b/drivers/scsi/atari_NCR5380.c @@ -309,13 +309,8 @@ static Scsi_Host_Template *the_template = NULL; #undef TAG_NONE #define TAG_NONE 0xff -/* For the m68k, the number of bits in 'allocated' must be a multiple of 32! */ -#if (MAX_TAGS % 32) != 0 -#error "MAX_TAGS must be a multiple of 32!" -#endif - typedef struct { - long allocated[MAX_TAGS/32]; + DECLARE_BITMAP(allocated, MAX_TAGS); int nr_allocated; int queue_size; } TAG_ALLOC; @@ -334,7 +329,7 @@ static void __init init_tags( void ) for( target = 0; target < 8; ++target ) { for( lun = 0; lun < 8; ++lun ) { ta = &TagAlloc[target][lun]; - memset( &ta->allocated, 0, MAX_TAGS/8 ); + CLEAR_BITMAP( ta->allocated, MAX_TAGS ); ta->nr_allocated = 0; /* At the beginning, assume the maximum queue size we could * support (MAX_TAGS). This value will be decreased if the target @@ -394,8 +389,8 @@ static void cmd_get_tag( Scsi_Cmnd *cmd, int should_be_tagged ) else { TAG_ALLOC *ta = &TagAlloc[cmd->target][cmd->lun]; - cmd->tag = find_first_zero_bit( &ta->allocated, MAX_TAGS ); - set_bit( cmd->tag, &ta->allocated ); + cmd->tag = find_first_zero_bit( ta->allocated, MAX_TAGS ); + set_bit( cmd->tag, ta->allocated ); ta->nr_allocated++; TAG_PRINTK( "scsi%d: using tag %d for target %d lun %d " "(now %d tags in use)\n", @@ -424,7 +419,7 @@ static void cmd_free_tag( Scsi_Cmnd *cmd ) } else { TAG_ALLOC *ta = &TagAlloc[cmd->target][cmd->lun]; - clear_bit( cmd->tag, &ta->allocated ); + clear_bit( cmd->tag, ta->allocated ); ta->nr_allocated--; TAG_PRINTK( "scsi%d: freed tag %d for target %d lun %d\n", H_NO(cmd), cmd->tag, cmd->target, cmd->lun ); @@ -443,7 +438,7 @@ static void free_all_tags( void ) for( target = 0; target < 8; ++target ) { for( lun = 0; lun < 8; ++lun ) { ta = &TagAlloc[target][lun]; - memset( &ta->allocated, 0, MAX_TAGS/8 ); + CLEAR_BITMAP( ta->allocated, MAX_TAGS ); ta->nr_allocated = 0; } } diff --git a/include/linux/types.h b/include/linux/types.h index 87985824b16e..94ceb057eb64 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -6,6 +6,8 @@ #define DECLARE_BITMAP(name,bits) \ unsigned long name[((bits)+BITS_PER_LONG-1)/BITS_PER_LONG] +#define CLEAR_BITMAP(name,bits) \ + memset(name, 0, ((bits)+BITS_PER_LONG-1)/8) #endif #include -- cgit v1.2.3