* [PATCH] Btrfs: fix some basic sparse errors
@ 2013-08-19 18:21 Josef Bacik
2013-08-19 18:47 ` Stefan Behrens
0 siblings, 1 reply; 3+ messages in thread
From: Josef Bacik @ 2013-08-19 18:21 UTC (permalink / raw)
To: linux-btrfs
Running sparse I found a few small things where we should have static functions
that aren't used externally and we should be using unsigned values for bit
fields. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
---
fs/btrfs/disk-io.c | 8 ++++----
fs/btrfs/send.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 3b12c26..f51cd95 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1432,8 +1432,8 @@ int btrfs_add_log_tree(struct btrfs_trans_handle *trans,
return 0;
}
-struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root,
- struct btrfs_key *key)
+static struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root,
+ struct btrfs_key *key)
{
struct btrfs_root *root;
struct btrfs_fs_info *fs_info = tree_root->fs_info;
@@ -1533,8 +1533,8 @@ fail:
return ret;
}
-struct btrfs_root *btrfs_lookup_fs_root(struct btrfs_fs_info *fs_info,
- u64 root_id)
+static struct btrfs_root *btrfs_lookup_fs_root(struct btrfs_fs_info *fs_info,
+ u64 root_id)
{
struct btrfs_root *root;
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index fc03a57..db7da68 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -54,8 +54,8 @@ struct fs_path {
char *buf;
int buf_len;
- int reversed:1;
- int virtual_mem:1;
+ unsigned int reversed:1;
+ unsigned int virtual_mem:1;
char inline_buf[];
};
char pad[PAGE_SIZE];
--
1.7.7.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Btrfs: fix some basic sparse errors
2013-08-19 18:21 [PATCH] Btrfs: fix some basic sparse errors Josef Bacik
@ 2013-08-19 18:47 ` Stefan Behrens
2013-08-19 19:16 ` Josef Bacik
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Behrens @ 2013-08-19 18:47 UTC (permalink / raw)
To: Josef Bacik; +Cc: linux-btrfs
On 08/19/2013 20:21, Josef Bacik wrote:
> Running sparse I found a few small things where we should have static functions
> that aren't used externally and we should be using unsigned values for bit
> fields. Thanks,
>
> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
> ---
> fs/btrfs/disk-io.c | 8 ++++----
> fs/btrfs/send.c | 4 ++--
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 3b12c26..f51cd95 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -1432,8 +1432,8 @@ int btrfs_add_log_tree(struct btrfs_trans_handle *trans,
> return 0;
> }
>
> -struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root,
> - struct btrfs_key *key)
> +static struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root,
> + struct btrfs_key *key)
> {
> struct btrfs_root *root;
> struct btrfs_fs_info *fs_info = tree_root->fs_info;
> @@ -1533,8 +1533,8 @@ fail:
> return ret;
> }
Already posted in "[PATCH] Btrfs: get rid of sparse warnings" on
14.Aug.2013.
> -struct btrfs_root *btrfs_lookup_fs_root(struct btrfs_fs_info *fs_info,
> - u64 root_id)
> +static struct btrfs_root *btrfs_lookup_fs_root(struct btrfs_fs_info *fs_info,
> + u64 root_id)
> {
> struct btrfs_root *root;
>
Already posted in "[PATCH 1/7] btrfs: cleanup: mark
'btrfs_lookup_fs_root' as static" on 7.Aug.2013.
> diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
> index fc03a57..db7da68 100644
> --- a/fs/btrfs/send.c
> +++ b/fs/btrfs/send.c
> @@ -54,8 +54,8 @@ struct fs_path {
>
> char *buf;
> int buf_len;
> - int reversed:1;
> - int virtual_mem:1;
> + unsigned int reversed:1;
> + unsigned int virtual_mem:1;
> char inline_buf[];
> };
> char pad[PAGE_SIZE];
Already posted in "[PATCH] Btrfs: get rid of sparse warnings" on
14.Aug.2013.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Btrfs: fix some basic sparse errors
2013-08-19 18:47 ` Stefan Behrens
@ 2013-08-19 19:16 ` Josef Bacik
0 siblings, 0 replies; 3+ messages in thread
From: Josef Bacik @ 2013-08-19 19:16 UTC (permalink / raw)
To: Stefan Behrens; +Cc: Josef Bacik, linux-btrfs
On Mon, Aug 19, 2013 at 08:47:21PM +0200, Stefan Behrens wrote:
> On 08/19/2013 20:21, Josef Bacik wrote:
> >Running sparse I found a few small things where we should have static functions
> >that aren't used externally and we should be using unsigned values for bit
> >fields. Thanks,
> >
> >Signed-off-by: Josef Bacik <jbacik@fusionio.com>
> >---
> > fs/btrfs/disk-io.c | 8 ++++----
> > fs/btrfs/send.c | 4 ++--
> > 2 files changed, 6 insertions(+), 6 deletions(-)
> >
> >diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> >index 3b12c26..f51cd95 100644
> >--- a/fs/btrfs/disk-io.c
> >+++ b/fs/btrfs/disk-io.c
> >@@ -1432,8 +1432,8 @@ int btrfs_add_log_tree(struct btrfs_trans_handle *trans,
> > return 0;
> > }
> >
> >-struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root,
> >- struct btrfs_key *key)
> >+static struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root,
> >+ struct btrfs_key *key)
> > {
> > struct btrfs_root *root;
> > struct btrfs_fs_info *fs_info = tree_root->fs_info;
> >@@ -1533,8 +1533,8 @@ fail:
> > return ret;
> > }
>
> Already posted in "[PATCH] Btrfs: get rid of sparse warnings" on
> 14.Aug.2013.
>
> >-struct btrfs_root *btrfs_lookup_fs_root(struct btrfs_fs_info *fs_info,
> >- u64 root_id)
> >+static struct btrfs_root *btrfs_lookup_fs_root(struct btrfs_fs_info *fs_info,
> >+ u64 root_id)
> > {
> > struct btrfs_root *root;
> >
>
> Already posted in "[PATCH 1/7] btrfs: cleanup: mark 'btrfs_lookup_fs_root'
> as static" on 7.Aug.2013.
>
>
> >diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
> >index fc03a57..db7da68 100644
> >--- a/fs/btrfs/send.c
> >+++ b/fs/btrfs/send.c
> >@@ -54,8 +54,8 @@ struct fs_path {
> >
> > char *buf;
> > int buf_len;
> >- int reversed:1;
> >- int virtual_mem:1;
> >+ unsigned int reversed:1;
> >+ unsigned int virtual_mem:1;
> > char inline_buf[];
> > };
> > char pad[PAGE_SIZE];
>
> Already posted in "[PATCH] Btrfs: get rid of sparse warnings" on
> 14.Aug.2013.
>
/me shakes his fist at patchwork.
Josef
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-19 19:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-19 18:21 [PATCH] Btrfs: fix some basic sparse errors Josef Bacik
2013-08-19 18:47 ` Stefan Behrens
2013-08-19 19:16 ` Josef Bacik
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.