All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [linux-next:master 12331/14131] drivers/staging/most/usb/usb.c:220 get_stream_frame_size() error: uninitialized symbol 'frame_size'.
Date: Sun, 31 May 2020 07:21:40 +0800	[thread overview]
Message-ID: <202005310731.4Eaic2la%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5783 bytes --]

CC: kbuild-all(a)lists.01.org
TO: "Christian, Gromm," <christian.gromm@microchip.com>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   e7b08814b16b80a0bf76eeca16317f8c2ed23b8c
commit: 2c069b61a843dc9c3d2296b54c4baa9730286530 [12331/14131] staging: most: usb: return 0 instead of variable
:::::: branch date: 2 days ago
:::::: commit date: 4 days ago
config: x86_64-randconfig-m001-20200531 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/staging/most/usb/usb.c:220 get_stream_frame_size() error: uninitialized symbol 'frame_size'.

# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2c069b61a843dc9c3d2296b54c4baa9730286530
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update linux-next
git checkout 2c069b61a843dc9c3d2296b54c4baa9730286530
vim +/frame_size +220 drivers/staging/most/usb/usb.c

e33269f60ae114 drivers/staging/most/hdm-usb/hdm_usb.c Andrey Shvetsov 2016-10-25  186  
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  187  /**
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  188   * get_stream_frame_size - calculate frame size of current configuration
1c538a417977ec drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-27  189   * @dev: device structure
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  190   * @cfg: channel configuration
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  191   */
1c538a417977ec drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-27  192  static unsigned int get_stream_frame_size(struct device *dev,
1c538a417977ec drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-27  193  					  struct most_channel_config *cfg)
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  194  {
2c069b61a843dc drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-27  195  	unsigned int frame_size;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  196  	unsigned int sub_size = cfg->subbuffer_size;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  197  
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  198  	if (!sub_size) {
62573221240fdf drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-15  199  		dev_warn(dev, "Misconfig: Subbuffer size zero.\n");
2c069b61a843dc drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-27  200  		return 0;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  201  	}
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  202  	switch (cfg->data_type) {
0540609fe217c3 drivers/staging/most/hdm-usb/hdm_usb.c Andrey Shvetsov 2016-09-21  203  	case MOST_CH_ISOC:
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  204  		frame_size = AV_PACKETS_PER_XACT * sub_size;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  205  		break;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  206  	case MOST_CH_SYNC:
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  207  		if (cfg->packets_per_xact == 0) {
62573221240fdf drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-15  208  			dev_warn(dev, "Misconfig: Packets per XACT zero\n");
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  209  			frame_size = 0;
9deba73de56ce5 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-10-21  210  		} else if (cfg->packets_per_xact == 0xFF) {
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  211  			frame_size = (USB_MTU / sub_size) * sub_size;
9deba73de56ce5 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-10-21  212  		} else {
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  213  			frame_size = cfg->packets_per_xact * sub_size;
9deba73de56ce5 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-10-21  214  		}
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  215  		break;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  216  	default:
62573221240fdf drivers/staging/most/usb/usb.c         Christian Gromm 2020-05-15  217  		dev_warn(dev, "Query frame size of non-streaming channel\n");
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  218  		break;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  219  	}
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 @220  	return frame_size;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  221  }
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24  222  

:::::: The code at line 220 was first introduced by commit
:::::: a4198cdf0c3460d767d0d36979cd633021c127a2 Staging: most: add MOST driver's hdm-usb module

:::::: TO: Christian Gromm <christian.gromm@microchip.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37834 bytes --]

                 reply	other threads:[~2020-05-30 23:21 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=202005310731.4Eaic2la%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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.