linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / 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	[thread overview]
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	other threads:[~2019-02-11 13:43 UTC|newest]

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

Reply instructions:

You may reply publicly 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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).