Skip to content

Conversation

@Avenger-285714
Copy link
Member

Fix a comlipe error with clang-19:

drivers/gpu/drm/mwv207/mwv207_bo.c:165:6: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses]
165 | if (!jbo->flags & (1<<0))
| ^ ~
drivers/gpu/drm/mwv207/mwv207_bo.c:165:6: note: add parentheses after the '!' to evaluate the bitwise operator first
165 | if (!jbo->flags & (1<<0))
| ^
| ( )
drivers/gpu/drm/mwv207/mwv207_bo.c:165:6: note: add parentheses around left hand side expression to silence this warning
165 | if (!jbo->flags & (1<<0))
| ^
| ( )
1 error generated.

Fix a comlipe error with clang-19:

drivers/gpu/drm/mwv207/mwv207_bo.c:165:6: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses]
  165 |         if (!jbo->flags & (1<<0))
      |             ^           ~
drivers/gpu/drm/mwv207/mwv207_bo.c:165:6: note: add parentheses after the '!' to evaluate the bitwise operator first
  165 |         if (!jbo->flags & (1<<0))
      |             ^
      |              (                  )
drivers/gpu/drm/mwv207/mwv207_bo.c:165:6: note: add parentheses around left hand side expression to silence this warning
  165 |         if (!jbo->flags & (1<<0))
      |             ^
      |             (          )
1 error generated.

Signed-off-by: WangYuli <wangyuli@uniontech.com>
@Avenger-285714 Avenger-285714 merged commit ec7f206 into deepin-community:linux-6.6.y Nov 25, 2024
3 of 4 checks passed
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • 代码中的位运算符优先级可能导致逻辑错误,建议使用括号明确优先级
  • 检查jbo->flags是否为0时,应该使用jbo->flags == 0而不是(!jbo->flags)

是否建议立即修改:

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from avenger-285714. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Avenger-285714 pushed a commit to KernelSIG-cn/Linux-LTS-CN-6.6-dev that referenced this pull request Dec 29, 2024
Add Jemoic JM9100 GPU driver support.

Link: https://gitee.com/jemoic/linux
Link: deepin-community/kernel#102
Link: deepin-community/kernel#494
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Avenger-285714 pushed a commit to KernelSIG-cn/Linux-LTS-CN-6.6-dev that referenced this pull request Jan 4, 2025
Add Jemoic JM9100 GPU driver support.

Link: https://gitee.com/jemoic/linux
Link: deepin-community/kernel#102
Link: deepin-community/kernel#494
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants