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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202601041449.BwJ5RZ2a-lkp@intel.com>
Date: Sun, 4 Jan 2026 14:57:47 +0100
From: kernel test robot <lkp@...el.com>
To: Chen Changcheng <chenchangcheng@...inos.cn>,
	laurent.pinchart@...asonboard.com, hansg@...nel.org,
	mchehab@...nel.org
Cc: oe-kbuild-all@...ts.linux.dev, linux-media@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Chen Changcheng <chenchangcheng@...inos.cn>
Subject: Re: [PATCH] media: uvcvideo: Use scope-based cleanup helper

Hi Chen,

kernel test robot noticed the following build errors:

[auto build test ERROR on 805f9a061372164d43ddef771d7cd63e3ba6d845]

url:    https://github.com/intel-lab-lkp/linux/commits/Chen-Changcheng/media-uvcvideo-Use-scope-based-cleanup-helper/20260104-144716
base:   805f9a061372164d43ddef771d7cd63e3ba6d845
patch link:    https://lore.kernel.org/r/20260104064520.115462-1-chenchangcheng%40kylinos.cn
patch subject: [PATCH] media: uvcvideo: Use scope-based cleanup helper
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260104/202601041449.BwJ5RZ2a-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260104/202601041449.BwJ5RZ2a-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601041449.BwJ5RZ2a-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/media/usb/uvc/uvc_video.c: In function 'uvc_get_video_ctrl':
>> drivers/media/usb/uvc/uvc_video.c:320:25: error: expected ';' before '}' token
     320 |                 return 0
         |                         ^
         |                         ;
     321 |         } else if (query == UVC_GET_DEF && probe == 1 && ret != size) {
         |         ~                


vim +320 drivers/media/usb/uvc/uvc_video.c

   289	
   290	static int uvc_get_video_ctrl(struct uvc_streaming *stream,
   291		struct uvc_streaming_control *ctrl, int probe, u8 query)
   292	{
   293		u16 size = uvc_video_ctrl_size(stream);
   294		u8 *data __free(kfree) = NULL;
   295		int ret;
   296	
   297		if ((stream->dev->quirks & UVC_QUIRK_PROBE_DEF) &&
   298				query == UVC_GET_DEF)
   299			return -EIO;
   300	
   301		data = kmalloc(size, GFP_KERNEL);
   302		if (data == NULL)
   303			return -ENOMEM;
   304	
   305		ret = __uvc_query_ctrl(stream->dev, query, 0, stream->intfnum,
   306			probe ? UVC_VS_PROBE_CONTROL : UVC_VS_COMMIT_CONTROL, data,
   307			size, uvc_timeout_param);
   308	
   309		if ((query == UVC_GET_MIN || query == UVC_GET_MAX) && ret == 2) {
   310			/*
   311			 * Some cameras, mostly based on Bison Electronics chipsets,
   312			 * answer a GET_MIN or GET_MAX request with the wCompQuality
   313			 * field only.
   314			 */
   315			uvc_warn_once(stream->dev, UVC_WARN_MINMAX, "UVC non "
   316				"compliance - GET_MIN/MAX(PROBE) incorrectly "
   317				"supported. Enabling workaround.\n");
   318			memset(ctrl, 0, sizeof(*ctrl));
   319			ctrl->wCompQuality = le16_to_cpup((__le16 *)data);
 > 320			return 0
   321		} else if (query == UVC_GET_DEF && probe == 1 && ret != size) {
   322			/*
   323			 * Many cameras don't support the GET_DEF request on their
   324			 * video probe control. Warn once and return, the caller will
   325			 * fall back to GET_CUR.
   326			 */
   327			uvc_warn_once(stream->dev, UVC_WARN_PROBE_DEF, "UVC non "
   328				"compliance - GET_DEF(PROBE) not supported. "
   329				"Enabling workaround.\n");
   330			return -EIO;
   331		} else if (ret != size) {
   332			dev_err(&stream->intf->dev,
   333				"Failed to query (%s) UVC %s control : %d (exp. %u).\n",
   334				uvc_query_name(query), probe ? "probe" : "commit",
   335				ret, size);
   336			return (ret == -EPROTO) ? -EPROTO : -EIO;
   337		}
   338	
   339		ctrl->bmHint = le16_to_cpup((__le16 *)&data[0]);
   340		ctrl->bFormatIndex = data[2];
   341		ctrl->bFrameIndex = data[3];
   342		ctrl->dwFrameInterval = le32_to_cpup((__le32 *)&data[4]);
   343		ctrl->wKeyFrameRate = le16_to_cpup((__le16 *)&data[8]);
   344		ctrl->wPFrameRate = le16_to_cpup((__le16 *)&data[10]);
   345		ctrl->wCompQuality = le16_to_cpup((__le16 *)&data[12]);
   346		ctrl->wCompWindowSize = le16_to_cpup((__le16 *)&data[14]);
   347		ctrl->wDelay = le16_to_cpup((__le16 *)&data[16]);
   348		ctrl->dwMaxVideoFrameSize = get_unaligned_le32(&data[18]);
   349		ctrl->dwMaxPayloadTransferSize = get_unaligned_le32(&data[22]);
   350	
   351		if (size >= 34) {
   352			ctrl->dwClockFrequency = get_unaligned_le32(&data[26]);
   353			ctrl->bmFramingInfo = data[30];
   354			ctrl->bPreferedVersion = data[31];
   355			ctrl->bMinVersion = data[32];
   356			ctrl->bMaxVersion = data[33];
   357		} else {
   358			ctrl->dwClockFrequency = stream->dev->clock_frequency;
   359			ctrl->bmFramingInfo = 0;
   360			ctrl->bPreferedVersion = 0;
   361			ctrl->bMinVersion = 0;
   362			ctrl->bMaxVersion = 0;
   363		}
   364	
   365		/*
   366		 * Some broken devices return null or wrong dwMaxVideoFrameSize and
   367		 * dwMaxPayloadTransferSize fields. Try to get the value from the
   368		 * format and frame descriptors.
   369		 */
   370		uvc_fixup_video_ctrl(stream, ctrl);
   371	
   372		return 0;
   373	}
   374	

-- 
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