Skip to content

Commit

Permalink
fsnotify: remove pointless NULL initializers
Browse files Browse the repository at this point in the history
We usually rely on the fact that struct members not specified in the
initializer are set to NULL.  So do that with fsnotify function pointers
as well.

Signed-off-by: Jan Kara <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Cc: Eric Paris <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
jankara authored and torvalds committed Jan 22, 2014
1 parent 83c4c4b commit 56b27cf
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions fs/notify/dnotify/dnotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ static void dnotify_free_mark(struct fsnotify_mark *fsn_mark)

static struct fsnotify_ops dnotify_fsnotify_ops = {
.handle_event = dnotify_handle_event,
.free_group_priv = NULL,
.freeing_mark = NULL,
.free_event = NULL,
};

/*
Expand Down
1 change: 0 additions & 1 deletion fs/notify/fanotify/fanotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,5 +230,4 @@ const struct fsnotify_ops fanotify_fsnotify_ops = {
.handle_event = fanotify_handle_event,
.free_group_priv = fanotify_free_group_priv,
.free_event = fanotify_free_event,
.freeing_mark = NULL,
};
2 changes: 0 additions & 2 deletions kernel/audit_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,8 +936,6 @@ static void audit_tree_freeing_mark(struct fsnotify_mark *entry, struct fsnotify

static const struct fsnotify_ops audit_tree_ops = {
.handle_event = audit_tree_handle_event,
.free_group_priv = NULL,
.free_event = NULL,
.freeing_mark = audit_tree_freeing_mark,
};

Expand Down
3 changes: 0 additions & 3 deletions kernel/audit_watch.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,6 @@ static int audit_watch_handle_event(struct fsnotify_group *group,

static const struct fsnotify_ops audit_watch_fsnotify_ops = {
.handle_event = audit_watch_handle_event,
.free_group_priv = NULL,
.freeing_mark = NULL,
.free_event = NULL,
};

static int __init audit_watch_init(void)
Expand Down

0 comments on commit 56b27cf

Please sign in to comment.