All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Janne Grunau <j@jannau.net>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [asahilinux:bits/200-dcp 46/178] drivers/gpu/drm/apple/dptxep.c:204:26: sparse: sparse: cast from restricted __le64
Date: Tue, 12 May 2026 18:59:16 +0800	[thread overview]
Message-ID: <202605121832.9hBUgwvF-lkp@intel.com> (raw)

tree:   https://github.com/AsahiLinux/linux bits/200-dcp
head:   4b1d0b029fb1b7f93e72be2d9553a358b8054d7c
commit: e195c24325c721ace3005a5ffe668e0870ec7138 [46/178] drm: apple: dptx: Add set_active_lanes APCALL
config: arm64-randconfig-r132-20260512 (https://download.01.org/0day-ci/archive/20260512/202605121832.9hBUgwvF-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260512/202605121832.9hBUgwvF-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605121832.9hBUgwvF-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/apple/dptxep.c:204:26: sparse: sparse: cast from restricted __le64
>> drivers/gpu/drm/apple/dptxep.c:204:26: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned long long [usertype] lane_count @@     got restricted __le64 [usertype] @@
   drivers/gpu/drm/apple/dptxep.c:204:26: sparse:     expected unsigned long long [usertype] lane_count
   drivers/gpu/drm/apple/dptxep.c:204:26: sparse:     got restricted __le64 [usertype]

vim +204 drivers/gpu/drm/apple/dptxep.c

   188	
   189	static int dptxport_call_set_active_lane_count(struct apple_epic_service *service,
   190						       const void *data, size_t data_size,
   191						       void *reply_, size_t reply_size)
   192	{
   193		struct dptx_port *dptx = service->cookie;
   194		const struct dptxport_apcall_set_active_lane_count *request = data;
   195		struct dptxport_apcall_set_active_lane_count *reply = reply_;
   196		int ret = 0;
   197		int retcode = 0;
   198	
   199		if (reply_size < sizeof(*reply))
   200			return -1;
   201		if (data_size < sizeof(*request))
   202			return -1;
   203	
 > 204		u64 lane_count = cpu_to_le64(request->lane_count);
   205	
   206		switch (lane_count) {
   207		case 0 ... 2:
   208		case 4:
   209			dptx->phy_ops.dp.lanes = lane_count;
   210			dptx->phy_ops.dp.set_lanes = 1;
   211			break;
   212		default:
   213			dev_err(service->ep->dcp->dev, "set_active_lane_count: invalid lane count:%llu\n", lane_count);
   214			retcode = 1;
   215			lane_count = 0;
   216			break;
   217		}
   218	
   219		if (dptx->phy_ops.dp.set_lanes) {
   220			if (dptx->atcphy) {
   221				ret = phy_configure(dptx->atcphy, &dptx->phy_ops);
   222				if (ret)
   223					return ret;
   224			}
   225			dptx->phy_ops.dp.set_lanes = 0;
   226		}
   227	
   228		reply->retcode = cpu_to_le32(retcode);
   229		reply->lane_count = cpu_to_le64(lane_count);
   230	
   231		return ret;
   232	}
   233	

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

                 reply	other threads:[~2026-05-12 10:59 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=202605121832.9hBUgwvF-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=j@jannau.net \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 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.