+ signedness-issue-in-drivers-video-intelfb-intelfbdrvc.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     Signedness issue in drivers/video/intelfb/intelfbdrv.c

has been added to the -mm tree.  Its filename is

     signedness-issue-in-drivers-video-intelfb-intelfbdrvc.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: Signedness issue in drivers/video/intelfb/intelfbdrv.c
From: Eric Sesterhenn <snakebyte@xxxxxx>

another gcc 4.1 signess warning:

drivers/video/intelfb/intelfbdrv.c:419: warning: comparison of unsigned expression < 0 is always false

since dinfo->mtrr_reg is of the type u32, the error check dinfo->mtrr_reg <
0 is useless.  This patch introduces a helper variable, which catches
possible negative error values returned by mtrr_add()

Signed-off-by: Eric Sesterhenn <snakebyte@xxxxxx>
Cc: Dave Airlie <airlied@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/video/intelfb/intelfbdrv.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -puN drivers/video/intelfb/intelfbdrv.c~signedness-issue-in-drivers-video-intelfb-intelfbdrvc drivers/video/intelfb/intelfbdrv.c
--- a/drivers/video/intelfb/intelfbdrv.c~signedness-issue-in-drivers-video-intelfb-intelfbdrvc
+++ a/drivers/video/intelfb/intelfbdrv.c
@@ -418,12 +418,13 @@ module_exit(intelfb_exit);
 #ifdef CONFIG_MTRR
 static inline void __devinit set_mtrr(struct intelfb_info *dinfo)
 {
-	dinfo->mtrr_reg = mtrr_add(dinfo->aperture.physical,
+	int mtrr_reg = mtrr_add(dinfo->aperture.physical,
 				   dinfo->aperture.size, MTRR_TYPE_WRCOMB, 1);
-	if (dinfo->mtrr_reg < 0) {
+	if (mtrr_reg < 0) {
 		ERR_MSG("unable to set MTRR\n");
 		return;
 	}
+	dinfo->mtrr_reg = mtrr_reg;
 	dinfo->has_mtrr = 1;
 }
 static inline void unset_mtrr(struct intelfb_info *dinfo)
_

Patches currently in -mm which might be from snakebyte@xxxxxx are

git-gfs2.patch
signedness-issue-in-drivers-video-intelfb-intelfbdrvc.patch
signedness-issue-in-drivers-net-phy-phy_devicec.patch
signedness-issue-in-drivers-scsi-iprc.patch
signedness-issue-in-drivers-scsi-osstc.patch
signedness-issue-in-drivers-usb-gadget-etherc.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux