]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: protect macro parameters in SWING_SEL_{UPP,LO}WER
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Fri, 23 Mar 2018 19:58:53 +0000 (12:58 -0700)
committerPaulo Zanoni <paulo.r.zanoni@intel.com>
Fri, 23 Mar 2018 23:40:54 +0000 (16:40 -0700)
commit9588c64d2ecdb44904155423702db08ee356d028
treeac9ad1dc3946b85596ddad55d24b931874b5b1d9
parent33bf75732c7ff06d0031791c18f383058438b803
drm/i915: protect macro parameters in SWING_SEL_{UPP,LO}WER

Protect the macro parameters with parens in order to avoid priority
issues on macro evaluation when the macro argument is not a single
operand.

This is not a problem today, but it could be in the future. I found
this while reviewing a patch that introduces new callers for the
macros.

v2: Rebase.

Reference: commit 1bb3848a399d ("drm/i915/cnl: Add registers related to voltage swing sequences.")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180323195853.4599-1-paulo.r.zanoni@intel.com
drivers/gpu/drm/i915/i915_reg.h