Re: [PATCH 1/3] media: dvb-usb: break long strings in dvb_usb_device_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dongliang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v5.13-rc7 next-20210618]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Dongliang-Mu/media-dvb-usb-break-long-strings-in-dvb_usb_device_init/20210621-130906
base:   git://linuxtv.org/media_tree.git master
config: x86_64-randconfig-a012-20210621 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project e1adf90826a57b674eee79b071fb46c1f5683cd0)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/2cb920d86e9a83188dc0c72083640ca03e580a33
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Dongliang-Mu/media-dvb-usb-break-long-strings-in-dvb_usb_device_init/20210621-130906
        git checkout 2cb920d86e9a83188dc0c72083640ca03e580a33
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/media/usb/dvb-usb/dvb-usb-init.c:289:11: warning: missing terminating '"' character [-Winvalid-pp-token]
                   deb_err("something went very wrong,
                           ^
   drivers/media/usb/dvb-usb/dvb-usb-init.c:290:51: warning: missing terminating '"' character [-Winvalid-pp-token]
                            device was not found in current device list.\n");
                                                                          ^
   drivers/media/usb/dvb-usb/dvb-usb-init.c:289:3: error: unterminated function-like macro invocation
                   deb_err("something went very wrong,
                   ^
   drivers/media/usb/dvb-usb/dvb-usb-common.h:22:9: note: macro 'deb_err' defined here
   #define deb_err(args...)   dprintk(dvb_usb_debug,0x010,args)
           ^
   drivers/media/usb/dvb-usb/dvb-usb-init.c:350:23: error: expected '}'
   MODULE_LICENSE("GPL");
                         ^
   drivers/media/usb/dvb-usb/dvb-usb-init.c:288:13: note: to match this '{'
           if (!desc) {
                      ^
   drivers/media/usb/dvb-usb/dvb-usb-init.c:350:23: error: expected '}'
   MODULE_LICENSE("GPL");
                         ^
   drivers/media/usb/dvb-usb/dvb-usb-init.c:269:1: note: to match this '{'
   {
   ^
   2 warnings and 3 errors generated.


vim +289 drivers/media/usb/dvb-usb/dvb-usb-init.c

   261	
   262	/*
   263	 * USB
   264	 */
   265	int dvb_usb_device_init(struct usb_interface *intf,
   266				const struct dvb_usb_device_properties *props,
   267				struct module *owner, struct dvb_usb_device **du,
   268				short *adapter_nums)
   269	{
   270		struct usb_device *udev = interface_to_usbdev(intf);
   271		struct dvb_usb_device *d = NULL;
   272		const struct dvb_usb_device_description *desc = NULL;
   273	
   274		int ret = -ENOMEM, cold = 0;
   275	
   276		if (du != NULL)
   277			*du = NULL;
   278	
   279		d = kzalloc(sizeof(*d), GFP_KERNEL);
   280		if (!d) {
   281			err("no memory for 'struct dvb_usb_device'");
   282			return -ENOMEM;
   283		}
   284	
   285		memcpy(&d->props, props, sizeof(struct dvb_usb_device_properties));
   286	
   287		desc = dvb_usb_find_device(udev, &d->props, &cold);
   288		if (!desc) {
 > 289			deb_err("something went very wrong,
   290				 device was not found in current device list.\n");
   291			ret = -ENODEV;
   292			goto error;
   293		}
   294	
   295		if (cold) {
   296			info("found a %s in cold state, will try to load a firmware",
   297			     desc->name);
   298			ret = dvb_usb_download_firmware(udev, props);
   299			if (!props->no_reconnect || ret != 0)
   300				goto error;
   301		}
   302	
   303		info("found a '%s' in warm state.", desc->name);
   304		d->udev = udev;
   305		d->desc = desc;
   306		d->owner = owner;
   307	
   308		usb_set_intfdata(intf, d);
   309	
   310		ret = dvb_usb_init(d, adapter_nums);
   311		if (ret) {
   312			info("%s error while loading driver (%d)", desc->name, ret);
   313			goto error;
   314		}
   315	
   316		if (du)
   317			*du = d;
   318	
   319		info("%s is successfully initialized and connected.", desc->name);
   320		return 0;
   321	
   322	 error:
   323		usb_set_intfdata(intf, NULL);
   324		kfree(d);
   325		return ret;
   326	}
   327	EXPORT_SYMBOL(dvb_usb_device_init);
   328	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux