From patchwork Mon Jan 14 20:38:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Malaterre X-Patchwork-Id: 10763407 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0032A91E for ; Mon, 14 Jan 2019 20:39:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E61CE29AFC for ; Mon, 14 Jan 2019 20:39:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA1ED2A332; Mon, 14 Jan 2019 20:39:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A1DA29AFC for ; Mon, 14 Jan 2019 20:39:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726808AbfANUjH (ORCPT ); Mon, 14 Jan 2019 15:39:07 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55866 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726767AbfANUjH (ORCPT ); Mon, 14 Jan 2019 15:39:07 -0500 Received: by mail-wm1-f66.google.com with SMTP id y139so1025456wmc.5; Mon, 14 Jan 2019 12:39:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NM/4viaTmeN4XjhQJCBlN74QYdqy2qWrUzvxYQnrOSI=; b=gakNJDTEu6bIA/xXNRBqrUaeKBoEQq+UZpRUdM2SuUVWpgVId6lgI9U/fpZ/ppCVVi tup0IDQ4rf+7JR69N/omQ1VQGu/eqeu4IAo8/aT83+BDDSbuIPCIntEGYJ4DPwmW0gB0 D7/iey2iWFsHAI32UMKXCi+geYWTDTSj//cAMbD+sGpe/T/BhyNqQXFNR9t896R6Xs8P x/NvEPtCtDbubGTJA8hLy07Nu4wSGCAnGXRuABr+IU8ezUcQuw+tBte9QyhNmGZjpSdR Ela/5/oejT2wCOuEIOU5hb8zI6onu8CDx0J2Vj9kAR+P9sNCbr/O+boqJigukZMACekU ShWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=NM/4viaTmeN4XjhQJCBlN74QYdqy2qWrUzvxYQnrOSI=; b=lmGMgyfojLjZkQjKgJt/CuPZoyvXsfbehVXkAeTbXNfI3YtQVU91VfMPDHzVtJP/K6 xNHg43V3XmoIiZJq58GdCOZja7v4X/tGgdfIeR89HDuSfV/hQaUKGp7WiVPVOtGxPDM9 wrRX7i1S8fu3+62sBW1p8Czcc4OrIyBcIQVEr0Xos5jmgfxmO9158nKZnOlC3kno0aYv nqty5XhnBSQyVyUK6DgUce5PXq7RybQDbf4y3tuSFLOmTQ5dOBXgl+t9R7JnvvRh9euR p3GVDP7pZsia6NDgWdiimfLKVavFc3YljBK8z+cMsx0HwEf8L07LrR6elKjRn1qE8CRw gVMw== X-Gm-Message-State: AJcUukckpCcvGNY5zWcylLaZwM/ddQlkWflhWvwk7FDtknaLdQyzHG6S J5p1u5jhQpypY8blnwkatMM= X-Google-Smtp-Source: ALg8bN7nvN5GYdcmbVVYWszv8RTChdwTD4S3po0oQ1vPYpY+SXZWL72ct56sqRUi7f4ZcTm+CUy8xA== X-Received: by 2002:a7b:c5cc:: with SMTP id n12mr648533wmk.149.1547498345481; Mon, 14 Jan 2019 12:39:05 -0800 (PST) Received: from macbookpro.malat.net (bru31-1-78-225-224-134.fbx.proxad.net. [78.225.224.134]) by smtp.gmail.com with ESMTPSA id s1sm106867403wro.9.2019.01.14.12.39.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 12:39:04 -0800 (PST) Received: by macbookpro.malat.net (Postfix, from userid 1000) id DFE2811422AD; Mon, 14 Jan 2019 21:39:03 +0100 (CET) From: Mathieu Malaterre To: Alexander Viro Cc: Mathieu Malaterre , Jeff Layton , "J. Bruce Fields" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] fs: annotate implicit fall throughs Date: Mon, 14 Jan 2019 21:38:56 +0100 Message-Id: <20190114203859.19875-1-malat@debian.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is a plan to build the kernel with -Wimplicit-fallthrough and these places in the code produced warnings (W=1). Fix them up. This commit remove the following warnings: fs/libfs.c:148:11: warning: this statement may fall through [-Wimplicit-fallthrough=] fs/libfs.c:150:7: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Mathieu Malaterre --- fs/libfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/libfs.c b/fs/libfs.c index 0fb590d79f30..9efb647917e0 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -146,9 +146,11 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence) switch (whence) { case 1: offset += file->f_pos; + /* fall through */ case 0: if (offset >= 0) break; + /* fall through */ default: return -EINVAL; } From patchwork Mon Jan 14 20:38:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Malaterre X-Patchwork-Id: 10763405 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A334391E for ; Mon, 14 Jan 2019 20:39:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9465F29AFC for ; Mon, 14 Jan 2019 20:39:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9283129AFE; Mon, 14 Jan 2019 20:39:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 587D72A305 for ; Mon, 14 Jan 2019 20:39:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727013AbfANUjJ (ORCPT ); Mon, 14 Jan 2019 15:39:09 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:44083 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726776AbfANUjI (ORCPT ); Mon, 14 Jan 2019 15:39:08 -0500 Received: by mail-wr1-f68.google.com with SMTP id z5so409872wrt.11; Mon, 14 Jan 2019 12:39:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vskZecaLZ3Ce4nmVjqV884dirkDxuHp6UAD0akN6aAI=; b=f5tYkQYFRUOTV8pl/0id4s9HyzXzddWso5ICwSVIcotgtoSsmE+ZlUYhJVtaEY7xoS 4wetRt6Yhprx+EDRfP7jtyARork8O9MV8y7xsAXd/8OWbgvpfhLthQfsqtDm89nmJePR foDBzZHCuvhQMjq8CbfIZjpMvlQnnPZV2bE0+ubirHWzSMhv/JWmPPs8yH8Qqm/GPCIp /gdyL36HFVgZpsklvzEmASUeTVRUJqiNh3rDbKQoWKIcw5UvC0PwBUuCFOzkDnpxWKvv 0P08Wfwb9FsDbqNb7ui2FSQxB83f323RBTBbeCT4wlXSDrNeNM2eKdAz+OUxA/aqeSwf CTcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=vskZecaLZ3Ce4nmVjqV884dirkDxuHp6UAD0akN6aAI=; b=eWrvVdFGR216v8jSeWw4z414tTSqR82+hgPcSQbnqethXNsMFh+oNQbreSJTAqSNEu 1GkqcnXwIUwfv6d/V5gg35ew4VBQXbCDhN9gDX4X/IMBT1hlMxcLlnVkvjao9IAI5y0W Qd0gBPjOyDeRBSYQi+7dytMrAmdVmKQO8vWVQ8cjQP84XubFUQBuFulB2r/zZpxDAEms jAeVgDVr88rP0iBk8zCmymdunVwpeSM251skWcHmDAPrvpWQ7rnWHZTtaYR4BXxv3VdY RDQhaP90H8Tc/1jT5nNAIacdWQFX9M5PCNdF+JMb4dmpt/YsllAH8AgY16Aygn2jbje2 WifA== X-Gm-Message-State: AJcUukdyPhlsY8928WMJ5epTj0QZjEE55X9Km6ALa+MrdXndjERzPycl hZ3Af8nU9/gd4JsPjur+to4= X-Google-Smtp-Source: ALg8bN4QiSy3xc6IISod1GH1WRrv3E3Sjt6eBisxCh0vI8HAzOj3JdMEU1GPLJajgUMkVhaOC91+NA== X-Received: by 2002:adf:fb0d:: with SMTP id c13mr212961wrr.285.1547498346714; Mon, 14 Jan 2019 12:39:06 -0800 (PST) Received: from macbookpro.malat.net (bru31-1-78-225-224-134.fbx.proxad.net. [78.225.224.134]) by smtp.gmail.com with ESMTPSA id 207sm15595578wmb.12.2019.01.14.12.39.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 12:39:06 -0800 (PST) Received: by macbookpro.malat.net (Postfix, from userid 1000) id 0B30011422D0; Mon, 14 Jan 2019 21:39:05 +0100 (CET) From: Mathieu Malaterre To: Alexander Viro Cc: Mathieu Malaterre , Jeff Layton , "J. Bruce Fields" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] fs: annotate implicit fall through Date: Mon, 14 Jan 2019 21:38:57 +0100 Message-Id: <20190114203859.19875-2-malat@debian.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190114203859.19875-1-malat@debian.org> References: <20190114203859.19875-1-malat@debian.org> MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warning (W=1). In this particular case remove a ‘:’ so as to match the regular expression expected by GCC. This commit remove the following warning: fs/locks.c:1473:16: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Mathieu Malaterre --- fs/locks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/locks.c b/fs/locks.c index ff6af2c32601..d958c3863b4b 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1471,7 +1471,7 @@ static void lease_clear_pending(struct file_lock *fl, int arg) switch (arg) { case F_UNLCK: fl->fl_flags &= ~FL_UNLOCK_PENDING; - /* fall through: */ + /* fall through */ case F_RDLCK: fl->fl_flags &= ~FL_DOWNGRADE_PENDING; } From patchwork Mon Jan 14 20:38:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Malaterre X-Patchwork-Id: 10763403 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 02B01746 for ; Mon, 14 Jan 2019 20:39:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E94762A32C for ; Mon, 14 Jan 2019 20:39:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E79282870F; Mon, 14 Jan 2019 20:39:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98C682A32C for ; Mon, 14 Jan 2019 20:39:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727131AbfANUjM (ORCPT ); Mon, 14 Jan 2019 15:39:12 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44084 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726767AbfANUjK (ORCPT ); Mon, 14 Jan 2019 15:39:10 -0500 Received: by mail-wr1-f67.google.com with SMTP id z5so409924wrt.11; Mon, 14 Jan 2019 12:39:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7OB8l1HfewCN1zRGPnCcAWYhfDZSLytYFckK0OsM5qo=; b=FilRKiE9Zd0zSrjWFWt8vqwpFgSmF9QfZrf5UHUSw+qb4PEd4ds3aTvtQ/A65vuXRn JNzf6rbbFTs83IsS2lT+kZsNMcX4uWoWQsvQM69DRymJoz6UE21VnN4pS+Hngdu7L47F DJDkvSQbU6MYOlvSU5ws4PfW0DlK/nREc5pDe0cbPQcBSU8o98die3BLDh23hVKbNhkO hnQYGRhDPpPmddgECujATYxwb4CihDMQN3mAmQT1wx8SM0P7g6wEVug4byGRyYu4O4lO pe65znHquHn7lqRNHGWlH5xw/TL0Lhf2jwItkCYMpMhRN6D7MjwXF/ITUFFLB558t+u4 S19g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7OB8l1HfewCN1zRGPnCcAWYhfDZSLytYFckK0OsM5qo=; b=A1f8p/wS9kqQ0weLdvNTY852gH6veVpBRZJqPH26T8vsNZs0EMwcDg/CQzloEobtvA kMJPjkwEg0gJwZTa5887+CI6O54xaf+OJTbgdr0h4c+PmGc/wOCGxVgOVN/gS+i4FebG D5sN1eDLrMrWObTCEC9vnfPzPffDaUQrG0opORwg/n/EU/QLH0W5b4aLy7bpaMpznUfs +EYy2iYQ7l3wIusVGy+4UIhF6ZtkYN8qLKJaELu5if2ihFf4iylb9aYPjt1lNltvtUJP x2iqzYxpkHABu+ldTDfT+LtrbmErF4iZC2tuiQ7EWjU0gO/jGHOPGqlS+vDxlX6dMICu hpGQ== X-Gm-Message-State: AJcUukdrIRopkqQE47Phvcqpl7vQxHM0C0AEB25ItdruvtuZ89XYDXQN R2kIrsUsLymbrp8IGPnu7KQ= X-Google-Smtp-Source: ALg8bN4hHr+Qv5rWGyplun6OuMg4qWO0fzlMGO4MdU2mxbsilIhdxt/txLwa3GCRu96zIfDwNA2GAQ== X-Received: by 2002:adf:9f10:: with SMTP id l16mr233373wrf.206.1547498348124; Mon, 14 Jan 2019 12:39:08 -0800 (PST) Received: from macbookpro.malat.net (bru31-1-78-225-224-134.fbx.proxad.net. [78.225.224.134]) by smtp.gmail.com with ESMTPSA id i186sm33660913wmd.19.2019.01.14.12.39.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 12:39:07 -0800 (PST) Received: by macbookpro.malat.net (Postfix, from userid 1000) id F3B5111422AD; Mon, 14 Jan 2019 21:39:05 +0100 (CET) From: Mathieu Malaterre To: Alexander Viro Cc: Mathieu Malaterre , Jeff Layton , "J. Bruce Fields" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] fs/fcntl: annotate implicit fall through Date: Mon, 14 Jan 2019 21:38:58 +0100 Message-Id: <20190114203859.19875-3-malat@debian.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190114203859.19875-1-malat@debian.org> References: <20190114203859.19875-1-malat@debian.org> MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warning (W=1). In this particular case change a ‘:’ with a ‘-’ so as to match the regular expression expected by GCC. This commit remove the following warning: fs/fcntl.c:770:7: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Mathieu Malaterre --- fs/fcntl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fcntl.c b/fs/fcntl.c index 083185174c6d..3d40771e8e7c 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -769,7 +769,7 @@ static void send_sigio_to_task(struct task_struct *p, si.si_fd = fd; if (!do_send_sig_info(signum, &si, p, type)) break; - /* fall-through: fall back on the old plain SIGIO signal */ + /* fall-through - fall back on the old plain SIGIO signal */ case 0: do_send_sig_info(SIGIO, SEND_SIG_PRIV, p, type); }