* [esmil:jh7110 36/43] drivers/gpu/drm/verisilicon/vs_dc.c:731:15-16: WARNING opportunity for swap()
@ 2023-12-15 10:36 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-12-15 10:36 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Julia Lawall
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Keith Zhao <keith.zhao@starfivetech.com>
CC: Emil Renner Berthing <emil.renner.berthing@canonical.com>
tree: https://github.com/esmil/linux jh7110
head: bebe83d360486029c861b78d6f751aa6d857adf9
commit: 5ef253a52e2113e8685c7222ca98fa1d9362445e [36/43] drm/vs: Add KMS crtc&plane
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: riscv-randconfig-r061-20231215 (https://download.01.org/0day-ci/archive/20231215/202312151854.SXMjpEOs-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202312151854.SXMjpEOs-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/verisilicon/vs_dc.c:731:15-16: WARNING opportunity for swap()
vim +731 drivers/gpu/drm/verisilicon/vs_dc.c
5ef253a52e2113 Keith Zhao 2023-12-04 711
5ef253a52e2113 Keith Zhao 2023-12-04 712 static void update_scale(struct drm_plane_state *state, struct dc_hw_roi *roi,
5ef253a52e2113 Keith Zhao 2023-12-04 713 struct dc_hw_scale *scale)
5ef253a52e2113 Keith Zhao 2023-12-04 714 {
5ef253a52e2113 Keith Zhao 2023-12-04 715 int dst_w = drm_rect_width(&state->dst);
5ef253a52e2113 Keith Zhao 2023-12-04 716 int dst_h = drm_rect_height(&state->dst);
5ef253a52e2113 Keith Zhao 2023-12-04 717 int src_w, src_h, temp;
5ef253a52e2113 Keith Zhao 2023-12-04 718
5ef253a52e2113 Keith Zhao 2023-12-04 719 scale->enable = false;
5ef253a52e2113 Keith Zhao 2023-12-04 720
5ef253a52e2113 Keith Zhao 2023-12-04 721 if (roi->enable) {
5ef253a52e2113 Keith Zhao 2023-12-04 722 src_w = roi->width;
5ef253a52e2113 Keith Zhao 2023-12-04 723 src_h = roi->height;
5ef253a52e2113 Keith Zhao 2023-12-04 724 } else {
5ef253a52e2113 Keith Zhao 2023-12-04 725 src_w = drm_rect_width(&state->src) >> 16;
5ef253a52e2113 Keith Zhao 2023-12-04 726 src_h = drm_rect_height(&state->src) >> 16;
5ef253a52e2113 Keith Zhao 2023-12-04 727 }
5ef253a52e2113 Keith Zhao 2023-12-04 728
5ef253a52e2113 Keith Zhao 2023-12-04 729 if (drm_rotation_90_or_270(state->rotation)) {
5ef253a52e2113 Keith Zhao 2023-12-04 730 temp = src_w;
5ef253a52e2113 Keith Zhao 2023-12-04 @731 src_w = src_h;
5ef253a52e2113 Keith Zhao 2023-12-04 732 src_h = temp;
5ef253a52e2113 Keith Zhao 2023-12-04 733 }
5ef253a52e2113 Keith Zhao 2023-12-04 734
5ef253a52e2113 Keith Zhao 2023-12-04 735 if (src_w != dst_w) {
5ef253a52e2113 Keith Zhao 2023-12-04 736 scale->scale_factor_x = calc_factor(src_w, dst_w);
5ef253a52e2113 Keith Zhao 2023-12-04 737 scale->enable = true;
5ef253a52e2113 Keith Zhao 2023-12-04 738 } else {
5ef253a52e2113 Keith Zhao 2023-12-04 739 scale->scale_factor_x = 1 << 16;
5ef253a52e2113 Keith Zhao 2023-12-04 740 }
5ef253a52e2113 Keith Zhao 2023-12-04 741 if (src_h != dst_h) {
5ef253a52e2113 Keith Zhao 2023-12-04 742 scale->scale_factor_y = calc_factor(src_h, dst_h);
5ef253a52e2113 Keith Zhao 2023-12-04 743 scale->enable = true;
5ef253a52e2113 Keith Zhao 2023-12-04 744 } else {
5ef253a52e2113 Keith Zhao 2023-12-04 745 scale->scale_factor_y = 1 << 16;
5ef253a52e2113 Keith Zhao 2023-12-04 746 }
5ef253a52e2113 Keith Zhao 2023-12-04 747 }
5ef253a52e2113 Keith Zhao 2023-12-04 748
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-15 10:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-15 10:36 [esmil:jh7110 36/43] drivers/gpu/drm/verisilicon/vs_dc.c:731:15-16: WARNING opportunity for swap() kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.