drm/via: fix assignment in if condition
Subsystems (2)
PATCH 1/1 drm/via: fix assignment in if condition
Fix check_patch.pl warning:
ERROR: do not use assignment in if condition
+ if ((HALCYON_HEADER2 == (cmd = *buf)) &&
ERROR: do not use assignment in if condition
+ if (HALCYON_HEADER2 == (cmd = *buf))
Signed-off-by Bernard Zhao <[email protected]>
--- drivers/gpu/drm/via/via_verifier.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/via/via_verifier.c +4 -3
@@ -1001,8 +1001,8 @@ via_verify_command_stream(const uint32_t * buf, unsigned int size, state =via_check_vheader6 (&buf, buf_end);break ;case state_command: -if ((HALCYON_HEADER2 == (cmd = *buf)) && - supported_3d) + cmd = *buf; +if ((cmd ==HALCYON_HEADER2 ) && supported_3d) state = state_header2;else if ((cmd &HALCYON_HEADER1MASK ) ==HALCYON_HEADER1 ) state = state_header1;
@@ -1064,7 +1064,8 @@ via_parse_command_stream(struct drm_device *dev, const uint32_t *buf, state =via_parse_vheader6 (dev_priv, &buf, buf_end);break ;case state_command: -if (HALCYON_HEADER2 == (cmd = *buf)) + cmd = *buf; +if (cmd ==HALCYON_HEADER2 ) state = state_header2;else if ((cmd &HALCYON_HEADER1MASK ) ==HALCYON_HEADER1 ) state = state_header1;
Signature · 1 line
2.29.0
Daniel Vetter
AppliedQuoted 8 lines · Bernard Zhao
Fix check_patch.pl warning:
ERROR: do not use assignment in if condition
+ if ((HALCYON_HEADER2== (cmd = *buf)) &&ERROR: do not use assignment in if condition
+ if (HALCYON_HEADER2== (cmd = *buf))Signed-off-by Bernard Zhao <[email protected]>
Applied, thanks for your patch.
-Daniel
Quoted 32 lines
--- drivers/gpu/drm/via/via_verifier.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/gpu/drm/via/via_verifier.c +4
-3@@ -1001,8 +1001,8 @@ via_verify_command_stream(const uint32_t * buf, unsigned int size, state =via_check_vheader6 (&buf, buf_end);break ;case state_command: -if ((HALCYON_HEADER2 == (cmd = *buf)) && - supported_3d) + cmd = *buf; +if ((cmd ==HALCYON_HEADER2 ) && supported_3d) state = state_header2;else if ((cmd &HALCYON_HEADER1MASK ) ==HALCYON_HEADER1 ) state = state_header1;@@ -1064,7 +1064,8 @@ via_parse_command_stream(struct drm_device *dev, const uint32_t *buf, state =via_parse_vheader6 (dev_priv, &buf, buf_end);break ;case state_command: -if (HALCYON_HEADER2 == (cmd = *buf)) + cmd = *buf; +if (cmd ==HALCYON_HEADER2 ) state = state_header2;else if ((cmd &HALCYON_HEADER1MASK ) ==HALCYON_HEADER1 ) state = state_header1;Signature · 1 line
2.29.0
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel