[PATCH 1/1 linux-next] udf: remove bool assignment to 0/1

2015-02-04 Thread Fabian Frederick
Fix the following coccinelle warnings:

fs/udf/inode.c:753:2-13: WARNING: Assignment of bool to 0/1
fs/udf/inode.c:795:2-13: WARNING: Assignment of bool to 0/1

Signed-off-by: Fabian Frederick 
---
 fs/udf/inode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 7b72b7d..a445d59 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -750,7 +750,7 @@ static sector_t inode_getblk(struct inode *inode, sector_t 
block,
/* Are we beyond EOF? */
if (etype == -1) {
int ret;
-   isBeyondEOF = 1;
+   isBeyondEOF = true;
if (count) {
if (c)
laarr[0] = laarr[1];
@@ -792,7 +792,7 @@ static sector_t inode_getblk(struct inode *inode, sector_t 
block,
endnum = c + 1;
lastblock = 1;
} else {
-   isBeyondEOF = 0;
+   isBeyondEOF = false;
endnum = startnum = ((count > 2) ? 2 : count);
 
/* if the current extent is in position 0,
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] udf: use bool for done

2015-02-04 Thread Fabian Frederick
variable 'done' is only used for true/false in loop.

Signed-off-by: Fabian Frederick 
---
 fs/udf/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index 3d35a75..f169411 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1599,7 +1599,7 @@ static noinline int udf_process_sequence(
struct udf_vds_record *curr;
struct generic_desc *gd;
struct volDescPtr *vdp;
-   int done = 0;
+   bool done = false;
uint32_t vdsn;
uint16_t ident;
long next_s = 0, next_e = 0;
@@ -1680,7 +1680,7 @@ static noinline int udf_process_sequence(
lastblock = next_e;
next_s = next_e = 0;
} else
-   done = 1;
+   done = true;
break;
}
brelse(bh);
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] udf: use bool for done

2015-02-04 Thread Fabian Frederick
variable 'done' is only used for true/false in loop.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/udf/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index 3d35a75..f169411 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1599,7 +1599,7 @@ static noinline int udf_process_sequence(
struct udf_vds_record *curr;
struct generic_desc *gd;
struct volDescPtr *vdp;
-   int done = 0;
+   bool done = false;
uint32_t vdsn;
uint16_t ident;
long next_s = 0, next_e = 0;
@@ -1680,7 +1680,7 @@ static noinline int udf_process_sequence(
lastblock = next_e;
next_s = next_e = 0;
} else
-   done = 1;
+   done = true;
break;
}
brelse(bh);
-- 
1.9.3

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] udf: remove bool assignment to 0/1

2015-02-04 Thread Fabian Frederick
Fix the following coccinelle warnings:

fs/udf/inode.c:753:2-13: WARNING: Assignment of bool to 0/1
fs/udf/inode.c:795:2-13: WARNING: Assignment of bool to 0/1

Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/udf/inode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 7b72b7d..a445d59 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -750,7 +750,7 @@ static sector_t inode_getblk(struct inode *inode, sector_t 
block,
/* Are we beyond EOF? */
if (etype == -1) {
int ret;
-   isBeyondEOF = 1;
+   isBeyondEOF = true;
if (count) {
if (c)
laarr[0] = laarr[1];
@@ -792,7 +792,7 @@ static sector_t inode_getblk(struct inode *inode, sector_t 
block,
endnum = c + 1;
lastblock = 1;
} else {
-   isBeyondEOF = 0;
+   isBeyondEOF = false;
endnum = startnum = ((count  2) ? 2 : count);
 
/* if the current extent is in position 0,
-- 
1.9.3

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] ocfs2: make resv_lock spinlock static

2015-02-04 Thread Fabian Frederick
resv_lock is only used in reservations.c

Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/ocfs2/reservations.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/reservations.c b/fs/ocfs2/reservations.c
index 41ffd36..6a348b0 100644
--- a/fs/ocfs2/reservations.c
+++ b/fs/ocfs2/reservations.c
@@ -39,7 +39,7 @@
 #define OCFS2_CHECK_RESERVATIONS
 #endif
 
-DEFINE_SPINLOCK(resv_lock);
+static DEFINE_SPINLOCK(resv_lock);
 
 #defineOCFS2_MIN_RESV_WINDOW_BITS  8
 #defineOCFS2_MAX_RESV_WINDOW_BITS  1024
-- 
1.9.3

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] staging: lustre: make obd_updatemax_lock static

2015-02-04 Thread Fabian Frederick
obd_updatemax_lock is only used in class_obd.c

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/staging/lustre/lustre/obdclass/class_obd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c 
b/drivers/staging/lustre/lustre/obdclass/class_obd.c
index 89a3fb2..29456e1 100644
--- a/drivers/staging/lustre/lustre/obdclass/class_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c
@@ -61,7 +61,7 @@ __u64 obd_alloc;
 EXPORT_SYMBOL(obd_alloc);
 __u64 obd_pages;
 EXPORT_SYMBOL(obd_pages);
-DEFINE_SPINLOCK(obd_updatemax_lock);
+static DEFINE_SPINLOCK(obd_updatemax_lock);
 
 /* The following are visible and mutable through /proc/sys/lustre/. */
 unsigned int obd_alloc_fail_rate = 0;
-- 
1.9.3

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] scsi: make bnx2fc_global_lock spinlock static

2015-02-04 Thread Fabian Frederick
bnx2fc_global_lock is only used in bnx2fc_fcoe.c

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c 
b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 98d06d1..66fb527 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -49,7 +49,7 @@ struct workqueue_struct *bnx2fc_wq;
  * Here the io threads are per cpu but the l2 thread is just one
  */
 struct fcoe_percpu_s bnx2fc_global;
-DEFINE_SPINLOCK(bnx2fc_global_lock);
+static DEFINE_SPINLOCK(bnx2fc_global_lock);
 
 static struct cnic_ulp_ops bnx2fc_cnic_cb;
 static struct libfc_function_template bnx2fc_libfc_fcn_templ;
-- 
1.9.3

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 5/6 linux-next] fs/affs/inode.c: remove double extern affs_symlink_inode_operations

2015-02-03 Thread Fabian Frederick
affs_symlink_inode_operations was already declared extern in affs.h

Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/affs/inode.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index 25cb4b4..6f34510 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -13,8 +13,6 @@
 #include 
 #include "affs.h"
 
-extern const struct inode_operations affs_symlink_inode_operations;
-
 struct inode *affs_iget(struct super_block *sb, unsigned long ino)
 {
struct affs_sb_info *sbi = AFFS_SB(sb);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/6 linux-next] fs/affs/bitmap.c: remove unnecessary return

2015-02-03 Thread Fabian Frederick
return is not needed at the end of function.

Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/affs/bitmap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/affs/bitmap.c b/fs/affs/bitmap.c
index c8de511..6751489 100644
--- a/fs/affs/bitmap.c
+++ b/fs/affs/bitmap.c
@@ -99,7 +99,6 @@ err_bh_read:
 
 err_range:
affs_error(sb, "affs_free_block","Block %u outside partition", block);
-   return;
 }
 
 /*
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 6/6 linux-next] fs/affs/super.c: fix switch indentation

2015-02-03 Thread Fabian Frederick
Fix checkpatch error:
"ERROR: switch and case should be at the same indent"

Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/affs/super.c | 66 -
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/fs/affs/super.c b/fs/affs/super.c
index c3524bf..4cf0e91 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -432,39 +432,39 @@ got_root:
sb->s_flags |= MS_RDONLY;
}
switch (chksum) {
-   case MUFS_FS:
-   case MUFS_INTLFFS:
-   case MUFS_DCFFS:
-   sbi->s_flags |= SF_MUFS;
-   /* fall thru */
-   case FS_INTLFFS:
-   case FS_DCFFS:
-   sbi->s_flags |= SF_INTL;
-   break;
-   case MUFS_FFS:
-   sbi->s_flags |= SF_MUFS;
-   break;
-   case FS_FFS:
-   break;
-   case MUFS_OFS:
-   sbi->s_flags |= SF_MUFS;
-   /* fall thru */
-   case FS_OFS:
-   sbi->s_flags |= SF_OFS;
-   sb->s_flags |= MS_NOEXEC;
-   break;
-   case MUFS_DCOFS:
-   case MUFS_INTLOFS:
-   sbi->s_flags |= SF_MUFS;
-   case FS_DCOFS:
-   case FS_INTLOFS:
-   sbi->s_flags |= SF_INTL | SF_OFS;
-   sb->s_flags |= MS_NOEXEC;
-   break;
-   default:
-   pr_err("Unknown filesystem on device %s: %08X\n",
-  sb->s_id, chksum);
-   return -EINVAL;
+   case MUFS_FS:
+   case MUFS_INTLFFS:
+   case MUFS_DCFFS:
+   sbi->s_flags |= SF_MUFS;
+   /* fall thru */
+   case FS_INTLFFS:
+   case FS_DCFFS:
+   sbi->s_flags |= SF_INTL;
+   break;
+   case MUFS_FFS:
+   sbi->s_flags |= SF_MUFS;
+   break;
+   case FS_FFS:
+   break;
+   case MUFS_OFS:
+   sbi->s_flags |= SF_MUFS;
+   /* fall thru */
+   case FS_OFS:
+   sbi->s_flags |= SF_OFS;
+   sb->s_flags |= MS_NOEXEC;
+   break;
+   case MUFS_DCOFS:
+   case MUFS_INTLOFS:
+   sbi->s_flags |= SF_MUFS;
+   case FS_DCOFS:
+   case FS_INTLOFS:
+   sbi->s_flags |= SF_INTL | SF_OFS;
+   sb->s_flags |= MS_NOEXEC;
+   break;
+   default:
+   pr_err("Unknown filesystem on device %s: %08X\n",
+  sb->s_id, chksum);
+   return -EINVAL;
}
 
if (mount_flags & SF_VERBOSE) {
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/6 linux-next] FS/AFFS: define AFFSNAMEMAX to replace constant use

2015-02-03 Thread Fabian Frederick
30 was used all over the place to compare name length against
AFFS maximum name length.

Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/affs/affs.h |  2 ++
 fs/affs/amigaffs.c |  6 +++---
 fs/affs/dir.c  |  3 ++-
 fs/affs/namei.c| 16 
 fs/affs/super.c|  2 +-
 5 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/fs/affs/affs.h b/fs/affs/affs.h
index ff44ff3..26c89fb 100644
--- a/fs/affs/affs.h
+++ b/fs/affs/affs.h
@@ -30,6 +30,8 @@
 #define AFFS_AC_SIZE   (AFFS_CACHE_SIZE/sizeof(struct affs_ext_key)/2)
 #define AFFS_AC_MASK   (AFFS_AC_SIZE-1)
 
+#define AFFSNAMEMAX 30
+
 struct affs_ext_key {
u32 ext;/* idx of the extended block */
u32 key;/* block number */
diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c
index 7a6de60..581a2fb 100644
--- a/fs/affs/amigaffs.c
+++ b/fs/affs/amigaffs.c
@@ -483,11 +483,11 @@ affs_check_name(const unsigned char *name, int len, bool 
notruncate)
 {
int  i;
 
-   if (len > 30) {
+   if (len > AFFSNAMEMAX) {
if (notruncate)
return -ENAMETOOLONG;
else
-   len = 30;
+   len = AFFSNAMEMAX;
}
for (i = 0; i < len; i++) {
if (name[i] < ' ' || name[i] == ':'
@@ -508,7 +508,7 @@ affs_check_name(const unsigned char *name, int len, bool 
notruncate)
 int
 affs_copy_name(unsigned char *bstr, struct dentry *dentry)
 {
-   int len = min_t(u64, dentry->d_name.len, 30);
+   int len = min_t(u64, dentry->d_name.len, AFFSNAMEMAX);
 
*bstr++ = len;
memcpy(bstr, dentry->d_name.name, len);
diff --git a/fs/affs/dir.c b/fs/affs/dir.c
index 580b958..06a3ba7 100644
--- a/fs/affs/dir.c
+++ b/fs/affs/dir.c
@@ -114,7 +114,8 @@ inside:
break;
}
 
-   namelen = min_t(u8, AFFS_TAIL(sb, fh_bh)->name[0], 30);
+   namelen = min_t(u8, AFFS_TAIL(sb, fh_bh)->name[0],
+   AFFSNAMEMAX);
name = AFFS_TAIL(sb, fh_bh)->name + 1;
pr_debug("readdir(): dir_emit(\"%.*s\", ino=%u), 
hash=%d, f_pos=%llx\n",
 namelen, name, ino, hash_pos, ctx->pos);
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index 4a04c2d..f3cd869 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -71,7 +71,7 @@ __affs_hash_dentry(struct qstr *qstr, toupper_t toupper, bool 
notruncate)
return i;
 
hash = init_name_hash();
-   i = min_t(u64, qstr->len, 30);
+   i = min_t(u64, qstr->len, AFFSNAMEMAX);
for (; i > 0; name++, i--)
hash = partial_name_hash(toupper(*name), hash);
qstr->hash = end_name_hash(hash);
@@ -114,10 +114,10 @@ static inline int __affs_compare_dentry(unsigned int len,
 * If the names are longer than the allowed 30 chars,
 * the excess is ignored, so their length may differ.
 */
-   if (len >= 30) {
-   if (name->len < 30)
+   if (len >= AFFSNAMEMAX) {
+   if (name->len < AFFSNAMEMAX)
return 1;
-   len = 30;
+   len = AFFSNAMEMAX;
} else if (len != name->len)
return 1;
 
@@ -156,10 +156,10 @@ affs_match(struct dentry *dentry, const u8 *name2, 
toupper_t toupper)
const u8 *name = dentry->d_name.name;
int len = dentry->d_name.len;
 
-   if (len >= 30) {
-   if (*name2 < 30)
+   if (len >= AFFSNAMEMAX) {
+   if (*name2 < AFFSNAMEMAX)
return 0;
-   len = 30;
+   len = AFFSNAMEMAX;
} else if (len != *name2)
return 0;
 
@@ -175,7 +175,7 @@ affs_hash_name(struct super_block *sb, const u8 *name, 
unsigned int len)
toupper_t toupper = affs_get_toupper(sb);
int hash;
 
-   hash = len = min_t(unsigned, len, 30);
+   hash = len = min_t(unsigned, len, AFFSNAMEMAX);
for (; len > 0; len--)
hash = (hash * 13 + toupper(*name++)) & 0x7ff;
 
diff --git a/fs/affs/super.c b/fs/affs/super.c
index ee8eca7..c3524bf 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -584,7 +584,7 @@ affs_statfs(struct dentry *dentry, struct kstatfs *buf)
buf->f_bavail  = free;
buf->f_fsid.val[0] = (u32)id;
buf->f_fsid.val[1] = (u32)(id >> 32);
-   buf->f_namelen = 30;
+   buf->f_namelen = AFFSNAMEMAX;
return 0;
 }
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/6 linux-next] fs/affs/amigaffs.c: remove else after return

2015-02-03 Thread Fabian Frederick
else is unnecessary after return -ENAMETOOLONG

Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/affs/amigaffs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c
index 581a2fb..029e23a 100644
--- a/fs/affs/amigaffs.c
+++ b/fs/affs/amigaffs.c
@@ -486,8 +486,7 @@ affs_check_name(const unsigned char *name, int len, bool 
notruncate)
if (len > AFFSNAMEMAX) {
if (notruncate)
return -ENAMETOOLONG;
-   else
-   len = AFFSNAMEMAX;
+   len = AFFSNAMEMAX;
}
for (i = 0; i < len; i++) {
if (name[i] < ' ' || name[i] == ':'
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/6 linux-next] FS/AFFS: replace min() with casting/constant suffix by min_t

2015-02-03 Thread Fabian Frederick
This patch prepares for AFFSNAMEMAX definition

Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/affs/amigaffs.c | 2 +-
 fs/affs/dir.c  | 2 +-
 fs/affs/namei.c| 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c
index 511ab6b..7a6de60 100644
--- a/fs/affs/amigaffs.c
+++ b/fs/affs/amigaffs.c
@@ -508,7 +508,7 @@ affs_check_name(const unsigned char *name, int len, bool 
notruncate)
 int
 affs_copy_name(unsigned char *bstr, struct dentry *dentry)
 {
-   int len = min(dentry->d_name.len, 30u);
+   int len = min_t(u64, dentry->d_name.len, 30);
 
*bstr++ = len;
memcpy(bstr, dentry->d_name.name, len);
diff --git a/fs/affs/dir.c b/fs/affs/dir.c
index a682892..580b958 100644
--- a/fs/affs/dir.c
+++ b/fs/affs/dir.c
@@ -114,7 +114,7 @@ inside:
break;
}
 
-   namelen = min(AFFS_TAIL(sb, fh_bh)->name[0], (u8)30);
+   namelen = min_t(u8, AFFS_TAIL(sb, fh_bh)->name[0], 30);
name = AFFS_TAIL(sb, fh_bh)->name + 1;
pr_debug("readdir(): dir_emit(\"%.*s\", ino=%u), 
hash=%d, f_pos=%llx\n",
 namelen, name, ino, hash_pos, ctx->pos);
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index de84f4d..4a04c2d 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -71,7 +71,7 @@ __affs_hash_dentry(struct qstr *qstr, toupper_t toupper, bool 
notruncate)
return i;
 
hash = init_name_hash();
-   i = min(qstr->len, 30u);
+   i = min_t(u64, qstr->len, 30);
for (; i > 0; name++, i--)
hash = partial_name_hash(toupper(*name), hash);
qstr->hash = end_name_hash(hash);
@@ -175,7 +175,7 @@ affs_hash_name(struct super_block *sb, const u8 *name, 
unsigned int len)
toupper_t toupper = affs_get_toupper(sb);
int hash;
 
-   hash = len = min(len, 30u);
+   hash = len = min_t(unsigned, len, 30);
for (; len > 0; len--)
hash = (hash * 13 + toupper(*name++)) & 0x7ff;
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] fs/ufs/super.c: fix potential race condition

2015-02-03 Thread Fabian Frederick
Let locking subsystem decide on mutex management.
As reported by Andrew Morton this patch fixes a bug:

"
lock_ufs() is assuming that on non-preempt uniprocessor, the calling
code will run atomically up to the matching unlock_ufs().

But that isn't true. The very first site I looked at (ufs_frag_map)
does sb_bread() under lock_ufs().  And sb_bread() will call schedule(),
very commonly.

The ->mutex_owner stuff is a bit hacky but should work OK.
"

Cc: Evgeniy Dushistov 
Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/ufs/super.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index e515e99..8092d37 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -95,22 +95,18 @@
 
 void lock_ufs(struct super_block *sb)
 {
-#if defined(CONFIG_SMP) || defined (CONFIG_PREEMPT)
struct ufs_sb_info *sbi = UFS_SB(sb);
 
mutex_lock(>mutex);
sbi->mutex_owner = current;
-#endif
 }
 
 void unlock_ufs(struct super_block *sb)
 {
-#if defined(CONFIG_SMP) || defined (CONFIG_PREEMPT)
struct ufs_sb_info *sbi = UFS_SB(sb);
 
sbi->mutex_owner = NULL;
mutex_unlock(>mutex);
-#endif
 }
 
 static struct inode *ufs_nfs_get_inode(struct super_block *sb, u64 ino, u32 
generation)
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] fs/ufs/super.c: fix potential race condition

2015-02-03 Thread Fabian Frederick
Let locking subsystem decide on mutex management.
As reported by Andrew Morton this patch fixes a bug:


lock_ufs() is assuming that on non-preempt uniprocessor, the calling
code will run atomically up to the matching unlock_ufs().

But that isn't true. The very first site I looked at (ufs_frag_map)
does sb_bread() under lock_ufs().  And sb_bread() will call schedule(),
very commonly.

The -mutex_owner stuff is a bit hacky but should work OK.


Cc: Evgeniy Dushistov dushis...@mail.ru
Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/ufs/super.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index e515e99..8092d37 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -95,22 +95,18 @@
 
 void lock_ufs(struct super_block *sb)
 {
-#if defined(CONFIG_SMP) || defined (CONFIG_PREEMPT)
struct ufs_sb_info *sbi = UFS_SB(sb);
 
mutex_lock(sbi-mutex);
sbi-mutex_owner = current;
-#endif
 }
 
 void unlock_ufs(struct super_block *sb)
 {
-#if defined(CONFIG_SMP) || defined (CONFIG_PREEMPT)
struct ufs_sb_info *sbi = UFS_SB(sb);
 
sbi-mutex_owner = NULL;
mutex_unlock(sbi-mutex);
-#endif
 }
 
 static struct inode *ufs_nfs_get_inode(struct super_block *sb, u64 ino, u32 
generation)
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/6 linux-next] FS/AFFS: define AFFSNAMEMAX to replace constant use

2015-02-03 Thread Fabian Frederick
30 was used all over the place to compare name length against
AFFS maximum name length.

Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/affs/affs.h |  2 ++
 fs/affs/amigaffs.c |  6 +++---
 fs/affs/dir.c  |  3 ++-
 fs/affs/namei.c| 16 
 fs/affs/super.c|  2 +-
 5 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/fs/affs/affs.h b/fs/affs/affs.h
index ff44ff3..26c89fb 100644
--- a/fs/affs/affs.h
+++ b/fs/affs/affs.h
@@ -30,6 +30,8 @@
 #define AFFS_AC_SIZE   (AFFS_CACHE_SIZE/sizeof(struct affs_ext_key)/2)
 #define AFFS_AC_MASK   (AFFS_AC_SIZE-1)
 
+#define AFFSNAMEMAX 30
+
 struct affs_ext_key {
u32 ext;/* idx of the extended block */
u32 key;/* block number */
diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c
index 7a6de60..581a2fb 100644
--- a/fs/affs/amigaffs.c
+++ b/fs/affs/amigaffs.c
@@ -483,11 +483,11 @@ affs_check_name(const unsigned char *name, int len, bool 
notruncate)
 {
int  i;
 
-   if (len  30) {
+   if (len  AFFSNAMEMAX) {
if (notruncate)
return -ENAMETOOLONG;
else
-   len = 30;
+   len = AFFSNAMEMAX;
}
for (i = 0; i  len; i++) {
if (name[i]  ' ' || name[i] == ':'
@@ -508,7 +508,7 @@ affs_check_name(const unsigned char *name, int len, bool 
notruncate)
 int
 affs_copy_name(unsigned char *bstr, struct dentry *dentry)
 {
-   int len = min_t(u64, dentry-d_name.len, 30);
+   int len = min_t(u64, dentry-d_name.len, AFFSNAMEMAX);
 
*bstr++ = len;
memcpy(bstr, dentry-d_name.name, len);
diff --git a/fs/affs/dir.c b/fs/affs/dir.c
index 580b958..06a3ba7 100644
--- a/fs/affs/dir.c
+++ b/fs/affs/dir.c
@@ -114,7 +114,8 @@ inside:
break;
}
 
-   namelen = min_t(u8, AFFS_TAIL(sb, fh_bh)-name[0], 30);
+   namelen = min_t(u8, AFFS_TAIL(sb, fh_bh)-name[0],
+   AFFSNAMEMAX);
name = AFFS_TAIL(sb, fh_bh)-name + 1;
pr_debug(readdir(): dir_emit(\%.*s\, ino=%u), 
hash=%d, f_pos=%llx\n,
 namelen, name, ino, hash_pos, ctx-pos);
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index 4a04c2d..f3cd869 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -71,7 +71,7 @@ __affs_hash_dentry(struct qstr *qstr, toupper_t toupper, bool 
notruncate)
return i;
 
hash = init_name_hash();
-   i = min_t(u64, qstr-len, 30);
+   i = min_t(u64, qstr-len, AFFSNAMEMAX);
for (; i  0; name++, i--)
hash = partial_name_hash(toupper(*name), hash);
qstr-hash = end_name_hash(hash);
@@ -114,10 +114,10 @@ static inline int __affs_compare_dentry(unsigned int len,
 * If the names are longer than the allowed 30 chars,
 * the excess is ignored, so their length may differ.
 */
-   if (len = 30) {
-   if (name-len  30)
+   if (len = AFFSNAMEMAX) {
+   if (name-len  AFFSNAMEMAX)
return 1;
-   len = 30;
+   len = AFFSNAMEMAX;
} else if (len != name-len)
return 1;
 
@@ -156,10 +156,10 @@ affs_match(struct dentry *dentry, const u8 *name2, 
toupper_t toupper)
const u8 *name = dentry-d_name.name;
int len = dentry-d_name.len;
 
-   if (len = 30) {
-   if (*name2  30)
+   if (len = AFFSNAMEMAX) {
+   if (*name2  AFFSNAMEMAX)
return 0;
-   len = 30;
+   len = AFFSNAMEMAX;
} else if (len != *name2)
return 0;
 
@@ -175,7 +175,7 @@ affs_hash_name(struct super_block *sb, const u8 *name, 
unsigned int len)
toupper_t toupper = affs_get_toupper(sb);
int hash;
 
-   hash = len = min_t(unsigned, len, 30);
+   hash = len = min_t(unsigned, len, AFFSNAMEMAX);
for (; len  0; len--)
hash = (hash * 13 + toupper(*name++))  0x7ff;
 
diff --git a/fs/affs/super.c b/fs/affs/super.c
index ee8eca7..c3524bf 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -584,7 +584,7 @@ affs_statfs(struct dentry *dentry, struct kstatfs *buf)
buf-f_bavail  = free;
buf-f_fsid.val[0] = (u32)id;
buf-f_fsid.val[1] = (u32)(id  32);
-   buf-f_namelen = 30;
+   buf-f_namelen = AFFSNAMEMAX;
return 0;
 }
 
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 6/6 linux-next] fs/affs/super.c: fix switch indentation

2015-02-03 Thread Fabian Frederick
Fix checkpatch error:
ERROR: switch and case should be at the same indent

Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/affs/super.c | 66 -
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/fs/affs/super.c b/fs/affs/super.c
index c3524bf..4cf0e91 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -432,39 +432,39 @@ got_root:
sb-s_flags |= MS_RDONLY;
}
switch (chksum) {
-   case MUFS_FS:
-   case MUFS_INTLFFS:
-   case MUFS_DCFFS:
-   sbi-s_flags |= SF_MUFS;
-   /* fall thru */
-   case FS_INTLFFS:
-   case FS_DCFFS:
-   sbi-s_flags |= SF_INTL;
-   break;
-   case MUFS_FFS:
-   sbi-s_flags |= SF_MUFS;
-   break;
-   case FS_FFS:
-   break;
-   case MUFS_OFS:
-   sbi-s_flags |= SF_MUFS;
-   /* fall thru */
-   case FS_OFS:
-   sbi-s_flags |= SF_OFS;
-   sb-s_flags |= MS_NOEXEC;
-   break;
-   case MUFS_DCOFS:
-   case MUFS_INTLOFS:
-   sbi-s_flags |= SF_MUFS;
-   case FS_DCOFS:
-   case FS_INTLOFS:
-   sbi-s_flags |= SF_INTL | SF_OFS;
-   sb-s_flags |= MS_NOEXEC;
-   break;
-   default:
-   pr_err(Unknown filesystem on device %s: %08X\n,
-  sb-s_id, chksum);
-   return -EINVAL;
+   case MUFS_FS:
+   case MUFS_INTLFFS:
+   case MUFS_DCFFS:
+   sbi-s_flags |= SF_MUFS;
+   /* fall thru */
+   case FS_INTLFFS:
+   case FS_DCFFS:
+   sbi-s_flags |= SF_INTL;
+   break;
+   case MUFS_FFS:
+   sbi-s_flags |= SF_MUFS;
+   break;
+   case FS_FFS:
+   break;
+   case MUFS_OFS:
+   sbi-s_flags |= SF_MUFS;
+   /* fall thru */
+   case FS_OFS:
+   sbi-s_flags |= SF_OFS;
+   sb-s_flags |= MS_NOEXEC;
+   break;
+   case MUFS_DCOFS:
+   case MUFS_INTLOFS:
+   sbi-s_flags |= SF_MUFS;
+   case FS_DCOFS:
+   case FS_INTLOFS:
+   sbi-s_flags |= SF_INTL | SF_OFS;
+   sb-s_flags |= MS_NOEXEC;
+   break;
+   default:
+   pr_err(Unknown filesystem on device %s: %08X\n,
+  sb-s_id, chksum);
+   return -EINVAL;
}
 
if (mount_flags  SF_VERBOSE) {
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/6 linux-next] fs/affs/bitmap.c: remove unnecessary return

2015-02-03 Thread Fabian Frederick
return is not needed at the end of function.

Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/affs/bitmap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/affs/bitmap.c b/fs/affs/bitmap.c
index c8de511..6751489 100644
--- a/fs/affs/bitmap.c
+++ b/fs/affs/bitmap.c
@@ -99,7 +99,6 @@ err_bh_read:
 
 err_range:
affs_error(sb, affs_free_block,Block %u outside partition, block);
-   return;
 }
 
 /*
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 5/6 linux-next] fs/affs/inode.c: remove double extern affs_symlink_inode_operations

2015-02-03 Thread Fabian Frederick
affs_symlink_inode_operations was already declared extern in affs.h

Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/affs/inode.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index 25cb4b4..6f34510 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -13,8 +13,6 @@
 #include linux/gfp.h
 #include affs.h
 
-extern const struct inode_operations affs_symlink_inode_operations;
-
 struct inode *affs_iget(struct super_block *sb, unsigned long ino)
 {
struct affs_sb_info *sbi = AFFS_SB(sb);
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/6 linux-next] fs/affs/amigaffs.c: remove else after return

2015-02-03 Thread Fabian Frederick
else is unnecessary after return -ENAMETOOLONG

Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/affs/amigaffs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c
index 581a2fb..029e23a 100644
--- a/fs/affs/amigaffs.c
+++ b/fs/affs/amigaffs.c
@@ -486,8 +486,7 @@ affs_check_name(const unsigned char *name, int len, bool 
notruncate)
if (len  AFFSNAMEMAX) {
if (notruncate)
return -ENAMETOOLONG;
-   else
-   len = AFFSNAMEMAX;
+   len = AFFSNAMEMAX;
}
for (i = 0; i  len; i++) {
if (name[i]  ' ' || name[i] == ':'
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/6 linux-next] FS/AFFS: replace min() with casting/constant suffix by min_t

2015-02-03 Thread Fabian Frederick
This patch prepares for AFFSNAMEMAX definition

Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/affs/amigaffs.c | 2 +-
 fs/affs/dir.c  | 2 +-
 fs/affs/namei.c| 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c
index 511ab6b..7a6de60 100644
--- a/fs/affs/amigaffs.c
+++ b/fs/affs/amigaffs.c
@@ -508,7 +508,7 @@ affs_check_name(const unsigned char *name, int len, bool 
notruncate)
 int
 affs_copy_name(unsigned char *bstr, struct dentry *dentry)
 {
-   int len = min(dentry-d_name.len, 30u);
+   int len = min_t(u64, dentry-d_name.len, 30);
 
*bstr++ = len;
memcpy(bstr, dentry-d_name.name, len);
diff --git a/fs/affs/dir.c b/fs/affs/dir.c
index a682892..580b958 100644
--- a/fs/affs/dir.c
+++ b/fs/affs/dir.c
@@ -114,7 +114,7 @@ inside:
break;
}
 
-   namelen = min(AFFS_TAIL(sb, fh_bh)-name[0], (u8)30);
+   namelen = min_t(u8, AFFS_TAIL(sb, fh_bh)-name[0], 30);
name = AFFS_TAIL(sb, fh_bh)-name + 1;
pr_debug(readdir(): dir_emit(\%.*s\, ino=%u), 
hash=%d, f_pos=%llx\n,
 namelen, name, ino, hash_pos, ctx-pos);
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index de84f4d..4a04c2d 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -71,7 +71,7 @@ __affs_hash_dentry(struct qstr *qstr, toupper_t toupper, bool 
notruncate)
return i;
 
hash = init_name_hash();
-   i = min(qstr-len, 30u);
+   i = min_t(u64, qstr-len, 30);
for (; i  0; name++, i--)
hash = partial_name_hash(toupper(*name), hash);
qstr-hash = end_name_hash(hash);
@@ -175,7 +175,7 @@ affs_hash_name(struct super_block *sb, const u8 *name, 
unsigned int len)
toupper_t toupper = affs_get_toupper(sb);
int hash;
 
-   hash = len = min(len, 30u);
+   hash = len = min_t(unsigned, len, 30);
for (; len  0; len--)
hash = (hash * 13 + toupper(*name++))  0x7ff;
 
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] fs/ufs/super.c: remove CONFIG_SMP/CONFIG_PREEMPT testing

2015-02-01 Thread Fabian Frederick
Let locking subsystem decide on mutex management.

Cc: Evgeniy Dushistov 
Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/ufs/super.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index e515e99..8092d37 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -95,22 +95,18 @@
 
 void lock_ufs(struct super_block *sb)
 {
-#if defined(CONFIG_SMP) || defined (CONFIG_PREEMPT)
struct ufs_sb_info *sbi = UFS_SB(sb);
 
mutex_lock(>mutex);
sbi->mutex_owner = current;
-#endif
 }
 
 void unlock_ufs(struct super_block *sb)
 {
-#if defined(CONFIG_SMP) || defined (CONFIG_PREEMPT)
struct ufs_sb_info *sbi = UFS_SB(sb);
 
sbi->mutex_owner = NULL;
mutex_unlock(>mutex);
-#endif
 }
 
 static struct inode *ufs_nfs_get_inode(struct super_block *sb, u64 ino, u32 
generation)
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] fs/ufs/super.c: remove CONFIG_SMP/CONFIG_PREEMPT testing

2015-02-01 Thread Fabian Frederick
Let locking subsystem decide on mutex management.

Cc: Evgeniy Dushistov dushis...@mail.ru
Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/ufs/super.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index e515e99..8092d37 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -95,22 +95,18 @@
 
 void lock_ufs(struct super_block *sb)
 {
-#if defined(CONFIG_SMP) || defined (CONFIG_PREEMPT)
struct ufs_sb_info *sbi = UFS_SB(sb);
 
mutex_lock(sbi-mutex);
sbi-mutex_owner = current;
-#endif
 }
 
 void unlock_ufs(struct super_block *sb)
 {
-#if defined(CONFIG_SMP) || defined (CONFIG_PREEMPT)
struct ufs_sb_info *sbi = UFS_SB(sb);
 
sbi-mutex_owner = NULL;
mutex_unlock(sbi-mutex);
-#endif
 }
 
 static struct inode *ufs_nfs_get_inode(struct super_block *sb, u64 ino, u32 
generation)
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] task IO accounting: add conditional read/write counters

2015-01-30 Thread Fabian Frederick
This patch adds syscre and syscwe respectively effective read/write
syscall counters. We already had syscr/syscw which were
unconditionally incremented. Doing the difference between those
variables could give interesting statistics.

Signed-off-by: Fabian Frederick 
---
 Documentation/filesystems/proc.txt | 16 
 fs/proc/base.c |  4 
 include/linux/sched.h  |  2 ++
 include/linux/task_io_accounting.h |  4 
 4 files changed, 26 insertions(+)

diff --git a/Documentation/filesystems/proc.txt 
b/Documentation/filesystems/proc.txt
index a07ba61..87f32d8 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -1536,6 +1536,22 @@ I/O counter: write syscalls
 Attempt to count the number of write I/O operations, i.e. syscalls like
 write() and pwrite().
 
+syscre
+--
+
+I/O counter: Effective read syscalls
+Attempt to count the number of effective read I/O operations,
+i.e. syscalls like read() and pread().
+
+
+syscwe
+--
+
+I/O counter: Effective write syscalls
+Attempt to count the number of effective write I/O operations,
+i.e. syscalls like read() and pread().
+
+
 
 read_bytes
 --
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 3f3d7ae..fad6a3f 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2357,6 +2357,8 @@ static int do_io_accounting(struct task_struct *task, 
struct seq_file *m, int wh
"wchar: %llu\n"
"syscr: %llu\n"
"syscw: %llu\n"
+   "syscre: %llu\n"
+   "syscwe: %llu\n"
"read_bytes: %llu\n"
"write_bytes: %llu\n"
"cancelled_write_bytes: %llu\n",
@@ -2364,6 +2366,8 @@ static int do_io_accounting(struct task_struct *task, 
struct seq_file *m, int wh
(unsigned long long)acct.wchar,
(unsigned long long)acct.syscr,
(unsigned long long)acct.syscw,
+   (unsigned long long)acct.syscre,
+   (unsigned long long)acct.syscwe,
(unsigned long long)acct.read_bytes,
(unsigned long long)acct.write_bytes,
(unsigned long long)acct.cancelled_write_bytes);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 22ee0d5..27519ae 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -3012,11 +3012,13 @@ extern int task_can_switch_user(struct user_struct *up,
 #ifdef CONFIG_TASK_XACCT
 static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
 {
+   tsk->ioac.syscre++;
tsk->ioac.rchar += amt;
 }
 
 static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
 {
+   tsk->ioac.syscwe++;
tsk->ioac.wchar += amt;
 }
 
diff --git a/include/linux/task_io_accounting.h 
b/include/linux/task_io_accounting.h
index bdf855c..bc94291 100644
--- a/include/linux/task_io_accounting.h
+++ b/include/linux/task_io_accounting.h
@@ -18,6 +18,10 @@ struct task_io_accounting {
u64 syscr;
/* # of write syscalls */
u64 syscw;
+   /* # of effective read syscalls */
+   u64 syscre;
+   /* # of effective write syscalls */
+   u64 syscwe;
 #endif /* CONFIG_TASK_XACCT */
 
 #ifdef CONFIG_TASK_IO_ACCOUNTING
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] task IO accounting: add conditional read/write counters

2015-01-30 Thread Fabian Frederick
This patch adds syscre and syscwe respectively effective read/write
syscall counters. We already had syscr/syscw which were
unconditionally incremented. Doing the difference between those
variables could give interesting statistics.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 Documentation/filesystems/proc.txt | 16 
 fs/proc/base.c |  4 
 include/linux/sched.h  |  2 ++
 include/linux/task_io_accounting.h |  4 
 4 files changed, 26 insertions(+)

diff --git a/Documentation/filesystems/proc.txt 
b/Documentation/filesystems/proc.txt
index a07ba61..87f32d8 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -1536,6 +1536,22 @@ I/O counter: write syscalls
 Attempt to count the number of write I/O operations, i.e. syscalls like
 write() and pwrite().
 
+syscre
+--
+
+I/O counter: Effective read syscalls
+Attempt to count the number of effective read I/O operations,
+i.e. syscalls like read() and pread().
+
+
+syscwe
+--
+
+I/O counter: Effective write syscalls
+Attempt to count the number of effective write I/O operations,
+i.e. syscalls like read() and pread().
+
+
 
 read_bytes
 --
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 3f3d7ae..fad6a3f 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2357,6 +2357,8 @@ static int do_io_accounting(struct task_struct *task, 
struct seq_file *m, int wh
wchar: %llu\n
syscr: %llu\n
syscw: %llu\n
+   syscre: %llu\n
+   syscwe: %llu\n
read_bytes: %llu\n
write_bytes: %llu\n
cancelled_write_bytes: %llu\n,
@@ -2364,6 +2366,8 @@ static int do_io_accounting(struct task_struct *task, 
struct seq_file *m, int wh
(unsigned long long)acct.wchar,
(unsigned long long)acct.syscr,
(unsigned long long)acct.syscw,
+   (unsigned long long)acct.syscre,
+   (unsigned long long)acct.syscwe,
(unsigned long long)acct.read_bytes,
(unsigned long long)acct.write_bytes,
(unsigned long long)acct.cancelled_write_bytes);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 22ee0d5..27519ae 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -3012,11 +3012,13 @@ extern int task_can_switch_user(struct user_struct *up,
 #ifdef CONFIG_TASK_XACCT
 static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
 {
+   tsk-ioac.syscre++;
tsk-ioac.rchar += amt;
 }
 
 static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
 {
+   tsk-ioac.syscwe++;
tsk-ioac.wchar += amt;
 }
 
diff --git a/include/linux/task_io_accounting.h 
b/include/linux/task_io_accounting.h
index bdf855c..bc94291 100644
--- a/include/linux/task_io_accounting.h
+++ b/include/linux/task_io_accounting.h
@@ -18,6 +18,10 @@ struct task_io_accounting {
u64 syscr;
/* # of write syscalls */
u64 syscw;
+   /* # of effective read syscalls */
+   u64 syscre;
+   /* # of effective write syscalls */
+   u64 syscwe;
 #endif /* CONFIG_TASK_XACCT */
 
 #ifdef CONFIG_TASK_IO_ACCOUNTING
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] FS/AFFS: use inode writecount instead of local i_opencnt

2015-01-28 Thread Fabian Frederick
atomic_t i_opencnt was used to free allocation in case there were no
more opens. This patch replaces affs_file_open by generic_file_open
and uses FMODE_WRITE/i_writecount==1 for the task like other FS.

Reviewed-by: Jan Kara 
Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/affs/affs.h  |  1 -
 fs/affs/file.c  | 17 -
 fs/affs/inode.c |  2 --
 3 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/fs/affs/affs.h b/fs/affs/affs.h
index ff44ff3..c50815f 100644
--- a/fs/affs/affs.h
+++ b/fs/affs/affs.h
@@ -39,7 +39,6 @@ struct affs_ext_key {
  * affs fs inode data in memory
  */
 struct affs_inode_info {
-   atomic_t i_opencnt;
struct semaphore i_link_lock;   /* Protects internal inode 
access. */
struct semaphore i_ext_lock;/* Protects internal inode 
access. */
 #define i_hash_lock i_ext_lock
diff --git a/fs/affs/file.c b/fs/affs/file.c
index d2468bf..77e30e8 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -18,21 +18,12 @@
 static struct buffer_head *affs_get_extblock_slow(struct inode *inode, u32 
ext);
 
 static int
-affs_file_open(struct inode *inode, struct file *filp)
-{
-   pr_debug("open(%lu,%d)\n",
-inode->i_ino, atomic_read(_I(inode)->i_opencnt));
-   atomic_inc(_I(inode)->i_opencnt);
-   return 0;
-}
-
-static int
 affs_file_release(struct inode *inode, struct file *filp)
 {
-   pr_debug("release(%lu, %d)\n",
-inode->i_ino, atomic_read(_I(inode)->i_opencnt));
+   pr_debug("release(%lu)\n", inode->i_ino);
 
-   if (atomic_dec_and_test(_I(inode)->i_opencnt)) {
+   if ((filp->f_mode & FMODE_WRITE) &&
+   (atomic_read(>i_writecount) == 1)) {
mutex_lock(>i_mutex);
if (inode->i_size != AFFS_I(inode)->mmu_private)
affs_truncate(inode);
@@ -969,7 +960,7 @@ const struct file_operations affs_file_operations = {
.write  = new_sync_write,
.write_iter = generic_file_write_iter,
.mmap   = generic_file_mmap,
-   .open   = affs_file_open,
+   .open   = generic_file_open,
.release= affs_file_release,
.fsync  = affs_file_fsync,
.splice_read= generic_file_splice_read,
diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index 25cb4b4..5c160dd 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -56,7 +56,6 @@ struct inode *affs_iget(struct super_block *sb, unsigned long 
ino)
AFFS_I(inode)->i_extcnt = 1;
AFFS_I(inode)->i_ext_last = ~1;
AFFS_I(inode)->i_protect = prot;
-   atomic_set(_I(inode)->i_opencnt, 0);
AFFS_I(inode)->i_blkcnt = 0;
AFFS_I(inode)->i_lc = NULL;
AFFS_I(inode)->i_lc_size = 0;
@@ -307,7 +306,6 @@ affs_new_inode(struct inode *dir)
inode->i_ino = block;
set_nlink(inode, 1);
inode->i_mtime   = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
-   atomic_set(_I(inode)->i_opencnt, 0);
AFFS_I(inode)->i_blkcnt = 0;
AFFS_I(inode)->i_lc = NULL;
AFFS_I(inode)->i_lc_size = 0;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] FS/AFFS: use inode writecount instead of local i_opencnt

2015-01-28 Thread Fabian Frederick
atomic_t i_opencnt was used to free allocation in case there were no
more opens. This patch replaces affs_file_open by generic_file_open
and uses FMODE_WRITE/i_writecount==1 for the task like other FS.

Reviewed-by: Jan Kara j...@suse.cz
Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/affs/affs.h  |  1 -
 fs/affs/file.c  | 17 -
 fs/affs/inode.c |  2 --
 3 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/fs/affs/affs.h b/fs/affs/affs.h
index ff44ff3..c50815f 100644
--- a/fs/affs/affs.h
+++ b/fs/affs/affs.h
@@ -39,7 +39,6 @@ struct affs_ext_key {
  * affs fs inode data in memory
  */
 struct affs_inode_info {
-   atomic_t i_opencnt;
struct semaphore i_link_lock;   /* Protects internal inode 
access. */
struct semaphore i_ext_lock;/* Protects internal inode 
access. */
 #define i_hash_lock i_ext_lock
diff --git a/fs/affs/file.c b/fs/affs/file.c
index d2468bf..77e30e8 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -18,21 +18,12 @@
 static struct buffer_head *affs_get_extblock_slow(struct inode *inode, u32 
ext);
 
 static int
-affs_file_open(struct inode *inode, struct file *filp)
-{
-   pr_debug(open(%lu,%d)\n,
-inode-i_ino, atomic_read(AFFS_I(inode)-i_opencnt));
-   atomic_inc(AFFS_I(inode)-i_opencnt);
-   return 0;
-}
-
-static int
 affs_file_release(struct inode *inode, struct file *filp)
 {
-   pr_debug(release(%lu, %d)\n,
-inode-i_ino, atomic_read(AFFS_I(inode)-i_opencnt));
+   pr_debug(release(%lu)\n, inode-i_ino);
 
-   if (atomic_dec_and_test(AFFS_I(inode)-i_opencnt)) {
+   if ((filp-f_mode  FMODE_WRITE) 
+   (atomic_read(inode-i_writecount) == 1)) {
mutex_lock(inode-i_mutex);
if (inode-i_size != AFFS_I(inode)-mmu_private)
affs_truncate(inode);
@@ -969,7 +960,7 @@ const struct file_operations affs_file_operations = {
.write  = new_sync_write,
.write_iter = generic_file_write_iter,
.mmap   = generic_file_mmap,
-   .open   = affs_file_open,
+   .open   = generic_file_open,
.release= affs_file_release,
.fsync  = affs_file_fsync,
.splice_read= generic_file_splice_read,
diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index 25cb4b4..5c160dd 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -56,7 +56,6 @@ struct inode *affs_iget(struct super_block *sb, unsigned long 
ino)
AFFS_I(inode)-i_extcnt = 1;
AFFS_I(inode)-i_ext_last = ~1;
AFFS_I(inode)-i_protect = prot;
-   atomic_set(AFFS_I(inode)-i_opencnt, 0);
AFFS_I(inode)-i_blkcnt = 0;
AFFS_I(inode)-i_lc = NULL;
AFFS_I(inode)-i_lc_size = 0;
@@ -307,7 +306,6 @@ affs_new_inode(struct inode *dir)
inode-i_ino = block;
set_nlink(inode, 1);
inode-i_mtime   = inode-i_atime = inode-i_ctime = CURRENT_TIME_SEC;
-   atomic_set(AFFS_I(inode)-i_opencnt, 0);
AFFS_I(inode)-i_blkcnt = 0;
AFFS_I(inode)-i_lc = NULL;
AFFS_I(inode)-i_lc_size = 0;
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFC 2/2] fs/affs/super.c: let vfs do mount_bdev

2015-01-19 Thread Fabian Frederick
share fill_super with vfs and remove local mount function.

Signed-off-by: Fabian Frederick 
---
 fs/affs/super.c | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/fs/affs/super.c b/fs/affs/super.c
index ee8eca7..9f7bba9 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -588,12 +588,6 @@ affs_statfs(struct dentry *dentry, struct kstatfs *buf)
return 0;
 }
 
-static struct dentry *affs_mount(struct file_system_type *fs_type,
-   int flags, const char *dev_name, void *data)
-{
-   return mount_bdev(fs_type, flags, dev_name, data, affs_fill_super);
-}
-
 static void affs_kill_sb(struct super_block *sb)
 {
struct affs_sb_info *sbi = AFFS_SB(sb);
@@ -610,7 +604,7 @@ static void affs_kill_sb(struct super_block *sb)
 static struct file_system_type affs_fs_type = {
.owner  = THIS_MODULE,
.name   = "affs",
-   .mount  = affs_mount,
+   .fill_super = affs_fill_super,
.kill_sb= affs_kill_sb,
.fs_flags   = FS_REQUIRES_DEV,
 };
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFC 1/2] FS: mount_bdev from vfs instead of filesystem specific mount function.

2015-01-19 Thread Fabian Frederick
Currently, a lot of filesystem mounting functions feature in
file_system_type only to be called from vfs mount_fs and call mount_bdev.

This patch adds fill_super function to that structure and lets vfs
call mount_bdev when no mount function is declared.

Signed-off-by: Fabian Frederick 
---
 fs/super.c | 6 +-
 include/linux/fs.h | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/fs/super.c b/fs/super.c
index a89d625..7c37355 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1112,7 +1112,11 @@ mount_fs(struct file_system_type *type, int flags, const 
char *name, void *data)
goto out_free_secdata;
}
 
-   root = type->mount(type, flags, name, data);
+   if (type->mount)
+   root = type->mount(type, flags, name, data);
+   else
+   root = mount_bdev(type, flags, name, data, type->fill_super);
+
if (IS_ERR(root)) {
error = PTR_ERR(root);
goto out_free_secdata;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 0bd9669..3e19349 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1846,8 +1846,10 @@ struct file_system_type {
 #define FS_USERNS_MOUNT8   /* Can be mounted by userns 
root */
 #define FS_USERNS_DEV_MOUNT16 /* A userns mount does not imply MNT_NODEV */
 #define FS_RENAME_DOES_D_MOVE  32768   /* FS will handle d_move() during 
rename() internally. */
+   int (*fill_super)(struct super_block *, void *, int);
struct dentry *(*mount) (struct file_system_type *, int,
   const char *, void *);
+
void (*kill_sb) (struct super_block *);
struct module *owner;
struct file_system_type * next;
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFC 1/2] FS: mount_bdev from vfs instead of filesystem specific mount function.

2015-01-19 Thread Fabian Frederick
Currently, a lot of filesystem mounting functions feature in
file_system_type only to be called from vfs mount_fs and call mount_bdev.

This patch adds fill_super function to that structure and lets vfs
call mount_bdev when no mount function is declared.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/super.c | 6 +-
 include/linux/fs.h | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/fs/super.c b/fs/super.c
index a89d625..7c37355 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1112,7 +1112,11 @@ mount_fs(struct file_system_type *type, int flags, const 
char *name, void *data)
goto out_free_secdata;
}
 
-   root = type-mount(type, flags, name, data);
+   if (type-mount)
+   root = type-mount(type, flags, name, data);
+   else
+   root = mount_bdev(type, flags, name, data, type-fill_super);
+
if (IS_ERR(root)) {
error = PTR_ERR(root);
goto out_free_secdata;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 0bd9669..3e19349 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1846,8 +1846,10 @@ struct file_system_type {
 #define FS_USERNS_MOUNT8   /* Can be mounted by userns 
root */
 #define FS_USERNS_DEV_MOUNT16 /* A userns mount does not imply MNT_NODEV */
 #define FS_RENAME_DOES_D_MOVE  32768   /* FS will handle d_move() during 
rename() internally. */
+   int (*fill_super)(struct super_block *, void *, int);
struct dentry *(*mount) (struct file_system_type *, int,
   const char *, void *);
+
void (*kill_sb) (struct super_block *);
struct module *owner;
struct file_system_type * next;
-- 
1.9.3

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFC 2/2] fs/affs/super.c: let vfs do mount_bdev

2015-01-19 Thread Fabian Frederick
share fill_super with vfs and remove local mount function.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/affs/super.c | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/fs/affs/super.c b/fs/affs/super.c
index ee8eca7..9f7bba9 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -588,12 +588,6 @@ affs_statfs(struct dentry *dentry, struct kstatfs *buf)
return 0;
 }
 
-static struct dentry *affs_mount(struct file_system_type *fs_type,
-   int flags, const char *dev_name, void *data)
-{
-   return mount_bdev(fs_type, flags, dev_name, data, affs_fill_super);
-}
-
 static void affs_kill_sb(struct super_block *sb)
 {
struct affs_sb_info *sbi = AFFS_SB(sb);
@@ -610,7 +604,7 @@ static void affs_kill_sb(struct super_block *sb)
 static struct file_system_type affs_fs_type = {
.owner  = THIS_MODULE,
.name   = affs,
-   .mount  = affs_mount,
+   .fill_super = affs_fill_super,
.kill_sb= affs_kill_sb,
.fs_flags   = FS_REQUIRES_DEV,
 };
-- 
1.9.3

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] fs/affs/super.c: destroy sbi mutex in affs_kill_sb()

2015-01-13 Thread Fabian Frederick
Call mutex_destroy() on superblock mutex in affs_kill_sb()
otherwise mutex debugging code isn't able to detect that mutex
is used after being freed. (thanks to Jan Kara for complete definition).

Cc: Jan Kara 
Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/affs/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/affs/super.c b/fs/affs/super.c
index f754ab6..ee8eca7 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -602,6 +602,7 @@ static void affs_kill_sb(struct super_block *sb)
affs_free_bitmap(sb);
affs_brelse(sbi->s_root_bh);
kfree(sbi->s_prefix);
+   mutex_destroy(>s_bmlock);
kfree(sbi);
}
 }
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 linux-next] mm,compaction: move suitable_migration_target() under CONFIG_COMPACTION

2015-01-13 Thread Fabian Frederick
suitable_migration_target() is only used by isolate_freepages()
Define it under CONFIG_COMPACTION || CONFIG_CMA is not needed.

Fix the following warning:
mm/compaction.c:311:13: warning: 'suitable_migration_target' defined
but not used [-Wunused-function]

Signed-off-by: Fabian Frederick 
---
v2: move function below update_pageblock_skip() instead of above 
isolate_freepages() (suggested by Vlastimil Babka)


 mm/compaction.c | 44 ++--
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 546e571..580790d 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -207,6 +207,28 @@ static void update_pageblock_skip(struct compact_control 
*cc,
zone->compact_cached_free_pfn = pfn;
}
 }
+
+/* Returns true if the page is within a block suitable for migration to */
+static bool suitable_migration_target(struct page *page)
+{
+   /* If the page is a large free page, then disallow migration */
+   if (PageBuddy(page)) {
+   /*
+* We are checking page_order without zone->lock taken. But
+* the only small danger is that we skip a potentially suitable
+* pageblock, so it's not worth to check order for valid range.
+*/
+   if (page_order_unsafe(page) >= pageblock_order)
+   return false;
+   }
+
+   /* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */
+   if (migrate_async_suitable(get_pageblock_migratetype(page)))
+   return true;
+
+   /* Otherwise skip the block */
+   return false;
+}
 #else
 static inline bool isolation_suitable(struct compact_control *cc,
struct page *page)
@@ -307,28 +329,6 @@ static inline bool compact_should_abort(struct 
compact_control *cc)
return false;
 }
 
-/* Returns true if the page is within a block suitable for migration to */
-static bool suitable_migration_target(struct page *page)
-{
-   /* If the page is a large free page, then disallow migration */
-   if (PageBuddy(page)) {
-   /*
-* We are checking page_order without zone->lock taken. But
-* the only small danger is that we skip a potentially suitable
-* pageblock, so it's not worth to check order for valid range.
-*/
-   if (page_order_unsafe(page) >= pageblock_order)
-   return false;
-   }
-
-   /* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */
-   if (migrate_async_suitable(get_pageblock_migratetype(page)))
-   return true;
-
-   /* Otherwise skip the block */
-   return false;
-}
-
 /*
  * Isolate free pages onto a private freelist. If @strict is true, will abort
  * returning 0 on any invalid PFNs or non-free pages inside of the pageblock
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] fs/affs/super.c: destroy sbi mutex in affs_kill_sb()

2015-01-13 Thread Fabian Frederick
Call mutex_destroy() on superblock mutex in affs_kill_sb()
otherwise mutex debugging code isn't able to detect that mutex
is used after being freed. (thanks to Jan Kara for complete definition).

Cc: Jan Kara j...@suse.cz
Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/affs/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/affs/super.c b/fs/affs/super.c
index f754ab6..ee8eca7 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -602,6 +602,7 @@ static void affs_kill_sb(struct super_block *sb)
affs_free_bitmap(sb);
affs_brelse(sbi-s_root_bh);
kfree(sbi-s_prefix);
+   mutex_destroy(sbi-s_bmlock);
kfree(sbi);
}
 }
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 linux-next] mm,compaction: move suitable_migration_target() under CONFIG_COMPACTION

2015-01-13 Thread Fabian Frederick
suitable_migration_target() is only used by isolate_freepages()
Define it under CONFIG_COMPACTION || CONFIG_CMA is not needed.

Fix the following warning:
mm/compaction.c:311:13: warning: 'suitable_migration_target' defined
but not used [-Wunused-function]

Signed-off-by: Fabian Frederick f...@skynet.be
---
v2: move function below update_pageblock_skip() instead of above 
isolate_freepages() (suggested by Vlastimil Babka)


 mm/compaction.c | 44 ++--
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 546e571..580790d 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -207,6 +207,28 @@ static void update_pageblock_skip(struct compact_control 
*cc,
zone-compact_cached_free_pfn = pfn;
}
 }
+
+/* Returns true if the page is within a block suitable for migration to */
+static bool suitable_migration_target(struct page *page)
+{
+   /* If the page is a large free page, then disallow migration */
+   if (PageBuddy(page)) {
+   /*
+* We are checking page_order without zone-lock taken. But
+* the only small danger is that we skip a potentially suitable
+* pageblock, so it's not worth to check order for valid range.
+*/
+   if (page_order_unsafe(page) = pageblock_order)
+   return false;
+   }
+
+   /* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */
+   if (migrate_async_suitable(get_pageblock_migratetype(page)))
+   return true;
+
+   /* Otherwise skip the block */
+   return false;
+}
 #else
 static inline bool isolation_suitable(struct compact_control *cc,
struct page *page)
@@ -307,28 +329,6 @@ static inline bool compact_should_abort(struct 
compact_control *cc)
return false;
 }
 
-/* Returns true if the page is within a block suitable for migration to */
-static bool suitable_migration_target(struct page *page)
-{
-   /* If the page is a large free page, then disallow migration */
-   if (PageBuddy(page)) {
-   /*
-* We are checking page_order without zone-lock taken. But
-* the only small danger is that we skip a potentially suitable
-* pageblock, so it's not worth to check order for valid range.
-*/
-   if (page_order_unsafe(page) = pageblock_order)
-   return false;
-   }
-
-   /* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */
-   if (migrate_async_suitable(get_pageblock_migratetype(page)))
-   return true;
-
-   /* Otherwise skip the block */
-   return false;
-}
-
 /*
  * Isolate free pages onto a private freelist. If @strict is true, will abort
  * returning 0 on any invalid PFNs or non-free pages inside of the pageblock
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] udf: destroy sbi mutex in put_super

2015-01-10 Thread Fabian Frederick
Call mutex_destroy() on superblock mutex in udf_put_super()
otherwise mutex debugging code isn't able to detect that
mutex is used after being freed.
(thanks to Jan Kara for complete definition).

Signed-off-by: Fabian Frederick 
---
 fs/udf/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index 3ccb2f1..3d35a75 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -2300,6 +2300,7 @@ static void udf_put_super(struct super_block *sb)
udf_close_lvid(sb);
brelse(sbi->s_lvid_bh);
udf_sb_free_partitions(sb);
+   mutex_destroy(>s_alloc_mutex);
kfree(sb->s_fs_info);
sb->s_fs_info = NULL;
 }
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] tty: remove unused variable sprop

2015-01-10 Thread Fabian Frederick
sprop is unused in find_console_handle() since commit a752ee56ad84
("tty: Update hypervisor tty drivers to use core stdout parsing code.")

Signed-off-by: Fabian Frederick 
---
 drivers/tty/ehv_bytechan.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index 3c60923..342b36b 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -112,7 +112,6 @@ static void disable_tx_interrupt(struct ehv_bc_data *bc)
 static int find_console_handle(void)
 {
struct device_node *np = of_stdout;
-   const char *sprop = NULL;
const uint32_t *iprop;
 
/* We don't care what the aliased node is actually called.  We only
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] tty: remove unused variable sprop

2015-01-10 Thread Fabian Frederick
sprop is unused in find_console_handle() since commit a752ee56ad84
(tty: Update hypervisor tty drivers to use core stdout parsing code.)

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/tty/ehv_bytechan.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index 3c60923..342b36b 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -112,7 +112,6 @@ static void disable_tx_interrupt(struct ehv_bc_data *bc)
 static int find_console_handle(void)
 {
struct device_node *np = of_stdout;
-   const char *sprop = NULL;
const uint32_t *iprop;
 
/* We don't care what the aliased node is actually called.  We only
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] udf: destroy sbi mutex in put_super

2015-01-10 Thread Fabian Frederick
Call mutex_destroy() on superblock mutex in udf_put_super()
otherwise mutex debugging code isn't able to detect that
mutex is used after being freed.
(thanks to Jan Kara for complete definition).

Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/udf/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index 3ccb2f1..3d35a75 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -2300,6 +2300,7 @@ static void udf_put_super(struct super_block *sb)
udf_close_lvid(sb);
brelse(sbi-s_lvid_bh);
udf_sb_free_partitions(sb);
+   mutex_destroy(sbi-s_alloc_mutex);
kfree(sb-s_fs_info);
sb-s_fs_info = NULL;
 }
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/1 linux-next] mm,compaction: move suitable_migration_target() under CONFIG_COMPACTION

2015-01-09 Thread Fabian Frederick


> On 06 January 2015 at 18:21 Vlastimil Babka  wrote:
>
>
> On 01/03/2015 05:04 PM, Fabian Frederick wrote:
> > suitable_migration_target() is only used by isolate_freepages()
> > Define it under CONFIG_COMPACTION || CONFIG_CMA is not needed.
> >
> > Fix the following warning:
> > mm/compaction.c:311:13: warning: 'suitable_migration_target' defined
> > but not used [-Wunused-function]
> >
> > Signed-off-by: Fabian Frederick 
>
> I agree, I would just move it to the section where isolation_suitable() and
> related others are, maybe at the end of this section below
> update_pageblock_skip()?

Yes of course, that would solve the warning as well.

Fabian
>
> Vlastimil

>
> > ---
> >  mm/compaction.c | 44 ++--
> >  1 file changed, 22 insertions(+), 22 deletions(-)
> >
> > diff --git a/mm/compaction.c b/mm/compaction.c
> > index 546e571..38b151c 100644
> > --- a/mm/compaction.c
> > +++ b/mm/compaction.c
> > @@ -307,28 +307,6 @@ static inline bool compact_should_abort(struct
> > compact_control *cc)
> >     return false;
> >  }
> > 
> > -/* Returns true if the page is within a block suitable for migration to */
> > -static bool suitable_migration_target(struct page *page)
> > -{
> > -   /* If the page is a large free page, then disallow migration */
> > -   if (PageBuddy(page)) {
> > -           /*
> > -            * We are checking page_order without zone->lock taken. But
> > -            * the only small danger is that we skip a potentially suitable
> > -            * pageblock, so it's not worth to check order for valid range.
> > -            */
> > -           if (page_order_unsafe(page) >= pageblock_order)
> > -                   return false;
> > -   }
> > -
> > -   /* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */
> > -   if (migrate_async_suitable(get_pageblock_migratetype(page)))
> > -           return true;
> > -
> > -   /* Otherwise skip the block */
> > -   return false;
> > -}
> > -
> >  /*
> >   * Isolate free pages onto a private freelist. If @strict is true, will
> >abort
> >   * returning 0 on any invalid PFNs or non-free pages inside of the
> >pageblock
> > @@ -802,6 +780,28 @@ isolate_migratepages_range(struct compact_control *cc,
> > unsigned long start_pfn,
> > 
> >  #endif /* CONFIG_COMPACTION || CONFIG_CMA */
> >  #ifdef CONFIG_COMPACTION
> > +/* Returns true if the page is within a block suitable for migration to */
> > +static bool suitable_migration_target(struct page *page)
> > +{
> > +   /* If the page is a large free page, then disallow migration */
> > +   if (PageBuddy(page)) {
> > +           /*
> > +            * We are checking page_order without zone->lock taken. But
> > +            * the only small danger is that we skip a potentially suitable
> > +            * pageblock, so it's not worth to check order for valid range.
> > +            */
> > +           if (page_order_unsafe(page) >= pageblock_order)
> > +                   return false;
> > +   }
> > +
> > +   /* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */
> > +   if (migrate_async_suitable(get_pageblock_migratetype(page)))
> > +           return true;
> > +
> > +   /* Otherwise skip the block */
> > +   return false;
> > +}
> > +
> >  /*
> >   * Based on information in the current compact_control, find blocks
> >   * suitable for isolating free pages from and then isolate them.
> >
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] fs/affs/file.c: fix direct IO writes beyond EOF

2015-01-09 Thread Fabian Frederick
Use the same fallback to normal IO in case of write
operations beyond EOF as fat direct IO. This patch fixes

fsx file -d -Z -r 4096 -w 4096

Report:
129(129 mod 256): TRUNCATE DOWN from 0x3ff01 to 0xb3f6
130(130 mod 256): WRITE0x22000 thru 0x2dfff (0xc000 bytes) HOLE

Thanks to Jan for helping me on this problem.

Cc: Jan Kara 
Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
Ideal solution suggested by Jan Kara would be to use cont_write_begin but
 affs direct_IO shouldn't be used a lot anyway...

 fs/affs/file.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/fs/affs/file.c b/fs/affs/file.c
index 7e83ba2..d2468bf 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -398,6 +398,13 @@ affs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter 
*iter,
size_t count = iov_iter_count(iter);
ssize_t ret;
 
+   if (rw == WRITE) {
+   loff_t size = offset + count;
+
+   if (AFFS_I(inode)->mmu_private < size)
+   return 0;
+   }
+
ret = blockdev_direct_IO(rw, iocb, inode, iter, offset, affs_get_block);
if (ret < 0 && (rw & WRITE))
affs_write_failed(mapping, offset + count);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] fs/affs/file.c: fix direct IO writes beyond EOF

2015-01-09 Thread Fabian Frederick
Use the same fallback to normal IO in case of write
operations beyond EOF as fat direct IO. This patch fixes

fsx file -d -Z -r 4096 -w 4096

Report:
129(129 mod 256): TRUNCATE DOWN from 0x3ff01 to 0xb3f6
130(130 mod 256): WRITE0x22000 thru 0x2dfff (0xc000 bytes) HOLE

Thanks to Jan for helping me on this problem.

Cc: Jan Kara j...@suse.cz
Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
Ideal solution suggested by Jan Kara would be to use cont_write_begin but
 affs direct_IO shouldn't be used a lot anyway...

 fs/affs/file.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/fs/affs/file.c b/fs/affs/file.c
index 7e83ba2..d2468bf 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -398,6 +398,13 @@ affs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter 
*iter,
size_t count = iov_iter_count(iter);
ssize_t ret;
 
+   if (rw == WRITE) {
+   loff_t size = offset + count;
+
+   if (AFFS_I(inode)-mmu_private  size)
+   return 0;
+   }
+
ret = blockdev_direct_IO(rw, iocb, inode, iter, offset, affs_get_block);
if (ret  0  (rw  WRITE))
affs_write_failed(mapping, offset + count);
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/1 linux-next] mm,compaction: move suitable_migration_target() under CONFIG_COMPACTION

2015-01-09 Thread Fabian Frederick


 On 06 January 2015 at 18:21 Vlastimil Babka vba...@suse.cz wrote:


 On 01/03/2015 05:04 PM, Fabian Frederick wrote:
  suitable_migration_target() is only used by isolate_freepages()
  Define it under CONFIG_COMPACTION || CONFIG_CMA is not needed.
 
  Fix the following warning:
  mm/compaction.c:311:13: warning: 'suitable_migration_target' defined
  but not used [-Wunused-function]
 
  Signed-off-by: Fabian Frederick f...@skynet.be

 I agree, I would just move it to the section where isolation_suitable() and
 related others are, maybe at the end of this section below
 update_pageblock_skip()?

Yes of course, that would solve the warning as well.

Fabian

 Vlastimil


  ---
   mm/compaction.c | 44 ++--
   1 file changed, 22 insertions(+), 22 deletions(-)
 
  diff --git a/mm/compaction.c b/mm/compaction.c
  index 546e571..38b151c 100644
  --- a/mm/compaction.c
  +++ b/mm/compaction.c
  @@ -307,28 +307,6 @@ static inline bool compact_should_abort(struct
  compact_control *cc)
      return false;
   }
  
  -/* Returns true if the page is within a block suitable for migration to */
  -static bool suitable_migration_target(struct page *page)
  -{
  -   /* If the page is a large free page, then disallow migration */
  -   if (PageBuddy(page)) {
  -           /*
  -            * We are checking page_order without zone-lock taken. But
  -            * the only small danger is that we skip a potentially suitable
  -            * pageblock, so it's not worth to check order for valid range.
  -            */
  -           if (page_order_unsafe(page) = pageblock_order)
  -                   return false;
  -   }
  -
  -   /* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */
  -   if (migrate_async_suitable(get_pageblock_migratetype(page)))
  -           return true;
  -
  -   /* Otherwise skip the block */
  -   return false;
  -}
  -
   /*
    * Isolate free pages onto a private freelist. If @strict is true, will
 abort
    * returning 0 on any invalid PFNs or non-free pages inside of the
 pageblock
  @@ -802,6 +780,28 @@ isolate_migratepages_range(struct compact_control *cc,
  unsigned long start_pfn,
  
   #endif /* CONFIG_COMPACTION || CONFIG_CMA */
   #ifdef CONFIG_COMPACTION
  +/* Returns true if the page is within a block suitable for migration to */
  +static bool suitable_migration_target(struct page *page)
  +{
  +   /* If the page is a large free page, then disallow migration */
  +   if (PageBuddy(page)) {
  +           /*
  +            * We are checking page_order without zone-lock taken. But
  +            * the only small danger is that we skip a potentially suitable
  +            * pageblock, so it's not worth to check order for valid range.
  +            */
  +           if (page_order_unsafe(page) = pageblock_order)
  +                   return false;
  +   }
  +
  +   /* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */
  +   if (migrate_async_suitable(get_pageblock_migratetype(page)))
  +           return true;
  +
  +   /* Otherwise skip the block */
  +   return false;
  +}
  +
   /*
    * Based on information in the current compact_control, find blocks
    * suitable for isolating free pages from and then isolate them.
 

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] ceph: use %zu for size_t display

2015-01-03 Thread Fabian Frederick
Fixes the following 32-bit compilation warning:
fs/ceph/addr.c:1419:2: warning: format '%lu' expects argument of type
'long unsigned int', but argument 5 has type 'size_t' [-Wformat=]

Signed-off-by: Fabian Frederick 
---
 fs/ceph/addr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index f5013d9..c81c0e0 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -1416,7 +1416,7 @@ void ceph_fill_inline_data(struct inode *inode, struct 
page *locked_page,
}
}
 
-   dout("fill_inline_data %p %llx.%llx len %lu locked_page %p\n",
+   dout("fill_inline_data %p %llx.%llx len %zu locked_page %p\n",
 inode, ceph_vinop(inode), len, locked_page);
 
if (len > 0) {
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] mm,compaction: move suitable_migration_target() under CONFIG_COMPACTION

2015-01-03 Thread Fabian Frederick
suitable_migration_target() is only used by isolate_freepages()
Define it under CONFIG_COMPACTION || CONFIG_CMA is not needed.

Fix the following warning:
mm/compaction.c:311:13: warning: 'suitable_migration_target' defined
but not used [-Wunused-function]

Signed-off-by: Fabian Frederick 
---
 mm/compaction.c | 44 ++--
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 546e571..38b151c 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -307,28 +307,6 @@ static inline bool compact_should_abort(struct 
compact_control *cc)
return false;
 }
 
-/* Returns true if the page is within a block suitable for migration to */
-static bool suitable_migration_target(struct page *page)
-{
-   /* If the page is a large free page, then disallow migration */
-   if (PageBuddy(page)) {
-   /*
-* We are checking page_order without zone->lock taken. But
-* the only small danger is that we skip a potentially suitable
-* pageblock, so it's not worth to check order for valid range.
-*/
-   if (page_order_unsafe(page) >= pageblock_order)
-   return false;
-   }
-
-   /* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */
-   if (migrate_async_suitable(get_pageblock_migratetype(page)))
-   return true;
-
-   /* Otherwise skip the block */
-   return false;
-}
-
 /*
  * Isolate free pages onto a private freelist. If @strict is true, will abort
  * returning 0 on any invalid PFNs or non-free pages inside of the pageblock
@@ -802,6 +780,28 @@ isolate_migratepages_range(struct compact_control *cc, 
unsigned long start_pfn,
 
 #endif /* CONFIG_COMPACTION || CONFIG_CMA */
 #ifdef CONFIG_COMPACTION
+/* Returns true if the page is within a block suitable for migration to */
+static bool suitable_migration_target(struct page *page)
+{
+   /* If the page is a large free page, then disallow migration */
+   if (PageBuddy(page)) {
+   /*
+* We are checking page_order without zone->lock taken. But
+* the only small danger is that we skip a potentially suitable
+* pageblock, so it's not worth to check order for valid range.
+*/
+   if (page_order_unsafe(page) >= pageblock_order)
+   return false;
+   }
+
+   /* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */
+   if (migrate_async_suitable(get_pageblock_migratetype(page)))
+   return true;
+
+   /* Otherwise skip the block */
+   return false;
+}
+
 /*
  * Based on information in the current compact_control, find blocks
  * suitable for isolating free pages from and then isolate them.
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] hp100: simplify hp100_module_init

2015-01-03 Thread Fabian Frederick
-Avoid double goto and directly return err where possible.
-Remove unused labels which fixes:

drivers/net/ethernet/hp/hp100.c:3047:2: warning: label
'out3' defined but not used [-Wunused-label]

Signed-off-by: Fabian Frederick 
---
This is untested.

 drivers/net/ethernet/hp/hp100.c | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c
index ae6e30d..7155938 100644
--- a/drivers/net/ethernet/hp/hp100.c
+++ b/drivers/net/ethernet/hp/hp100.c
@@ -3031,26 +3031,25 @@ static int __init hp100_module_init(void)
 
err = hp100_isa_init();
if (err && err != -ENODEV)
-   goto out;
+   return err;
 #ifdef CONFIG_EISA
err = eisa_driver_register(_eisa_driver);
if (err && err != -ENODEV)
-   goto out2;
+   goto out_eisa;
+   else
+   return err;
 #endif
 #ifdef CONFIG_PCI
err = pci_register_driver(_pci_driver);
-   if (err && err != -ENODEV)
-   goto out3;
+   if (!err || err == -ENODEV)
+   return err;
 #endif
- out:
-   return err;
- out3:
 #ifdef CONFIG_EISA
eisa_driver_unregister (_eisa_driver);
- out2:
+ out_eisa:
 #endif
hp100_isa_cleanup();
-   goto out;
+   return err;
 }
 
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2 net-next] netfilter: remove 0 assignment on static

2015-01-03 Thread Fabian Frederick
static values are automatically initialized to 0

Signed-off-by: Fabian Frederick 
---
 net/bridge/br_netfilter.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 37e7d9a..26d73fa 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -53,9 +53,9 @@ static struct ctl_table_header *brnf_sysctl_header;
 static int brnf_call_iptables __read_mostly = 1;
 static int brnf_call_ip6tables __read_mostly = 1;
 static int brnf_call_arptables __read_mostly = 1;
-static int brnf_filter_vlan_tagged __read_mostly = 0;
-static int brnf_filter_pppoe_tagged __read_mostly = 0;
-static int brnf_pass_vlan_indev __read_mostly = 0;
+static int brnf_filter_vlan_tagged __read_mostly;
+static int brnf_filter_pppoe_tagged __read_mostly;
+static int brnf_pass_vlan_indev __read_mostly;
 #else
 #define brnf_call_iptables 1
 #define brnf_call_ip6tables 1
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2 net-next] netfilter: remove err1 label only used with CONFIG_SYSCTL

2015-01-03 Thread Fabian Frederick
This patch fixes the following warning:
net/bridge/br_netfilter.c:995:1: warning: label ‘err1’ defined but not used 
[-Wunused-label]

Signed-off-by: Fabian Frederick 
---
 net/bridge/br_netfilter.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index c190d22..37e7d9a 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -987,15 +987,12 @@ static int __init br_netfilter_init(void)
if (brnf_sysctl_header == NULL) {
printk(KERN_WARNING
   "br_netfilter: can't register to sysctl.\n");
-   ret = -ENOMEM;
-   goto err1;
+   nf_unregister_hooks(br_nf_ops, ARRAY_SIZE(br_nf_ops));
+   return -ENOMEM;
}
 #endif
printk(KERN_NOTICE "Bridge firewalling registered\n");
return 0;
-err1:
-   nf_unregister_hooks(br_nf_ops, ARRAY_SIZE(br_nf_ops));
-   return ret;
 }
 
 static void __exit br_netfilter_fini(void)
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] mm,compaction: move suitable_migration_target() under CONFIG_COMPACTION

2015-01-03 Thread Fabian Frederick
suitable_migration_target() is only used by isolate_freepages()
Define it under CONFIG_COMPACTION || CONFIG_CMA is not needed.

Fix the following warning:
mm/compaction.c:311:13: warning: 'suitable_migration_target' defined
but not used [-Wunused-function]

Signed-off-by: Fabian Frederick f...@skynet.be
---
 mm/compaction.c | 44 ++--
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 546e571..38b151c 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -307,28 +307,6 @@ static inline bool compact_should_abort(struct 
compact_control *cc)
return false;
 }
 
-/* Returns true if the page is within a block suitable for migration to */
-static bool suitable_migration_target(struct page *page)
-{
-   /* If the page is a large free page, then disallow migration */
-   if (PageBuddy(page)) {
-   /*
-* We are checking page_order without zone-lock taken. But
-* the only small danger is that we skip a potentially suitable
-* pageblock, so it's not worth to check order for valid range.
-*/
-   if (page_order_unsafe(page) = pageblock_order)
-   return false;
-   }
-
-   /* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */
-   if (migrate_async_suitable(get_pageblock_migratetype(page)))
-   return true;
-
-   /* Otherwise skip the block */
-   return false;
-}
-
 /*
  * Isolate free pages onto a private freelist. If @strict is true, will abort
  * returning 0 on any invalid PFNs or non-free pages inside of the pageblock
@@ -802,6 +780,28 @@ isolate_migratepages_range(struct compact_control *cc, 
unsigned long start_pfn,
 
 #endif /* CONFIG_COMPACTION || CONFIG_CMA */
 #ifdef CONFIG_COMPACTION
+/* Returns true if the page is within a block suitable for migration to */
+static bool suitable_migration_target(struct page *page)
+{
+   /* If the page is a large free page, then disallow migration */
+   if (PageBuddy(page)) {
+   /*
+* We are checking page_order without zone-lock taken. But
+* the only small danger is that we skip a potentially suitable
+* pageblock, so it's not worth to check order for valid range.
+*/
+   if (page_order_unsafe(page) = pageblock_order)
+   return false;
+   }
+
+   /* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */
+   if (migrate_async_suitable(get_pageblock_migratetype(page)))
+   return true;
+
+   /* Otherwise skip the block */
+   return false;
+}
+
 /*
  * Based on information in the current compact_control, find blocks
  * suitable for isolating free pages from and then isolate them.
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] ceph: use %zu for size_t display

2015-01-03 Thread Fabian Frederick
Fixes the following 32-bit compilation warning:
fs/ceph/addr.c:1419:2: warning: format '%lu' expects argument of type
'long unsigned int', but argument 5 has type 'size_t' [-Wformat=]

Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/ceph/addr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index f5013d9..c81c0e0 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -1416,7 +1416,7 @@ void ceph_fill_inline_data(struct inode *inode, struct 
page *locked_page,
}
}
 
-   dout(fill_inline_data %p %llx.%llx len %lu locked_page %p\n,
+   dout(fill_inline_data %p %llx.%llx len %zu locked_page %p\n,
 inode, ceph_vinop(inode), len, locked_page);
 
if (len  0) {
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2 net-next] netfilter: remove err1 label only used with CONFIG_SYSCTL

2015-01-03 Thread Fabian Frederick
This patch fixes the following warning:
net/bridge/br_netfilter.c:995:1: warning: label ‘err1’ defined but not used 
[-Wunused-label]

Signed-off-by: Fabian Frederick f...@skynet.be
---
 net/bridge/br_netfilter.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index c190d22..37e7d9a 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -987,15 +987,12 @@ static int __init br_netfilter_init(void)
if (brnf_sysctl_header == NULL) {
printk(KERN_WARNING
   br_netfilter: can't register to sysctl.\n);
-   ret = -ENOMEM;
-   goto err1;
+   nf_unregister_hooks(br_nf_ops, ARRAY_SIZE(br_nf_ops));
+   return -ENOMEM;
}
 #endif
printk(KERN_NOTICE Bridge firewalling registered\n);
return 0;
-err1:
-   nf_unregister_hooks(br_nf_ops, ARRAY_SIZE(br_nf_ops));
-   return ret;
 }
 
 static void __exit br_netfilter_fini(void)
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2 net-next] netfilter: remove 0 assignment on static

2015-01-03 Thread Fabian Frederick
static values are automatically initialized to 0

Signed-off-by: Fabian Frederick f...@skynet.be
---
 net/bridge/br_netfilter.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 37e7d9a..26d73fa 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -53,9 +53,9 @@ static struct ctl_table_header *brnf_sysctl_header;
 static int brnf_call_iptables __read_mostly = 1;
 static int brnf_call_ip6tables __read_mostly = 1;
 static int brnf_call_arptables __read_mostly = 1;
-static int brnf_filter_vlan_tagged __read_mostly = 0;
-static int brnf_filter_pppoe_tagged __read_mostly = 0;
-static int brnf_pass_vlan_indev __read_mostly = 0;
+static int brnf_filter_vlan_tagged __read_mostly;
+static int brnf_filter_pppoe_tagged __read_mostly;
+static int brnf_pass_vlan_indev __read_mostly;
 #else
 #define brnf_call_iptables 1
 #define brnf_call_ip6tables 1
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] hp100: simplify hp100_module_init

2015-01-03 Thread Fabian Frederick
-Avoid double goto and directly return err where possible.
-Remove unused labels which fixes:

drivers/net/ethernet/hp/hp100.c:3047:2: warning: label
'out3' defined but not used [-Wunused-label]

Signed-off-by: Fabian Frederick f...@skynet.be
---
This is untested.

 drivers/net/ethernet/hp/hp100.c | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c
index ae6e30d..7155938 100644
--- a/drivers/net/ethernet/hp/hp100.c
+++ b/drivers/net/ethernet/hp/hp100.c
@@ -3031,26 +3031,25 @@ static int __init hp100_module_init(void)
 
err = hp100_isa_init();
if (err  err != -ENODEV)
-   goto out;
+   return err;
 #ifdef CONFIG_EISA
err = eisa_driver_register(hp100_eisa_driver);
if (err  err != -ENODEV)
-   goto out2;
+   goto out_eisa;
+   else
+   return err;
 #endif
 #ifdef CONFIG_PCI
err = pci_register_driver(hp100_pci_driver);
-   if (err  err != -ENODEV)
-   goto out3;
+   if (!err || err == -ENODEV)
+   return err;
 #endif
- out:
-   return err;
- out3:
 #ifdef CONFIG_EISA
eisa_driver_unregister (hp100_eisa_driver);
- out2:
+ out_eisa:
 #endif
hp100_isa_cleanup();
-   goto out;
+   return err;
 }
 
 
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/1] fs/ufs/super.c: remove unnecessary casting

2014-12-31 Thread Fabian Frederick


> On 28 December 2014 at 19:21 Al Viro  wrote:
>
>
> On Sun, Dec 28, 2014 at 08:45:44AM -0800, Joe Perches wrote:
> > On Sun, 2014-12-28 at 15:33 +, Al Viro wrote:
> > > On Sun, Dec 28, 2014 at 04:28:29PM +0100, Fabian Frederick wrote:
> > > > Fix the following coccinelle warning:
> > > > fs/ufs/super.c:1418:7-28: WARNING: casting value returned by memory
> > > > allocation function to (struct ufs_inode_info *) is useless.
> > >
> > > ... except that it makes allocations harder to grep for.
> >
> > How does it do that?
>
> search for \ generally gives a lot of interesting information (variables of that type,
> members of anything having that type, sizeof, container_of, explicit casts)
> with relatively little noise.
>
> BTW, that's why I really don't like the stuff like
>       struct foo *p = kmalloc(sizeof(*p), GFP_KERNEL);
> It's bloody hard to spot.
>
> In case of UFS we still catch "sizeof(struct ufs_inode_info)" in
>         ufs_inode_cachep = kmem_cache_create("ufs_inode_cache",
>                                              sizeof(struct ufs_inode_info),
>                                              0, (SLAB_RECLAIM_ACCOUNT|
>                                                 SLAB_MEM_SPREAD),
>                                              init_once);
> which gives the obvious secondary search pattern, so it's not _that_ terrible,
> but in general it's not something to do without thinking - such a cast could
> be placed there exactly to make it stand out on grep.

Thanks a lot for taking the time to explain the problem Al.
I'll be more careful next time.

Regards,
Fabian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/1] fs/ufs/super.c: remove unnecessary casting

2014-12-31 Thread Fabian Frederick


 On 28 December 2014 at 19:21 Al Viro v...@zeniv.linux.org.uk wrote:


 On Sun, Dec 28, 2014 at 08:45:44AM -0800, Joe Perches wrote:
  On Sun, 2014-12-28 at 15:33 +, Al Viro wrote:
   On Sun, Dec 28, 2014 at 04:28:29PM +0100, Fabian Frederick wrote:
Fix the following coccinelle warning:
fs/ufs/super.c:1418:7-28: WARNING: casting value returned by memory
allocation function to (struct ufs_inode_info *) is useless.
  
   ... except that it makes allocations harder to grep for.
 
  How does it do that?

 search for \struct[  ]*$NAME[        ]*($|[^         *]|[*][         ]*[)])
 generally gives a lot of interesting information (variables of that type,
 members of anything having that type, sizeof, container_of, explicit casts)
 with relatively little noise.

 BTW, that's why I really don't like the stuff like
       struct foo *p = kmalloc(sizeof(*p), GFP_KERNEL);
 It's bloody hard to spot.

 In case of UFS we still catch sizeof(struct ufs_inode_info) in
         ufs_inode_cachep = kmem_cache_create(ufs_inode_cache,
                                              sizeof(struct ufs_inode_info),
                                              0, (SLAB_RECLAIM_ACCOUNT|
                                                 SLAB_MEM_SPREAD),
                                              init_once);
 which gives the obvious secondary search pattern, so it's not _that_ terrible,
 but in general it's not something to do without thinking - such a cast could
 be placed there exactly to make it stand out on grep.

Thanks a lot for taking the time to explain the problem Al.
I'll be more careful next time.

Regards,
Fabian
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 09/11 linux-next] [media] uvcvideo: remove unnecessary version.h inclusion

2014-12-30 Thread Fabian Frederick


> On 30 December 2014 at 00:42 Laurent Pinchart
>  wrote:
>
>
> Hi Fabian,
>
> Thank you for the patch.
>
> On Monday 29 December 2014 15:29:43 Fabian Frederick wrote:
> > Based on versioncheck.
> >
> > Signed-off-by: Fabian Frederick 
>
> Acked-by: Laurent Pinchart 
>
> Should I take the patch in my tree or do you plan to send a pull request for
> the whole series elsewhere ?
>
> > ---
> >  drivers/media/usb/uvc/uvc_v4l2.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/media/usb/uvc/uvc_v4l2.c
> > b/drivers/media/usb/uvc/uvc_v4l2.c index 9c5cbcf..43e953f 100644
> > --- a/drivers/media/usb/uvc/uvc_v4l2.c
> > +++ b/drivers/media/usb/uvc/uvc_v4l2.c
> > @@ -13,7 +13,6 @@
> >
> >  #include 
> >  #include 
> > -#include 
> >  #include 
> >  #include 
> >  #include 
>
> --
> Regards,
>
> Laurent Pinchart
>
Hi Laurent,

        Thanks for the ack, you can take the patch.
       
(Maybe Greg will try later to apply the whole patchset on linux-next.
It should not be a problem if some of them are already in.)

Regards,
Fabian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 09/11 linux-next] [media] uvcvideo: remove unnecessary version.h inclusion

2014-12-30 Thread Fabian Frederick


 On 30 December 2014 at 00:42 Laurent Pinchart
 laurent.pinch...@ideasonboard.com wrote:


 Hi Fabian,

 Thank you for the patch.

 On Monday 29 December 2014 15:29:43 Fabian Frederick wrote:
  Based on versioncheck.
 
  Signed-off-by: Fabian Frederick f...@skynet.be

 Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

 Should I take the patch in my tree or do you plan to send a pull request for
 the whole series elsewhere ?

  ---
   drivers/media/usb/uvc/uvc_v4l2.c | 1 -
   1 file changed, 1 deletion(-)
 
  diff --git a/drivers/media/usb/uvc/uvc_v4l2.c
  b/drivers/media/usb/uvc/uvc_v4l2.c index 9c5cbcf..43e953f 100644
  --- a/drivers/media/usb/uvc/uvc_v4l2.c
  +++ b/drivers/media/usb/uvc/uvc_v4l2.c
  @@ -13,7 +13,6 @@
 
   #include linux/compat.h
   #include linux/kernel.h
  -#include linux/version.h
   #include linux/list.h
   #include linux/module.h
   #include linux/slab.h

 --
 Regards,

 Laurent Pinchart

Hi Laurent,

        Thanks for the ack, you can take the patch.
       
(Maybe Greg will try later to apply the whole patchset on linux-next.
It should not be a problem if some of them are already in.)

Regards,
Fabian
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 11/11 linux-next] s390/hmcdrv: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick 
---
 drivers/s390/char/hmcdrv_mod.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/s390/char/hmcdrv_mod.c b/drivers/s390/char/hmcdrv_mod.c
index 505c6a7..251a318 100644
--- a/drivers/s390/char/hmcdrv_mod.c
+++ b/drivers/s390/char/hmcdrv_mod.c
@@ -11,7 +11,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "hmcdrv_ftp.h"
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 10/11 linux-next] GenWQE: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick 
---
 drivers/misc/genwqe/card_base.h  | 1 -
 drivers/misc/genwqe/card_sysfs.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/misc/genwqe/card_base.h b/drivers/misc/genwqe/card_base.h
index c64d7ca..e735344 100644
--- a/drivers/misc/genwqe/card_base.h
+++ b/drivers/misc/genwqe/card_base.h
@@ -34,7 +34,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
diff --git a/drivers/misc/genwqe/card_sysfs.c b/drivers/misc/genwqe/card_sysfs.c
index 2c33fbc..6ab31ef 100644
--- a/drivers/misc/genwqe/card_sysfs.c
+++ b/drivers/misc/genwqe/card_sysfs.c
@@ -24,7 +24,6 @@
  * debugging, please also see the debugfs interfaces of this driver.
  */
 
-#include 
 #include 
 #include 
 #include 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 01/11 linux-next] rsxx: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick 
---
 drivers/block/rsxx/rsxx_priv.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/block/rsxx/rsxx_priv.h b/drivers/block/rsxx/rsxx_priv.h
index 6bbc64d..21adc25 100644
--- a/drivers/block/rsxx/rsxx_priv.h
+++ b/drivers/block/rsxx/rsxx_priv.h
@@ -25,7 +25,6 @@
 #ifndef __RSXX_PRIV_H__
 #define __RSXX_PRIV_H__
 
-#include 
 #include 
 
 #include 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 06/11 linux-next] [media] s5p-g2d: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick 
---
 drivers/media/platform/s5p-g2d/g2d.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/platform/s5p-g2d/g2d.c 
b/drivers/media/platform/s5p-g2d/g2d.c
index 47ba8fb..ec3e124 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -12,7 +12,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 09/11 linux-next] [media] uvcvideo: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick 
---
 drivers/media/usb/uvc/uvc_v4l2.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 9c5cbcf..43e953f 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -13,7 +13,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 03/11 linux-next] ipmi: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick 
---
 drivers/char/ipmi/ipmi_ssif.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index fd5a5e8..120ed8d 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -31,7 +31,6 @@
  * interface into the I2C driver, I believe.
  */
 
-#include 
 #if defined(MODVERSIONS)
 #include 
 #endif
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 08/11 linux-next] [media] vivid: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick 
---
 drivers/media/platform/vivid/vivid-tpg.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/platform/vivid/vivid-tpg.h 
b/drivers/media/platform/vivid/vivid-tpg.h
index 9dc463a4..bd8b1c7 100644
--- a/drivers/media/platform/vivid/vivid-tpg.h
+++ b/drivers/media/platform/vivid/vivid-tpg.h
@@ -20,7 +20,6 @@
 #ifndef _VIVID_TPG_H_
 #define _VIVID_TPG_H_
 
-#include 
 #include 
 #include 
 #include 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 04/11 linux-next] input: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick 
---
 drivers/input/touchscreen/elants_i2c.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/input/touchscreen/elants_i2c.c 
b/drivers/input/touchscreen/elants_i2c.c
index a510f7e..926c58e 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -33,10 +33,8 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 07/11 linux-next] [media] s5p-mfc: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick 
---
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 1 -
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index c6c3452..a9ef843 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -18,7 +18,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index bd64f1d..68df3cd 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -19,7 +19,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 05/11 linux-next] [media] tw68: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick 
---
 drivers/media/pci/tw68/tw68.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/pci/tw68/tw68.h b/drivers/media/pci/tw68/tw68.h
index 7a7501b..93f2335 100644
--- a/drivers/media/pci/tw68/tw68.h
+++ b/drivers/media/pci/tw68/tw68.h
@@ -25,7 +25,6 @@
  *  GNU General Public License for more details.
  */
 
-#include 
 #include 
 #include 
 #include 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 02/11 linux-next] skd: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick 
---
 drivers/block/skd_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 1e46eb2..542353a 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -34,7 +34,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 00/11 linux-next] drivers: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
This small patchset removes unnecessary version.h includes detected by
versioncheck in drivers branch.

Fabian Frederick (11):
  rsxx: remove unnecessary version.h inclusion
  skd: remove unnecessary version.h inclusion
  ipmi: remove unnecessary version.h inclusion
  input: remove unnecessary version.h inclusion
  [media] tw68: remove unnecessary version.h inclusion
  [media] s5p-g2d: remove unnecessary version.h inclusion
  [media] s5p-mfc: remove unnecessary version.h inclusion
  [media] vivid: remove unnecessary version.h inclusion
  [media] uvcvideo: remove unnecessary version.h inclusion
  GenWQE: remove unnecessary version.h inclusion
  s390/hmcdrv: remove unnecessary version.h inclusion

 drivers/block/rsxx/rsxx_priv.h   | 1 -
 drivers/block/skd_main.c | 1 -
 drivers/char/ipmi/ipmi_ssif.c| 1 -
 drivers/input/touchscreen/elants_i2c.c   | 2 --
 drivers/media/pci/tw68/tw68.h| 1 -
 drivers/media/platform/s5p-g2d/g2d.c | 1 -
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 1 -
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 1 -
 drivers/media/platform/vivid/vivid-tpg.h | 1 -
 drivers/media/usb/uvc/uvc_v4l2.c | 1 -
 drivers/misc/genwqe/card_base.h  | 1 -
 drivers/misc/genwqe/card_sysfs.c | 1 -
 drivers/s390/char/hmcdrv_mod.c   | 1 -
 13 files changed, 14 deletions(-)

-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 RESEND] ptrace: remove linux/compat.h inclusion under CONFIG_COMPAT

2014-12-29 Thread Fabian Frederick
Commit 84c751bd4aeb
("ptrace: add ability to retrieve signals without removing from a queue (v4)")
includes  globally in ptrace.c

This patch removes inclusion under if defined CONFIG_COMPAT.

Signed-off-by: Fabian Frederick 
---
 kernel/ptrace.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 1eb9d90..227fec3 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -1077,7 +1077,6 @@ int generic_ptrace_pokedata(struct task_struct *tsk, 
unsigned long addr,
 }
 
 #if defined CONFIG_COMPAT
-#include 
 
 int compat_ptrace_request(struct task_struct *child, compat_long_t request,
  compat_ulong_t addr, compat_ulong_t data)
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 RESEND] ptrace: remove linux/compat.h inclusion under CONFIG_COMPAT

2014-12-29 Thread Fabian Frederick
Commit 84c751bd4aeb
(ptrace: add ability to retrieve signals without removing from a queue (v4))
includes linux/compat.h globally in ptrace.c

This patch removes inclusion under if defined CONFIG_COMPAT.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 kernel/ptrace.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 1eb9d90..227fec3 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -1077,7 +1077,6 @@ int generic_ptrace_pokedata(struct task_struct *tsk, 
unsigned long addr,
 }
 
 #if defined CONFIG_COMPAT
-#include linux/compat.h
 
 int compat_ptrace_request(struct task_struct *child, compat_long_t request,
  compat_ulong_t addr, compat_ulong_t data)
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 00/11 linux-next] drivers: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
This small patchset removes unnecessary version.h includes detected by
versioncheck in drivers branch.

Fabian Frederick (11):
  rsxx: remove unnecessary version.h inclusion
  skd: remove unnecessary version.h inclusion
  ipmi: remove unnecessary version.h inclusion
  input: remove unnecessary version.h inclusion
  [media] tw68: remove unnecessary version.h inclusion
  [media] s5p-g2d: remove unnecessary version.h inclusion
  [media] s5p-mfc: remove unnecessary version.h inclusion
  [media] vivid: remove unnecessary version.h inclusion
  [media] uvcvideo: remove unnecessary version.h inclusion
  GenWQE: remove unnecessary version.h inclusion
  s390/hmcdrv: remove unnecessary version.h inclusion

 drivers/block/rsxx/rsxx_priv.h   | 1 -
 drivers/block/skd_main.c | 1 -
 drivers/char/ipmi/ipmi_ssif.c| 1 -
 drivers/input/touchscreen/elants_i2c.c   | 2 --
 drivers/media/pci/tw68/tw68.h| 1 -
 drivers/media/platform/s5p-g2d/g2d.c | 1 -
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 1 -
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 1 -
 drivers/media/platform/vivid/vivid-tpg.h | 1 -
 drivers/media/usb/uvc/uvc_v4l2.c | 1 -
 drivers/misc/genwqe/card_base.h  | 1 -
 drivers/misc/genwqe/card_sysfs.c | 1 -
 drivers/s390/char/hmcdrv_mod.c   | 1 -
 13 files changed, 14 deletions(-)

-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 02/11 linux-next] skd: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/block/skd_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 1e46eb2..542353a 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -34,7 +34,6 @@
 #include linux/dma-mapping.h
 #include linux/completion.h
 #include linux/scatterlist.h
-#include linux/version.h
 #include linux/err.h
 #include linux/scatterlist.h
 #include linux/aer.h
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 07/11 linux-next] [media] s5p-mfc: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 1 -
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index c6c3452..a9ef843 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -18,7 +18,6 @@
 #include linux/platform_device.h
 #include linux/sched.h
 #include linux/slab.h
-#include linux/version.h
 #include linux/videodev2.h
 #include linux/workqueue.h
 #include media/v4l2-ctrls.h
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index bd64f1d..68df3cd 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -19,7 +19,6 @@
 #include linux/module.h
 #include linux/platform_device.h
 #include linux/sched.h
-#include linux/version.h
 #include linux/videodev2.h
 #include media/v4l2-event.h
 #include linux/workqueue.h
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 05/11 linux-next] [media] tw68: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/media/pci/tw68/tw68.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/pci/tw68/tw68.h b/drivers/media/pci/tw68/tw68.h
index 7a7501b..93f2335 100644
--- a/drivers/media/pci/tw68/tw68.h
+++ b/drivers/media/pci/tw68/tw68.h
@@ -25,7 +25,6 @@
  *  GNU General Public License for more details.
  */
 
-#include linux/version.h
 #include linux/pci.h
 #include linux/videodev2.h
 #include linux/notifier.h
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 03/11 linux-next] ipmi: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/char/ipmi/ipmi_ssif.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index fd5a5e8..120ed8d 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -31,7 +31,6 @@
  * interface into the I2C driver, I believe.
  */
 
-#include linux/version.h
 #if defined(MODVERSIONS)
 #include linux/modversions.h
 #endif
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 08/11 linux-next] [media] vivid: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/media/platform/vivid/vivid-tpg.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/platform/vivid/vivid-tpg.h 
b/drivers/media/platform/vivid/vivid-tpg.h
index 9dc463a4..bd8b1c7 100644
--- a/drivers/media/platform/vivid/vivid-tpg.h
+++ b/drivers/media/platform/vivid/vivid-tpg.h
@@ -20,7 +20,6 @@
 #ifndef _VIVID_TPG_H_
 #define _VIVID_TPG_H_
 
-#include linux/version.h
 #include linux/types.h
 #include linux/errno.h
 #include linux/random.h
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 04/11 linux-next] input: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/input/touchscreen/elants_i2c.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/input/touchscreen/elants_i2c.c 
b/drivers/input/touchscreen/elants_i2c.c
index a510f7e..926c58e 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -33,10 +33,8 @@
 #include linux/delay.h
 #include linux/uaccess.h
 #include linux/buffer_head.h
-#include linux/version.h
 #include linux/slab.h
 #include linux/firmware.h
-#include linux/version.h
 #include linux/input/mt.h
 #include linux/acpi.h
 #include linux/of.h
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 06/11 linux-next] [media] s5p-g2d: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/media/platform/s5p-g2d/g2d.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/platform/s5p-g2d/g2d.c 
b/drivers/media/platform/s5p-g2d/g2d.c
index 47ba8fb..ec3e124 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -12,7 +12,6 @@
 
 #include linux/module.h
 #include linux/fs.h
-#include linux/version.h
 #include linux/timer.h
 #include linux/sched.h
 #include linux/slab.h
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 09/11 linux-next] [media] uvcvideo: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/media/usb/uvc/uvc_v4l2.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 9c5cbcf..43e953f 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -13,7 +13,6 @@
 
 #include linux/compat.h
 #include linux/kernel.h
-#include linux/version.h
 #include linux/list.h
 #include linux/module.h
 #include linux/slab.h
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 10/11 linux-next] GenWQE: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/misc/genwqe/card_base.h  | 1 -
 drivers/misc/genwqe/card_sysfs.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/misc/genwqe/card_base.h b/drivers/misc/genwqe/card_base.h
index c64d7ca..e735344 100644
--- a/drivers/misc/genwqe/card_base.h
+++ b/drivers/misc/genwqe/card_base.h
@@ -34,7 +34,6 @@
 #include linux/semaphore.h
 #include linux/uaccess.h
 #include linux/io.h
-#include linux/version.h
 #include linux/debugfs.h
 #include linux/slab.h
 
diff --git a/drivers/misc/genwqe/card_sysfs.c b/drivers/misc/genwqe/card_sysfs.c
index 2c33fbc..6ab31ef 100644
--- a/drivers/misc/genwqe/card_sysfs.c
+++ b/drivers/misc/genwqe/card_sysfs.c
@@ -24,7 +24,6 @@
  * debugging, please also see the debugfs interfaces of this driver.
  */
 
-#include linux/version.h
 #include linux/kernel.h
 #include linux/types.h
 #include linux/module.h
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 01/11 linux-next] rsxx: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/block/rsxx/rsxx_priv.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/block/rsxx/rsxx_priv.h b/drivers/block/rsxx/rsxx_priv.h
index 6bbc64d..21adc25 100644
--- a/drivers/block/rsxx/rsxx_priv.h
+++ b/drivers/block/rsxx/rsxx_priv.h
@@ -25,7 +25,6 @@
 #ifndef __RSXX_PRIV_H__
 #define __RSXX_PRIV_H__
 
-#include linux/version.h
 #include linux/semaphore.h
 
 #include linux/fs.h
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 11/11 linux-next] s390/hmcdrv: remove unnecessary version.h inclusion

2014-12-29 Thread Fabian Frederick
Based on versioncheck.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/s390/char/hmcdrv_mod.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/s390/char/hmcdrv_mod.c b/drivers/s390/char/hmcdrv_mod.c
index 505c6a7..251a318 100644
--- a/drivers/s390/char/hmcdrv_mod.c
+++ b/drivers/s390/char/hmcdrv_mod.c
@@ -11,7 +11,6 @@
 #include linux/kernel.h
 #include linux/module.h
 #include linux/moduleparam.h
-#include linux/version.h
 #include linux/stat.h
 
 #include hmcdrv_ftp.h
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 linux-next] fs/ufs/super.c: remove unnecessary casting

2014-12-28 Thread Fabian Frederick
Fix the following coccinelle warning:
fs/ufs/super.c:1418:7-28: WARNING: casting value returned by memory
allocation function to (struct ufs_inode_info *) is useless.

Cc: Evgeniy Dushistov 
Cc: Andrew Morton 
Cc: Joe Perches 
Signed-off-by: Fabian Frederick 
---
V2: separate declaration from allocation (suggested by Joe Perches)

 fs/ufs/super.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index da73801..e515e99 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -1415,9 +1415,11 @@ static struct kmem_cache * ufs_inode_cachep;
 static struct inode *ufs_alloc_inode(struct super_block *sb)
 {
struct ufs_inode_info *ei;
-   ei = (struct ufs_inode_info *)kmem_cache_alloc(ufs_inode_cachep, 
GFP_NOFS);
+
+   ei = kmem_cache_alloc(ufs_inode_cachep, GFP_NOFS);
if (!ei)
return NULL;
+
ei->vfs_inode.i_version = 1;
return >vfs_inode;
 }
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1] fs/ufs/super.c: remove unnecessary casting

