Skip to content

Commit

Permalink
Btrfs: Fix checkpatch.pl warnings
Browse files Browse the repository at this point in the history
There were many, most are fixed now.  struct-funcs.c generates some warnings
but these are bogus.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
chrismason-xx committed Jan 6, 2009
1 parent 1f3c79a commit d397712
Show file tree
Hide file tree
Showing 33 changed files with 770 additions and 898 deletions.
5 changes: 2 additions & 3 deletions fs/btrfs/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ static int btrfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
ret = __btrfs_setxattr(inode, name, value, size, 0);

out:
if (value)
kfree(value);
kfree(value);

if (!ret)
btrfs_update_cached_acl(inode, p_acl, acl);
Expand Down Expand Up @@ -213,7 +212,7 @@ static int btrfs_xattr_acl_default_get(struct inode *inode, const char *name,
}

static int btrfs_xattr_acl_default_set(struct inode *inode, const char *name,
const void *value, size_t size, int flags)
const void *value, size_t size, int flags)
{
return btrfs_xattr_set_acl(inode, ACL_TYPE_DEFAULT, value, size);
}
Expand Down
6 changes: 3 additions & 3 deletions fs/btrfs/async-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static noinline int run_ordered_completions(struct btrfs_workers *workers,

spin_lock_irqsave(&workers->lock, flags);

while(!list_empty(&workers->order_list)) {
while (!list_empty(&workers->order_list)) {
work = list_entry(workers->order_list.next,
struct btrfs_work, order_list);

Expand Down Expand Up @@ -143,7 +143,7 @@ static int worker_loop(void *arg)
struct btrfs_work *work;
do {
spin_lock_irq(&worker->lock);
while(!list_empty(&worker->pending)) {
while (!list_empty(&worker->pending)) {
cur = worker->pending.next;
work = list_entry(cur, struct btrfs_work, list);
list_del(&work->list);
Expand Down Expand Up @@ -188,7 +188,7 @@ int btrfs_stop_workers(struct btrfs_workers *workers)
struct btrfs_worker_thread *worker;

list_splice_init(&workers->idle_list, &workers->worker_list);
while(!list_empty(&workers->worker_list)) {
while (!list_empty(&workers->worker_list)) {
cur = workers->worker_list.next;
worker = list_entry(cur, struct btrfs_worker_thread,
worker_list);
Expand Down
4 changes: 2 additions & 2 deletions fs/btrfs/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define btrfs_drop_nlink(inode) drop_nlink(inode)
#define btrfs_inc_nlink(inode) inc_nlink(inode)

#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27)
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 27)
static inline struct dentry *d_obtain_alias(struct inode *inode)
{
struct dentry *d;
Expand All @@ -21,7 +21,7 @@ static inline struct dentry *d_obtain_alias(struct inode *inode)
}
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
# define __pagevec_lru_add_file __pagevec_lru_add
# define open_bdev_exclusive open_bdev_excl
# define close_bdev_exclusive(bdev, mode) close_bdev_excl(bdev)
Expand Down
12 changes: 6 additions & 6 deletions fs/btrfs/compression.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ static int check_compressed_csum(struct inode *inode,
kunmap_atomic(kaddr, KM_USER0);

if (csum != *cb_sum) {
printk("btrfs csum failed ino %lu extent %llu csum %u "
printk(KERN_INFO "btrfs csum failed ino %lu "
"extent %llu csum %u "
"wanted %u mirror %d\n", inode->i_ino,
(unsigned long long)disk_start,
csum, *cb_sum, cb->mirror_num);
Expand Down Expand Up @@ -217,7 +218,7 @@ static void end_compressed_bio_read(struct bio *bio, int err)
* we have verified the checksum already, set page
* checked so the end_io handlers know about it
*/
while(bio_index < cb->orig_bio->bi_vcnt) {
while (bio_index < cb->orig_bio->bi_vcnt) {
SetPageChecked(bvec->bv_page);
bvec++;
bio_index++;
Expand Down Expand Up @@ -246,7 +247,7 @@ static noinline int end_compressed_writeback(struct inode *inode, u64 start,
int i;
int ret;

while(nr_pages > 0) {
while (nr_pages > 0) {
ret = find_get_pages_contig(inode->i_mapping, index,
min_t(unsigned long,
nr_pages, ARRAY_SIZE(pages)), pages);
Expand Down Expand Up @@ -463,7 +464,7 @@ static noinline int add_ra_bio_pages(struct inode *inode,
end_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT;

pagevec_init(&pvec, 0);
while(last_offset < compressed_end) {
while (last_offset < compressed_end) {
page_index = last_offset >> PAGE_CACHE_SHIFT;

if (page_index > end_index)
Expand Down Expand Up @@ -697,9 +698,8 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
ret = btrfs_bio_wq_end_io(root->fs_info, comp_bio, 0);
BUG_ON(ret);

if (!btrfs_test_flag(inode, NODATASUM)) {
if (!btrfs_test_flag(inode, NODATASUM))
btrfs_lookup_bio_sums(root, inode, comp_bio, sums);
}

ret = btrfs_map_bio(root, READ, comp_bio, mirror_num, 0);
BUG_ON(ret);
Expand Down
Loading

0 comments on commit d397712

Please sign in to comment.