All of lore.kernel.org
 help / color / mirror / Atom feed
* [asahilinux:bits/200-dcp 46/178] drivers/gpu/drm/apple/dptxep.c:204:26: sparse: sparse: cast from restricted __le64
@ 2026-05-12 10:59 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-12 10:59 UTC (permalink / raw)
  To: Janne Grunau; +Cc: oe-kbuild-all

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-12 10:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 10:59 [asahilinux:bits/200-dcp 46/178] drivers/gpu/drm/apple/dptxep.c:204:26: sparse: sparse: cast from restricted __le64 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.