On Mon, May 11, 2020 at 8:59 PM Fabian Frederick <fabf@xxxxxxxxx> wrote: > > Initialize variables at declaration. > > Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx> Hi Fabian, Thank you for the patch. It is not wrong, but it does not bring that much benefit either IMO. It does however come with a cost, because it going to have a minor conflict with one of the patches I posted. This is why patches should be done for a good reason. Thanks, Amir. > --- > fs/notify/fanotify/fanotify.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c > index 95480d3dcff7..5c6f29d2d8f9 100644 > --- a/fs/notify/fanotify/fanotify.c > +++ b/fs/notify/fanotify/fanotify.c > @@ -277,16 +277,15 @@ static u32 fanotify_group_event_mask(struct fsnotify_group *group, > static void fanotify_encode_fh(struct fanotify_fh *fh, struct inode *inode, > gfp_t gfp) > { > - int dwords, type, bytes = 0; > + int dwords = 0, bytes = 0; > + int err = -ENOENT; > + int type; > char *ext_buf = NULL; > void *buf = fh->buf; > - int err; > > if (!inode) > goto out; > > - dwords = 0; > - err = -ENOENT; > type = exportfs_encode_inode_fh(inode, NULL, &dwords, NULL); > if (!dwords) > goto out_err; > -- > 2.26.2 >