From: Dan Carpenter <dan.carpenter@oracle.com>
To: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: David Airlie <airlied@linux.ie>,
kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH] drm/gma500: simplify a condition in psbfb_mmap()
Date: Fri, 23 Mar 2018 11:44:29 +0000 [thread overview]
Message-ID: <20180323114429.GE28518@mwanda> (raw)
Since we enforce that "vma->vm_pgoff" has to be zero it means we don't
need an additional cap on the upper bound.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index cb0a2ae916e0..a6732bffb2e2 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -166,9 +166,7 @@ static int psbfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
struct psb_fbdev *fbdev = info->par;
struct psb_framebuffer *psbfb = &fbdev->pfb;
- if (vma->vm_pgoff != 0)
- return -EINVAL;
- if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))
+ if (vma->vm_pgoff)
return -EINVAL;
if (!psbfb->addr_space)
reply other threads:[~2018-03-23 11:44 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=20180323114429.GE28518@mwanda \
--to=dan.carpenter@oracle.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=patrik.r.jakobsson@gmail.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