diff mbox

drm/i915: Remove unused BSM_MASK causing warning

Message ID 1476256734-6457-1-git-send-email-joonas.lahtinen@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Joonas Lahtinen Oct. 12, 2016, 7:18 a.m. UTC
Remove never used BSM{,_MASK}. BSM_MASK #define also causes a warning.

include/drm/i915_drm.h:96:34: warning: result of ‘65535 << 20’
requires 37 bits to represent, but ‘int’ only has 32 bits
[-Wshiftoverflow=]
   #define   INTEL_BSM_MASK (0xFFFF << 20)

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Chris Wilson Oct. 12, 2016, 7:42 a.m. UTC | #1
On Wed, Oct 12, 2016 at 10:18:54AM +0300, Joonas Lahtinen wrote:
> Remove never used BSM{,_MASK}. BSM_MASK #define also causes a warning.
> 
> include/drm/i915_drm.h:96:34: warning: result of ‘65535 << 20’
> requires 37 bits to represent, but ‘int’ only has 32 bits
> [-Wshiftoverflow=]
>    #define   INTEL_BSM_MASK (0xFFFF << 20)
> 
> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_reg.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index acc767a..3105872 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -86,8 +86,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
>  #define DEVEN 0x54
>  #define   DEVEN_MCHBAR_EN (1 << 28)
>  
> -#define BSM 0x5c
> -#define   BSM_MASK (0xFFFF << 20)
> +/* BSM in include/drm/i915_drm.h */

greps ok.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Joonas Lahtinen Oct. 12, 2016, 8:04 a.m. UTC | #2
On ke, 2016-10-12 at 08:42 +0100, Chris Wilson wrote:
> greps ok.
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Merged, thanks for the review.

Regards, Joonas
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index acc767a..3105872 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -86,8 +86,7 @@  static inline bool i915_mmio_reg_valid(i915_reg_t reg)
 #define DEVEN 0x54
 #define   DEVEN_MCHBAR_EN (1 << 28)
 
-#define BSM 0x5c
-#define   BSM_MASK (0xFFFF << 20)
+/* BSM in include/drm/i915_drm.h */
 
 #define HPLLCC	0xc0 /* 85x only */
 #define   GC_CLOCK_CONTROL_MASK		(0x7 << 0)