From patchwork Mon Nov 27 20:40:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10078025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E9CAE602BC for ; Mon, 27 Nov 2017 20:41:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DEAA829042 for ; Mon, 27 Nov 2017 20:41:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D32BB29044; Mon, 27 Nov 2017 20:41:00 +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=-6.9 required=2.0 tests=BAYES_00,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 31ABF29042 for ; Mon, 27 Nov 2017 20:41:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752750AbdK0Uk7 (ORCPT ); Mon, 27 Nov 2017 15:40:59 -0500 Received: from xavier.telenet-ops.be ([195.130.132.52]:41060 "EHLO xavier.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752587AbdK0Uk6 (ORCPT ); Mon, 27 Nov 2017 15:40:58 -0500 Received: from ayla.of.borg ([84.195.106.246]) by xavier.telenet-ops.be with bizsmtp id f8gw1w00g5JzmfG018gwHd; Mon, 27 Nov 2017 21:40:57 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1eJQD2-000525-OQ; Mon, 27 Nov 2017 21:40:56 +0100 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1eJQD2-0004k4-H6; Mon, 27 Nov 2017 21:40:56 +0100 From: Geert Uytterhoeven To: Jens Axboe , Christoph Hellwig Cc: Arnd Bergmann , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] block: Add default switch case to blk_pm_allow_request() to kill warning Date: Mon, 27 Nov 2017 21:40:54 +0100 Message-Id: <1511815254-18166-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With gcc 4.9.0: block/blk-core.c: In function 'blk_pm_allow_request': block/blk-core.c:2607:2: warning: enumeration value 'RPM_ACTIVE' not handled in switch [-Wswitch] switch (rq->q->rpm_status) { ^ Convert the return statement below the switch() block into a default case to fix this. Fixes: e4f36b249b4d4e75 ("block: fix peeking requests during PM") Signed-off-by: Geert Uytterhoeven Reviewed-by: Christoph Hellwig --- block/blk-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index b8881750a3acd705..579e683c95e26049 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2610,9 +2610,9 @@ static bool blk_pm_allow_request(struct request *rq) return rq->rq_flags & RQF_PM; case RPM_SUSPENDED: return false; + default: + return true; } - - return true; } #else static bool blk_pm_allow_request(struct request *rq)