2014-12-28 Thread Fabian Frederick
Fix the following coccinelle warning:
fs/ufs/super.c:1418:7-28: WARNING: casting value returned by memory
allocation function to (struct ufs_inode_info *) is useless.

Cc: Evgeniy Dushistov 
Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/ufs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index da73801..a15798f 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -1414,8 +1414,8 @@ static struct kmem_cache * ufs_inode_cachep;
 
 static struct inode *ufs_alloc_inode(struct super_block *sb)
 {
-   struct ufs_inode_info *ei;
-   ei = (struct ufs_inode_info *)kmem_cache_alloc(ufs_inode_cachep, 
GFP_NOFS);
+   struct ufs_inode_info *ei = kmem_cache_alloc(ufs_inode_cachep,
+GFP_NOFS);
if (!ei)
return NULL;
ei->vfs_inode.i_version = 1;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1] fs/befs/linuxvfs.c: remove unnecessary casting

2014-12-28 Thread Fabian Frederick
Fix the following coccinelle warning:

fs/befs/linuxvfs.c:278:14-36: WARNING: casting value returned by memory
allocation function to (struct befs_inode_info *) is useless.

Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/befs/linuxvfs.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index edf4777..2255f4a 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -274,9 +274,8 @@ more:
 static struct inode *
 befs_alloc_inode(struct super_block *sb)
 {
-struct befs_inode_info *bi;
-bi = (struct befs_inode_info *)kmem_cache_alloc(befs_inode_cachep,
-   GFP_KERNEL);
+   struct befs_inode_info *bi = kmem_cache_alloc(befs_inode_cachep,
+ GFP_KERNEL);
 if (!bi)
 return NULL;
 return >vfs_inode;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] fs/affs/file.c: replace if/BUG by BUG_ON

