Linux-Fsdevel Archive on lore.kernel.org
 help / Atom feed
From: Stanley Chu <stanley.chu@mediatek.com>
To: <linux-fsdevel@vger.kernel.org>, <viro@zeniv.linux.org.uk>
Cc: <jlayton@kernel.org>, <bfields@fieldses.org>,
	<wsd_upstream@mediatek.com>, <linux-mediatek@lists.infradead.org>,
	<kuohong.wang@mediatek.com>,
	Stanley Chu <stanley.chu@mediatek.com>
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> (raw)

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 <stanley.chu@mediatek.com>
---
 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;
-- 
2.18.0


                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1549892593-10619-1-git-send-email-stanley.chu@mediatek.com \
    --to=stanley.chu@mediatek.com \
    --cc=bfields@fieldses.org \
    --cc=jlayton@kernel.org \
    --cc=kuohong.wang@mediatek.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wsd_upstream@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Fsdevel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-fsdevel/0 linux-fsdevel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-fsdevel linux-fsdevel/ https://lore.kernel.org/linux-fsdevel \
		linux-fsdevel@vger.kernel.org linux-fsdevel@archiver.kernel.org
	public-inbox-index linux-fsdevel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-fsdevel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox