mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: "Christian König" <christian.koenig@amd.com>,
	linux-kernel@vger.kernel.org, oe-kbuild-all@lists.linux.dev,
	"Thierry Reding" <treding@nvidia.com>
Subject: drivers/gpu/drm/tegra/dp.c:738:22-33: opportunity for str_plural(link -> lanes) (fwd)
Date: Mon, 20 May 2024 21:13:59 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2405202113160.3378@hadrien> (raw)

[-- Attachment #1: Type: text/plain, Size: 5786 bytes --]



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

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Christian König" <christian.koenig@amd.com>
CC: Thierry Reding <treding@nvidia.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@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.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@nvidia.com>
:::::: CC: Thierry Reding <treding@nvidia.com>

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

                 reply	other threads:[~2024-05-20 19:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2405202113160.3378@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=christian.koenig@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®