2014-12-28 Thread Fabian Frederick
Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/affs/file.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/affs/file.c b/fs/affs/file.c
index 8faa659..e1b51e5 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -180,8 +180,7 @@ affs_get_extblock_slow(struct inode *inode, u32 ext)
ext_key = be32_to_cpu(AFFS_TAIL(sb, bh)->extension);
if (ext < AFFS_I(inode)->i_extcnt)
goto read_ext;
-   if (ext > AFFS_I(inode)->i_extcnt)
-   BUG();
+   BUG_ON(ext > AFFS_I(inode)->i_extcnt);
bh = affs_alloc_extblock(inode, bh, ext);
if (IS_ERR(bh))
return bh;
@@ -198,8 +197,7 @@ affs_get_extblock_slow(struct inode *inode, u32 ext)
struct buffer_head *prev_bh;
 
/* allocate a new extended block */
-   if (ext > AFFS_I(inode)->i_extcnt)
-   BUG();
+   BUG_ON(ext > AFFS_I(inode)->i_extcnt);
 
/* get previous extended block */
prev_bh = affs_get_extblock(inode, ext - 1);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] fs/affs/file.c: replace if/BUG by BUG_ON

2014-12-28 Thread Fabian Frederick
Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/affs/file.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/affs/file.c b/fs/affs/file.c
index 8faa659..e1b51e5 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -180,8 +180,7 @@ affs_get_extblock_slow(struct inode *inode, u32 ext)
ext_key = be32_to_cpu(AFFS_TAIL(sb, bh)-extension);
if (ext  AFFS_I(inode)-i_extcnt)
goto read_ext;
-   if (ext  AFFS_I(inode)-i_extcnt)
-   BUG();
+   BUG_ON(ext  AFFS_I(inode)-i_extcnt);
bh = affs_alloc_extblock(inode, bh, ext);
if (IS_ERR(bh))
return bh;
@@ -198,8 +197,7 @@ affs_get_extblock_slow(struct inode *inode, u32 ext)
struct buffer_head *prev_bh;
 
