From patchwork Mon May 11 17:59:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 11541393 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EEDA3186E for ; Mon, 11 May 2020 17:59:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD113206B9 for ; Mon, 11 May 2020 17:59:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729135AbgEKR7v (ORCPT ); Mon, 11 May 2020 13:59:51 -0400 Received: from mailrelay107.isp.belgacom.be ([195.238.20.134]:58343 "EHLO mailrelay107.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727051AbgEKR7v (ORCPT ); Mon, 11 May 2020 13:59:51 -0400 IronPort-SDR: 31ird6Ax8XZ7HyF9kPh/xpx0zjEl95eD76PWytPRtKINJA8whTVyfEQ0S8Af5wIltTm82yh6WL Y0oOrNo7XHwhDIHCnCsaGatBqZMwNhDJQBSCMGay8hR+c+FQgK7ReB/TaYcvWdV8KtovEFSsTM 0OLgW0o+vX5bGCLg3fWlUCbr1YTKqXVaqqcgwsGoQ5qbIRnpnovSbI/8vrpcdibDll6hDjv794 qzV49Jd/pw0Jrz3PlfTZ5j8iUZQoQNRcwirCJAUlNmyHhELcemrltY37PRXZFSWNsZcjxErrvD VMc= X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:HH+IXB+wt25L6P9uRHKM819IXTAuvvDOBiVQ1KB21+IcTK2v8tzYMVDF4r011RmVBNiduqoP0rOM+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZL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BCsT4P1UnkKUtstzopWMA5GENK4g0Wb0g== X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AaBgACkrle/xCltltmglCCKoFkEiyNJYV6jBiKMoUrgXsLAQEBAQEBAQEBNAECBAEBhESCDSc2Bw4CAwEBAQMCBQEBBgEBAQEBAQQEAWwEAQEHCgIBhE4hAQMBAQUKAUOCOyKDQgsBIyNPcBKDJoJYKbBBM4VRg1aBQIE4h12FAYFBP4ERg06KQgSya4JUgnGVKwwdnTotj3CfKwIwgVZNIBiDJFAYDZBJAxeOJ0IwNwIGCAEBAwlXASIBjggBAQ X-IPAS-Result: A2AaBgACkrle/xCltltmglCCKoFkEiyNJYV6jBiKMoUrgXsLAQEBAQEBAQEBNAECBAEBhESCDSc2Bw4CAwEBAQMCBQEBBgEBAQEBAQQEAWwEAQEHCgIBhE4hAQMBAQUKAUOCOyKDQgsBIyNPcBKDJoJYKbBBM4VRg1aBQIE4h12FAYFBP4ERg06KQgSya4JUgnGVKwwdnTotj3CfKwIwgVZNIBiDJFAYDZBJAxeOJ0IwNwIGCAEBAwlXASIBjggBAQ Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO biggussolus.home) ([91.182.165.16]) by relay.skynet.be with ESMTP; 11 May 2020 19:59:49 +0200 From: Fabian Frederick To: jack@suse.cz, amir73il@gmail.com Cc: linux-fsdevel@vger.kernel.org, Fabian Frederick Subject: [PATCH 2/9 linux-next] fanotify: fanotify_encode_fid(): variable init Date: Mon, 11 May 2020 19:59:34 +0200 Message-Id: <20200511175934.214881-1-fabf@skynet.be> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Initialize variables at declaration. Signed-off-by: Fabian Frederick --- 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;