aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/intel/gma/intel_bios.h
diff options
context:
space:
mode:
authorRyan Salsamendi <rsalsamendi@hotmail.com>2017-07-04 13:53:00 -0700
committerMartin Roth <martinroth@google.com>2017-07-10 18:15:26 +0000
commit5d09d48050db8cd25d49a52141cd8b956f36e6f7 (patch)
tree25cfa454607b38bcf8693b7e28e4970e4372f78b /src/drivers/intel/gma/intel_bios.h
parent3f2fe18965fc5404e4d095a25dcb1be48e4040a5 (diff)
drivers/intel/gma: Fix undefined behavior
Fix undefined behavior found by clang's -Wshift-sign-overflow, find, and source inspection. Left shifting an int where the right operand is >= the width of the type is undefined. Add UL suffix since it's safe for unsigned types. Change-Id: I5240a19647c8ad59f64925f3e1c199446a886d2d Signed-off-by: Ryan Salsamendi <rsalsamendi@hotmail.com> Reviewed-on: https://review.coreboot.org/20466 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/drivers/intel/gma/intel_bios.h')
-rw-r--r--src/drivers/intel/gma/intel_bios.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/intel/gma/intel_bios.h b/src/drivers/intel/gma/intel_bios.h
index 000d7d5d8f..2e1211b9d1 100644
--- a/src/drivers/intel/gma/intel_bios.h
+++ b/src/drivers/intel/gma/intel_bios.h
@@ -584,7 +584,7 @@ struct bdb_edp {
#define SWF11_DPMS_STANDBY (1<<0)
#define SWF11_DPMS_ON 0
-#define SWF14_GFX_PFIT_EN (1<<31)
+#define SWF14_GFX_PFIT_EN (1UL<<31)
#define SWF14_TEXT_PFIT_EN (1<<30)
#define SWF14_LID_STATUS_CLOSED (1<<29) /* 0 here means open */
#define SWF14_POPUP_EN (1<<28)