Message ID | 20210621050729.3898275-1-mudongliangabcd@gmail.com (mailing list archive) |
---|---|
State | Rejected, archived |
Delegated to: | Sean Young |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1lvCAL-008uhx-5c; Mon, 21 Jun 2021 05:08:09 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229576AbhFUFKT (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Mon, 21 Jun 2021 01:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbhFUFKS (ORCPT <rfc822;linux-media@vger.kernel.org>); Mon, 21 Jun 2021 01:10:18 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 341AAC061574; Sun, 20 Jun 2021 22:08:04 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id y13so1755418plc.8; Sun, 20 Jun 2021 22:08:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TnpsAxmufh915BSD9fnBr85SfXQ0FTkySU1azKoLJlo=; b=G2bPAbjmU3rXSXhvS97FCY0yIZiOUkuubdnMIeZHLWwlfiL5tkL5DOyRQT48LBpSUF cDpsZOBF9kAM/FGEMeOAbdLxpZn3FW9pCU5vi9YOEZ9ljA2zpIAeAv2KFUa3M1DHtnkU HtBktxHxpXImqJLlXD08X1bJQNHW543XZ/gAPJmLC+JkNtLGkjmcg9qXdzzKgX1/D55j 6g26B2sbedDx0ispZXwjcW6hHACVgDcI/t6OldRXjTq98AuOP+W6Eu2cF37jZxuTpZgv T5r9pe6D4o5QNWOsKjbolVrO7YP4Ye1mQpiPQmmLSjMno8E/DZ9hBynl7HVp+RUcdous GIlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TnpsAxmufh915BSD9fnBr85SfXQ0FTkySU1azKoLJlo=; b=cbdobD+PI7Kwl08Pa5OUM8q8tayGGer7cbTM22HiTi5LgoepesRBKkxDGPrG3HMrfE Nls69IHC14Fkoe6IO41X+DSqInnliY7vs8kk/1/5T1Bk5y8x9iV+42vEKOEnlLCOmVUK Yfh0bK6Wpf9nBQQZbY+nEP2MdkY6J4voAf6IlcvuRw5ywDeSBfcKgEPNe8KMr3YW7LaM hzCFo5YLcecN4khBWQHh+ILdnHHpeshnNg2T8WfZIk2Tne/lgH6x/5+Smep9cStI3Wvb yxKF+PC108CHOQT6+mxBSIKyIMe37eQz2sEBqYFI28PWwR8zdZsT/Iiejj23PiszmAyy OZ5g== X-Gm-Message-State: AOAM532jad83KRsb5wnFn/Nted1HiFA/Fmmv3X/7mk7kgszKiBaS+y4B GCPAom1ecA8Z7g1mWyB8yCq2yl7rACQdV0Vd X-Google-Smtp-Source: ABdhPJwaXjO2k8WYN8MsXwpUlP/BEAapBKBNEjVPC48zRlO1JvXUDro2RDj0ZqlnfR1hG1GZ191CYQ== X-Received: by 2002:a17:902:6902:b029:106:50e3:b2db with SMTP id j2-20020a1709026902b029010650e3b2dbmr16114286plk.35.1624252083630; Sun, 20 Jun 2021 22:08:03 -0700 (PDT) Received: from localhost.localdomain ([45.135.186.71]) by smtp.gmail.com with ESMTPSA id b5sm11808783pgh.41.2021.06.20.22.08.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Jun 2021 22:08:03 -0700 (PDT) From: Dongliang Mu <mudongliangabcd@gmail.com> To: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Dongliang Mu <mudongliangabcd@gmail.com>, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] media: dvb-usb: break long strings in dvb_usb_device_init Date: Mon, 21 Jun 2021 13:07:26 +0800 Message-Id: <20210621050729.3898275-1-mudongliangabcd@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -3.2 (---) X-LSpam-Report: No, score=-3.2 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,FREEMAIL_FORGED_FROMDOMAIN=0.001,FREEMAIL_FROM=0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_LOW=-0.7 autolearn=ham autolearn_force=no |
Series |
[1/3] media: dvb-usb: break long strings in dvb_usb_device_init
|
|
Commit Message
Dongliang Mu
June 21, 2021, 5:07 a.m. UTC
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
---
drivers/media/usb/dvb-usb/dvb-usb-init.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Comments
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@intel.com> 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@lists.01.org
Hi Dongliang, Thank you for the patch! Yet something to improve: [auto build test ERROR on linuxtv-media/master] [also build test ERROR 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: arm64-randconfig-r014-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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-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=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (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 329 void dvb_usb_device_exit(struct usb_interface *intf) 330 { 331 struct dvb_usb_device *d = usb_get_intfdata(intf); 332 const char *default_name = "generic DVB-USB module"; 333 char name[40]; 334 335 usb_set_intfdata(intf, NULL); 336 if (d != NULL && d->desc != NULL) { 337 strscpy(name, d->desc->name, sizeof(name)); 338 dvb_usb_exit(d); 339 } else { 340 strscpy(name, default_name, sizeof(name)); 341 } 342 info("%s successfully deinitialized and disconnected.", name); 343 344 } 345 EXPORT_SYMBOL(dvb_usb_device_exit); 346 347 MODULE_VERSION("1.0"); 348 MODULE_AUTHOR("Patrick Boettcher <patrick.boettcher@posteo.de>"); 349 MODULE_DESCRIPTION("A library module containing commonly used USB and DVB function USB DVB devices"); > 350 MODULE_LICENSE("GPL"); --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/media/usb/dvb-usb/dvb-usb-init.c b/drivers/media/usb/dvb-usb/dvb-usb-init.c index 28e1fd64dd3c..edc477cedaa9 100644 --- a/drivers/media/usb/dvb-usb/dvb-usb-init.c +++ b/drivers/media/usb/dvb-usb/dvb-usb-init.c @@ -286,13 +286,15 @@ int dvb_usb_device_init(struct usb_interface *intf, desc = dvb_usb_find_device(udev, &d->props, &cold); if (!desc) { - deb_err("something went very wrong, device was not found in current device list - let's see what comes next.\n"); + deb_err("something went very wrong, + device was not found in current device list.\n"); ret = -ENODEV; goto error; } if (cold) { - info("found a '%s' in cold state, will try to load a firmware", desc->name); + info("found a %s in cold state, will try to load a firmware", + desc->name); ret = dvb_usb_download_firmware(udev, props); if (!props->no_reconnect || ret != 0) goto error; @@ -314,7 +316,7 @@ int dvb_usb_device_init(struct usb_interface *intf, if (du) *du = d; - info("%s successfully initialized and connected.", desc->name); + info("%s is successfully initialized and connected.", desc->name); return 0; error: