From patchwork Mon Feb 11 13:43:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanley Chu X-Patchwork-Id: 10805871 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 BD602746 for ; Mon, 11 Feb 2019 13:43:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAFA82A58B for ; Mon, 11 Feb 2019 13:43:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F0592A596; Mon, 11 Feb 2019 13:43:34 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5A7E52A58B for ; Mon, 11 Feb 2019 13:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hTK1wvKO8Ud+f+TYAlzueFD4Sg11C/vF/pQx10rx1uU=; b=PBzVzS41Sv+xR9 8yMbZ2VA2NvQolAcT1JoLzJhjcoKNoQRoCQwIsnQuIqiAdAXAi4km+2UJaaqllPSS6j1ZHidmz1cH 2DE+XOgcU65YkqnGE91PRRez+pQxe/slNYwk+Yl1EN1XLtrUiy3zjqmTKbaHqvBUG3RiBkDEjH3th WU3KqABCGe52iLHDQVJNYF5UkkB/JsCi8AgfZISDvXnPfF686DvGcl/xgW+9XzmM4aKGJIrmUwXBR Y5x6UU093icNge8Vtssj5FvyXL6YC/MhufrDD4p+QpBcStBRP5dBBQKdYI9sm+Ph6iQA0U+deKK88 Dl4Ref+4xceUKo+onDsA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtBrx-0005jb-T5; Mon, 11 Feb 2019 13:43:33 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtBrv-0005j8-4I for linux-mediatek@lists.infradead.org; Mon, 11 Feb 2019 13:43:32 +0000 X-UUID: c63a62c3b3344a29b819c2f96f0405a1-20190211 X-UUID: c63a62c3b3344a29b819c2f96f0405a1-20190211 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 415701101; Mon, 11 Feb 2019 05:43:27 -0800 Received: from MTKMBS02N1.mediatek.inc (172.21.101.77) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 11 Feb 2019 05:43:25 -0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 11 Feb 2019 21:43:17 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 11 Feb 2019 21:43:17 +0800 From: Stanley Chu To: , Subject: [PATCH v1] fcntl: Remove logically dead code Date: Mon, 11 Feb 2019 21:43:13 +0800 Message-ID: <1549892593-10619-1-git-send-email-stanley.chu@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190211_054331_170406_0B7DF795 X-CRM114-Status: UNSURE ( 7.47 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: wsd_upstream@mediatek.com, kuohong.wang@mediatek.com, jlayton@kernel.org, bfields@fieldses.org, linux-mediatek@lists.infradead.org, Stanley Chu Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The commit d08477aa975e ("fcntl: Don't use ambiguous SIG_POLL si_codes") added BUG_ON for below case, (reason - POLL_IN) >= NSIGPOLL Thus some statements become logically dead code and can be removed. Signed-off-by: Stanley Chu --- fs/fcntl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/fcntl.c b/fs/fcntl.c index 083185174c6d..11ec59bf421c 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -762,10 +762,7 @@ static void send_sigio_to_task(struct task_struct *p, reasons, otherwise we could leak kernel stack into userspace. */ BUG_ON((reason < POLL_IN) || ((reason - POLL_IN) >= NSIGPOLL)); - if (reason - POLL_IN >= NSIGPOLL) - si.si_band = ~0L; - else - si.si_band = mangle_poll(band_table[reason - POLL_IN]); + si.si_band = mangle_poll(band_table[reason - POLL_IN]); si.si_fd = fd; if (!do_send_sig_info(signum, &si, p, type)) break;