lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2405202113160.3378@hadrien>
Date: Mon, 20 May 2024 21:13:59 +0200 (CEST)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Christian König <christian.koenig@....com>, 
    linux-kernel@...r.kernel.org, oe-kbuild-all@...ts.linux.dev, 
    Thierry Reding <treding@...dia.com>
Subject: drivers/gpu/drm/tegra/dp.c:738:22-33: opportunity for str_plural(link
 -> lanes) (fwd)



---------- Forwarded message ----------
Date: Sat, 18 May 2024 02:26:08 +0800
From: kernel test robot <lkp@...el.com>
To: oe-kbuild@...ts.linux.dev
Cc: lkp@...el.com, Julia Lawall <julia.lawall@...ia.fr>
Subject: drivers/gpu/drm/tegra/dp.c:738:22-33: opportunity for str_plural(link
    -> lanes)

BCC: lkp@...el.com
CC: oe-kbuild-all@...ts.linux.dev
CC: linux-kernel@...r.kernel.org
TO: "Christian König" <christian.koenig@....com>
CC: Thierry Reding <treding@...dia.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ff2632d7d08edc11e8bd0629e9fcfebab25c78b4
commit: f75d19827b731c6f24930ef77e5a46cf2242bc68 drm/tegra: Allow compile test on !ARM v2
date:   1 year, 1 month ago
:::::: branch date: 2 hours ago
:::::: commit date: 1 year, 1 month ago
config: mips-randconfig-r052-20240517 (https://download.01.org/0day-ci/archive/20240518/202405180249.j8XWqlXt-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project d3455f4ddd16811401fa153298fadd2f59f6914e)

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@...el.com>
| Reported-by: Julia Lawall <julia.lawall@...ia.fr>
| Closes: https://lore.kernel.org/r/202405180249.j8XWqlXt-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/tegra/dp.c:738:22-33: opportunity for str_plural(link -> lanes)
   drivers/gpu/drm/tegra/dp.c:794:22-33: opportunity for str_plural(link -> lanes)
--
>> drivers/gpu/drm/tegra/sor.c:939:11-16: opportunity for str_plural(lanes)

vim +738 drivers/gpu/drm/tegra/dp.c

078c445733c1e8 Thierry Reding 2015-07-07  731
078c445733c1e8 Thierry Reding 2015-07-07  732  static int drm_dp_link_train_full(struct drm_dp_link *link)
078c445733c1e8 Thierry Reding 2015-07-07  733  {
078c445733c1e8 Thierry Reding 2015-07-07  734  	int err;
078c445733c1e8 Thierry Reding 2015-07-07  735
078c445733c1e8 Thierry Reding 2015-07-07  736  retry:
078c445733c1e8 Thierry Reding 2015-07-07  737  	DRM_DEBUG_KMS("full-training link: %u lane%s at %u MHz\n",
078c445733c1e8 Thierry Reding 2015-07-07 @738  		      link->lanes, (link->lanes > 1) ? "s" : "",
078c445733c1e8 Thierry Reding 2015-07-07  739  		      link->rate / 100);
078c445733c1e8 Thierry Reding 2015-07-07  740
078c445733c1e8 Thierry Reding 2015-07-07  741  	err = drm_dp_link_configure(link->aux, link);
078c445733c1e8 Thierry Reding 2015-07-07  742  	if (err < 0) {
078c445733c1e8 Thierry Reding 2015-07-07  743  		DRM_ERROR("failed to configure DP link: %d\n", err);
078c445733c1e8 Thierry Reding 2015-07-07  744  		return err;
078c445733c1e8 Thierry Reding 2015-07-07  745  	}
078c445733c1e8 Thierry Reding 2015-07-07  746
078c445733c1e8 Thierry Reding 2015-07-07  747  	err = drm_dp_link_clock_recovery(link);
078c445733c1e8 Thierry Reding 2015-07-07  748  	if (err < 0) {
078c445733c1e8 Thierry Reding 2015-07-07  749  		DRM_ERROR("clock recovery failed: %d\n", err);
078c445733c1e8 Thierry Reding 2015-07-07  750  		goto out;
078c445733c1e8 Thierry Reding 2015-07-07  751  	}
078c445733c1e8 Thierry Reding 2015-07-07  752
078c445733c1e8 Thierry Reding 2015-07-07  753  	if (!link->train.clock_recovered) {
078c445733c1e8 Thierry Reding 2015-07-07  754  		DRM_ERROR("clock recovery failed, downgrading link\n");
078c445733c1e8 Thierry Reding 2015-07-07  755
078c445733c1e8 Thierry Reding 2015-07-07  756  		err = drm_dp_link_downgrade(link);
078c445733c1e8 Thierry Reding 2015-07-07  757  		if (err < 0)
078c445733c1e8 Thierry Reding 2015-07-07  758  			goto out;
078c445733c1e8 Thierry Reding 2015-07-07  759
078c445733c1e8 Thierry Reding 2015-07-07  760  		goto retry;
078c445733c1e8 Thierry Reding 2015-07-07  761  	}
078c445733c1e8 Thierry Reding 2015-07-07  762
078c445733c1e8 Thierry Reding 2015-07-07  763  	DRM_DEBUG_KMS("clock recovery succeeded\n");
078c445733c1e8 Thierry Reding 2015-07-07  764
078c445733c1e8 Thierry Reding 2015-07-07  765  	err = drm_dp_link_channel_equalization(link);
078c445733c1e8 Thierry Reding 2015-07-07  766  	if (err < 0) {
078c445733c1e8 Thierry Reding 2015-07-07  767  		DRM_ERROR("channel equalization failed: %d\n", err);
078c445733c1e8 Thierry Reding 2015-07-07  768  		goto out;
078c445733c1e8 Thierry Reding 2015-07-07  769  	}
078c445733c1e8 Thierry Reding 2015-07-07  770
078c445733c1e8 Thierry Reding 2015-07-07  771  	if (!link->train.channel_equalized) {
078c445733c1e8 Thierry Reding 2015-07-07  772  		DRM_ERROR("channel equalization failed, downgrading link\n");
078c445733c1e8 Thierry Reding 2015-07-07  773
078c445733c1e8 Thierry Reding 2015-07-07  774  		err = drm_dp_link_downgrade(link);
078c445733c1e8 Thierry Reding 2015-07-07  775  		if (err < 0)
078c445733c1e8 Thierry Reding 2015-07-07  776  			goto out;
078c445733c1e8 Thierry Reding 2015-07-07  777
078c445733c1e8 Thierry Reding 2015-07-07  778  		goto retry;
078c445733c1e8 Thierry Reding 2015-07-07  779  	}
078c445733c1e8 Thierry Reding 2015-07-07  780
078c445733c1e8 Thierry Reding 2015-07-07  781  	DRM_DEBUG_KMS("channel equalization succeeded\n");
078c445733c1e8 Thierry Reding 2015-07-07  782
078c445733c1e8 Thierry Reding 2015-07-07  783  out:
078c445733c1e8 Thierry Reding 2015-07-07  784  	drm_dp_link_train_disable(link);
078c445733c1e8 Thierry Reding 2015-07-07  785  	return err;
078c445733c1e8 Thierry Reding 2015-07-07  786  }
078c445733c1e8 Thierry Reding 2015-07-07  787

:::::: The code at line 738 was first introduced by commit
:::::: 078c445733c1e8092e23391b251cad6b12f6156e drm/tegra: dp: Add DisplayPort link training helper

:::::: TO: Thierry Reding <treding@...dia.com>
:::::: CC: Thierry Reding <treding@...dia.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