]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/sdvo: Protect macro args
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 5 Jul 2023 20:21:11 +0000 (23:21 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 24 Aug 2023 12:20:32 +0000 (15:20 +0300)
Put parens around macro argument evaluation for safety.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230705202122.17915-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_sdvo.c

index 7108d031271a95a0a761d16895a6c43e604cf8a4..15a860b6c692eb603f2bc6161c54b1862ffd8e81 100644 (file)
 #define SDVO_LVDS_MASK (SDVO_OUTPUT_LVDS0 | SDVO_OUTPUT_LVDS1)
 #define SDVO_TV_MASK   (SDVO_OUTPUT_CVBS0 | SDVO_OUTPUT_SVID0 | SDVO_OUTPUT_YPRPB0)
 
-#define SDVO_OUTPUT_MASK (SDVO_TMDS_MASK | SDVO_RGB_MASK | SDVO_LVDS_MASK |\
-                       SDVO_TV_MASK)
-
-#define IS_TV(c)       (c->output_flag & SDVO_TV_MASK)
-#define IS_TMDS(c)     (c->output_flag & SDVO_TMDS_MASK)
-#define IS_LVDS(c)     (c->output_flag & SDVO_LVDS_MASK)
-#define IS_TV_OR_LVDS(c) (c->output_flag & (SDVO_TV_MASK | SDVO_LVDS_MASK))
-#define IS_DIGITAL(c) (c->output_flag & (SDVO_TMDS_MASK | SDVO_LVDS_MASK))
+#define SDVO_OUTPUT_MASK (SDVO_TMDS_MASK | SDVO_RGB_MASK | SDVO_LVDS_MASK | SDVO_TV_MASK)
+
+#define IS_TV(c)               ((c)->output_flag & SDVO_TV_MASK)
+#define IS_TMDS(c)             ((c)->output_flag & SDVO_TMDS_MASK)
+#define IS_LVDS(c)             ((c)->output_flag & SDVO_LVDS_MASK)
+#define IS_TV_OR_LVDS(c)       ((c)->output_flag & (SDVO_TV_MASK | SDVO_LVDS_MASK))
+#define IS_DIGITAL(c)          ((c)->output_flag & (SDVO_TMDS_MASK | SDVO_LVDS_MASK))
 
 
 static const char * const tv_format_names[] = {