/* allocate a new extended block */
-   if (ext  AFFS_I(inode)-i_extcnt)
-   BUG();
+   BUG_ON(ext  AFFS_I(inode)-i_extcnt);
 
/* get previous extended block */
prev_bh = affs_get_extblock(inode, ext - 1);
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1] fs/befs/linuxvfs.c: remove unnecessary casting

2014-12-28 Thread Fabian Frederick
Fix the following coccinelle warning:

fs/befs/linuxvfs.c:278:14-36: WARNING: casting value returned by memory
allocation function to (struct befs_inode_info *) is useless.

Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/befs/linuxvfs.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index edf4777..2255f4a 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -274,9 +274,8 @@ more:
 static struct inode *
 befs_alloc_inode(struct super_block *sb)
 {
-struct befs_inode_info *bi;
-bi = (struct befs_inode_info *)kmem_cache_alloc(befs_inode_cachep,
-   GFP_KERNEL);
+   struct befs_inode_info *bi = kmem_cache_alloc(befs_inode_cachep,
+ GFP_KERNEL);
 if (!bi)
 return NULL;
 return bi-vfs_inode;
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1] fs/ufs/super.c: remove unnecessary casting

2014-12-28 Thread Fabian Frederick
Fix the following coccinelle warning:
fs/ufs/super.c:1418:7-28: WARNING: casting value returned by memory
allocation function to (struct ufs_inode_info *) is useless.

Cc: Evgeniy Dushistov dushis...@mail.ru
Cc: Andrew Morton a...@linux-foundation.org
Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/ufs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index da73801..a15798f 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -1414,8 +1414,8 @@ static struct kmem_cache * ufs_inode_cachep;
 
 static struct inode *ufs_alloc_inode(struct super_block *sb)
 {
-   struct ufs_inode_info *ei;
-   ei = (struct ufs_inode_info *)kmem_cache_alloc(ufs_inode_cachep, 
GFP_NOFS);
+   struct ufs_inode_info *ei = kmem_cache_alloc(ufs_inode_cachep,
+GFP_NOFS);
if (!ei)
return NULL;
ei-vfs_inode.i_version = 1;
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2 linux-next] fs/ufs/super.c: remove unnecessary casting

2014-12-28 Thread Fabian Frederick
Fix the following coccinelle warning:
fs/ufs/super.c:1418:7-28: WARNING: casting value returned by memory
allocation function to (struct ufs_inode_info *) is useless.

Cc: Evgeniy Dushistov dushis...@mail.ru
Cc: Andrew Morton a...@linux-foundation.org
Cc: Joe Perches j...@perches.com
Signed-off-by: Fabian Frederick f...@skynet.be
---
V2: separate declaration from allocation (suggested by Joe Perches)

 fs/ufs/super.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index da73801..e515e99 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -1415,9 +1415,11 @@ static struct kmem_cache * ufs_inode_cachep;
 static struct inode *ufs_alloc_inode(struct super_block *sb)
 {
struct ufs_inode_info *ei;
-   ei = (struct ufs_inode_info *)kmem_cache_alloc(ufs_inode_cachep, 
GFP_NOFS);
+
+   ei = kmem_cache_alloc(ufs_inode_cachep, GFP_NOFS);
if (!ei)
return NULL;
+
ei-vfs_inode.i_version = 1;
return ei-vfs_inode;
 }
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] fs/coda/dir.c: forward declaration clean-up

2014-12-27 Thread Fabian Frederick
-Move operation structures to avoid forward declarations.
-Fix some checkpatch warnings:

WARNING: Missing a blank line after declarations
+   struct inode *host_inode = file_inode(host_file);
+   mutex_lock(_inode->i_mutex);

ERROR: that open brace { should be on the previous line
+const struct dentry_operations coda_dentry_operations =
+{

ERROR: that open brace { should be on the previous line
+const struct inode_operations coda_dir_inode_operations =
+{

Cc: Jan Harkes 
Cc: Andrew Morton 
Signed-off-by: Fabian Frederick 
---
 fs/coda/dir.c | 138 --
 1 file changed, 56 insertions(+), 82 deletions(-)

diff --git a/fs/coda/dir.c b/fs/coda/dir.c
index 86c8938..281ee01 100644
--- a/fs/coda/dir.c
+++ b/fs/coda/dir.c
@@ -28,29 +28,6 @@
 
 #include "coda_int.h"
 
-/* dir inode-ops */
-static int coda_create(struct inode *dir, struct dentry *new, umode_t mode, 
bool excl);
-static struct dentry *coda_lookup(struct inode *dir, struct dentry *target, 
unsigned int flags);
-static int coda_link(struct dentry *old_dentry, struct inode *dir_inode, 
-struct dentry *entry);
-static int coda_unlink(struct inode *dir_inode, struct dentry *entry);
-static int coda_symlink(struct inode *dir_inode, struct dentry *entry,
-   const char *symname);
-static int coda_mkdir(struct inode *dir_inode, struct dentry *entry, umode_t 
mode);
-static int coda_rmdir(struct inode *dir_inode, struct dentry *entry);
-static int coda_rename(struct inode *old_inode, struct dentry *old_dentry, 
-   struct inode *new_inode, struct dentry *new_dentry);
-
-/* dir file-ops */
-static int coda_readdir(struct file *file, struct dir_context *ctx);
-
-/* dentry ops */
-static int coda_dentry_revalidate(struct dentry *de, unsigned int flags);
-static int coda_dentry_delete(const struct dentry *);
-
-/* support routines */
-static int coda_venus_readdir(struct file *, struct dir_context *);
-
 /* same as fs/bad_inode.c */
 static int coda_return_EIO(void)
 {
@@ -58,38 +35,6 @@ static int coda_return_EIO(void)
 }
 #define CODA_EIO_ERROR ((void *) (coda_return_EIO))
 
-const struct dentry_operations coda_dentry_operations =
-{
-   .d_revalidate   = coda_dentry_revalidate,
-   .d_delete   = coda_dentry_delete,
-};
-
-const struct inode_operations coda_dir_inode_operations =
-{
-   .create = coda_create,
-   .lookup = coda_lookup,
-   .link   = coda_link,
-   .unlink = coda_unlink,
-   .symlink= coda_symlink,
-   .mkdir  = coda_mkdir,
-   .rmdir  = coda_rmdir,
-   .mknod  = CODA_EIO_ERROR,
-   .rename = coda_rename,
-   .permission = coda_permission,
-   .getattr= coda_getattr,
-   .setattr= coda_setattr,
-};
-
-const struct file_operations coda_dir_operations = {
-   .llseek = generic_file_llseek,
-   .read   = generic_read_dir,
-   .iterate= coda_readdir,
-   .open   = coda_open,
-   .release= coda_release,
-   .fsync  = coda_fsync,
-};
-
-
 /* inode operations for directories */
 /* access routines: lookup, readlink, permission */
 static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry, 
unsigned int flags)
@@ -374,33 +319,6 @@ static int coda_rename(struct inode *old_dir, struct 
dentry *old_dentry,
return error;
 }
 
-
-/* file operations for directories */
-static int coda_readdir(struct file *coda_file, struct dir_context *ctx)
-{
-   struct coda_file_info *cfi;
-   struct file *host_file;
-   int ret;
-
-   cfi = CODA_FTOC(coda_file);
-   BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC);
-   host_file = cfi->cfi_container;
-
-   if (host_file->f_op->iterate) {
-   struct inode *host_inode = file_inode(host_file);
-   mutex_lock(_inode->i_mutex);
-   ret = -ENOENT;
-   if (!IS_DEADDIR(host_inode)) {
-   ret = host_file->f_op->iterate(host_file, ctx);
-   file_accessed(host_file);
-   }
-   mutex_unlock(_inode->i_mutex);
-   return ret;
-   }
-   /* Venus: we must read Venus dirents from a file */
-   return coda_venus_readdir(coda_file, ctx);
-}
-
 static inline unsigned int CDT2DT(unsigned char cdt)
 {
unsigned int dt;
@@ -495,6 +413,33 @@ out:
return 0;
 }
 
+/* file operations for directories */
+static int coda_readdir(struct file *coda_file, struct dir_context *ctx)
+{
+   struct coda_file_info *cfi;
+   struct file *host_file;
+   int ret;
+
+   cfi = CODA_FTOC(coda_file);
+   BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC);
+   host_file = cfi->cfi_container;
+
+   if (host_file->f_op->iterate) {
+ 

[PATCH 1/1 linux-next] logfs: kernel-doc warning fix

2014-12-27 Thread Fabian Frederick
logfs_segment_read() receives a page not a buffer.

Signed-off-by: Fabian Frederick 
---
 fs/logfs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/logfs/segment.c b/fs/logfs/segment.c
index 7f9b096..b2dddce 100644
--- a/fs/logfs/segment.c
+++ b/fs/logfs/segment.c
@@ -646,7 +646,7 @@ out_err:
 /**
  * logfs_segment_read - read data block from object store
  * @inode: inode containing data
- * @buf:   data buffer
+ * @page:  destination page cache page
  * @ofs:   physical data offset
  * @bix:   block index
  * @level: block level
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] drm/gma500: replace 0 by NULL for pointer

2014-12-27 Thread Fabian Frederick
Fix sparse warning: 
drivers/gpu/drm/gma500/psb_drv.c:
328:56: warning: Using plain integer as NULL pointer

Signed-off-by: Fabian Frederick 
---
 drivers/gpu/drm/gma500/psb_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 92e7e57..9b49c155 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -325,7 +325,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned 
long flags)
if (ret)
goto out_err;
 
-   dev_priv->mmu = psb_mmu_driver_init(dev, 1, 0, 0);
+   dev_priv->mmu = psb_mmu_driver_init(dev, 1, 0, NULL);
if (!dev_priv->mmu)
goto out_err;
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] drm/nouveau/disp: replace 0x0000 by NULL for pointer

2014-12-27 Thread Fabian Frederick
Fix sparse warning:
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c:
815:32: warning: Using plain integer as NULL pointer

Signed-off-by: Fabian Frederick 
---
 drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c 
b/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
index 181a2d5..e5ba510 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
@@ -812,7 +812,7 @@ exec_lookup(struct nv50_disp_priv *priv, int head, int or, 
u32 ctrl,
case 0x0900: type = DCB_OUTPUT_DP; mask = 2; break;
default:
nv_error(priv, "unknown SOR mc 0x%08x\n", ctrl);
-   return 0x;
+   return NULL;
}
}
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] ext3: destroy sbi mutexes in put_super

2014-12-27 Thread Fabian Frederick
Signed-off-by: Fabian Frederick 
---
This is untested.

 fs/ext3/super.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 9b4e7d7..d4dbf3c 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -466,6 +466,8 @@ static void ext3_put_super (struct super_block * sb)
}
sb->s_fs_info = NULL;
kfree(sbi->s_blockgroup_lock);
+   mutex_destroy(>s_orphan_lock);
+   mutex_destroy(>s_resize_lock);
kfree(sbi);
 }
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] ext3: destroy sbi mutexes in put_super

2014-12-27 Thread Fabian Frederick
Signed-off-by: Fabian Frederick f...@skynet.be
---
This is untested.

 fs/ext3/super.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 9b4e7d7..d4dbf3c 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -466,6 +466,8 @@ static void ext3_put_super (struct super_block * sb)
}
sb-s_fs_info = NULL;
kfree(sbi-s_blockgroup_lock);
+   mutex_destroy(sbi-s_orphan_lock);
+   mutex_destroy(sbi-s_resize_lock);
kfree(sbi);
 }
 
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] drm/nouveau/disp: replace 0x0000 by NULL for pointer

2014-12-27 Thread Fabian Frederick
Fix sparse warning:
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c:
815:32: warning: Using plain integer as NULL pointer

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c 
b/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
index 181a2d5..e5ba510 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
@@ -812,7 +812,7 @@ exec_lookup(struct nv50_disp_priv *priv, int head, int or, 
u32 ctrl,
case 0x0900: type = DCB_OUTPUT_DP; mask = 2; break;
default:
nv_error(priv, unknown SOR mc 0x%08x\n, ctrl);
-   return 0x;
+   return NULL;
}
}
 
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] drm/gma500: replace 0 by NULL for pointer

2014-12-27 Thread Fabian Frederick
Fix sparse warning: 
drivers/gpu/drm/gma500/psb_drv.c:
328:56: warning: Using plain integer as NULL pointer

Signed-off-by: Fabian Frederick f...@skynet.be
---
 drivers/gpu/drm/gma500/psb_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 92e7e57..9b49c155 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -325,7 +325,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned 
long flags)
if (ret)
goto out_err;
 
-   dev_priv-mmu = psb_mmu_driver_init(dev, 1, 0, 0);
+   dev_priv-mmu = psb_mmu_driver_init(dev, 1, 0, NULL);
if (!dev_priv-mmu)
goto out_err;
 
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/1 linux-next] logfs: kernel-doc warning fix

2014-12-27 Thread Fabian Frederick
logfs_segment_read() receives a page not a buffer.

Signed-off-by: Fabian Frederick f...@skynet.be
---
 fs/logfs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/logfs/segment.c b/fs/logfs/segment.c
index 7f9b096..b2dddce 100644
--- a/fs/logfs/segment.c
+++ b/fs/logfs/segment.c
@@ -646,7 +646,7 @@ out_err:
 /**
  * logfs_segment_read - read data block from object store
  * @inode: inode containing data
- * @buf:   data buffer
+ * @page:  destination page cache page
  * @ofs:   physical data offset
  * @bix:   block index
  * @level: block level
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


<    7   8   9   10   11   12   13   14   15   16   >