[usb:usb-testing 54/97] drivers/usb/isp1760/isp1760-hcd.c:735:2: warning: Value stored to 'scratch' is never read [clang-analyzer-deadcode.DeadStores]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
head: e4788edc730a0d2b26e1ae1f08fbb3f635b92dbb
commit: 7de14c88272c05d86fce83a5cead36832ce3a424 [54/97] usb: isp1760: remove debug message as error
config: riscv-randconfig-c006-20210818 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d2b574a4dea5b718e4386bf2e26af0126e5978ce)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?id...
git remote add usb https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
git fetch --no-tags usb usb-testing
git checkout 7de14c88272c05d86fce83a5cead36832ce3a424
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^ ~
drivers/target/target_core_configfs.c:2627:23: warning: Value stored to 'alua_lu_gp_cg' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct config_group *alua_lu_gp_cg = &lu_gp->lu_gp_group;
^~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
drivers/target/target_core_configfs.c:2627:23: note: Value stored to 'alua_lu_gp_cg' during its initialization is never read
struct config_group *alua_lu_gp_cg = &lu_gp->lu_gp_group;
^~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
drivers/target/target_core_configfs.c:2731:2: warning: Value stored to 'alua_lu_gp_ci' is never read [clang-analyzer-deadcode.DeadStores]
alua_lu_gp_ci = &alua_lu_gp_cg->cg_item;
^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/target/target_core_configfs.c:2731:2: note: Value stored to 'alua_lu_gp_ci' is never read
alua_lu_gp_ci = &alua_lu_gp_cg->cg_item;
^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/target/target_core_configfs.c:2748:25: warning: Value stored to 'lu_gp' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct t10_alua_lu_gp *lu_gp = container_of(to_config_group(item),
^~~~~
drivers/target/target_core_configfs.c:2748:25: note: Value stored to 'lu_gp' during its initialization is never read
struct t10_alua_lu_gp *lu_gp = container_of(to_config_group(item),
^~~~~
drivers/target/target_core_configfs.c:3026:23: warning: Value stored to 'alua_tg_pt_gp_cg' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct config_group *alua_tg_pt_gp_cg = &tg_pt_gp->tg_pt_gp_group;
^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/target/target_core_configfs.c:3026:23: note: Value stored to 'alua_tg_pt_gp_cg' during its initialization is never read
struct config_group *alua_tg_pt_gp_cg = &tg_pt_gp->tg_pt_gp_group;
^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/target/target_core_configfs.c:3163:2: warning: Value stored to 'alua_tg_pt_gp_ci' is never read [clang-analyzer-deadcode.DeadStores]
alua_tg_pt_gp_ci = &alua_tg_pt_gp_cg->cg_item;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/target/target_core_configfs.c:3163:2: note: Value stored to 'alua_tg_pt_gp_ci' is never read
alua_tg_pt_gp_ci = &alua_tg_pt_gp_cg->cg_item;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/target/target_core_configfs.c:3179:28: warning: Value stored to 'tg_pt_gp' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct t10_alua_tg_pt_gp *tg_pt_gp = container_of(to_config_group(item),
^~~~~~~~
drivers/target/target_core_configfs.c:3179:28: note: Value stored to 'tg_pt_gp' during its initialization is never read
struct t10_alua_tg_pt_gp *tg_pt_gp = container_of(to_config_group(item),
^~~~~~~~
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
drivers/misc/eeprom/at24.c:334:2: warning: Value stored to 'client' is never read [clang-analyzer-deadcode.DeadStores]
client = at24_client->client;
^ ~~~~~~~~~~~~~~~~~~~
drivers/misc/eeprom/at24.c:334:2: note: Value stored to 'client' is never read
client = at24_client->client;
^ ~~~~~~~~~~~~~~~~~~~
drivers/misc/eeprom/at24.c:397:2: warning: Value stored to 'client' is never read [clang-analyzer-deadcode.DeadStores]
client = at24_client->client;
^ ~~~~~~~~~~~~~~~~~~~
drivers/misc/eeprom/at24.c:397:2: note: Value stored to 'client' is never read
client = at24_client->client;
^ ~~~~~~~~~~~~~~~~~~~
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
drivers/usb/isp1760/isp1760-core.c:490:2: warning: Value stored to 'udc_enabled' is never read [clang-analyzer-deadcode.DeadStores]
udc_enabled = ((devflags & ISP1760_FLAG_ISP1763) ||
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/isp1760/isp1760-core.c:490:2: note: Value stored to 'udc_enabled' is never read
udc_enabled = ((devflags & ISP1760_FLAG_ISP1763) ||
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
>> drivers/usb/isp1760/isp1760-hcd.c:735:2: warning: Value stored to 'scratch' is never read [clang-analyzer-deadcode.DeadStores]
scratch = isp1760_hcd_read(hcd, HC_CHIP_ID_HIGH);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/isp1760/isp1760-hcd.c:735:2: note: Value stored to 'scratch' is never read
scratch = isp1760_hcd_read(hcd, HC_CHIP_ID_HIGH);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/isp1760/isp1760-hcd.c:1855:38: warning: Division by zero [clang-analyzer-core.DivideZero]
&& !(urb->transfer_buffer_length %
^
drivers/usb/isp1760/isp1760-hcd.c:1887:2: note: Control jumps to 'case 3:' at line 1891
switch (usb_pipetype(urb->pipe)) {
^
drivers/usb/isp1760/isp1760-hcd.c:1893:3: note: Execution continues on line 1911
break;
^
drivers/usb/isp1760/isp1760-hcd.c:1911:6: note: Assuming the condition is false
if (usb_pipein(urb->pipe))
^
include/linux/usb.h:1937:27: note: expanded from macro 'usb_pipein'
#define usb_pipein(pipe) ((pipe) & USB_DIR_IN)
^~~~~~~~~~~~~~~~~~~
drivers/usb/isp1760/isp1760-hcd.c:1911:2: note: Taking false branch
if (usb_pipein(urb->pipe))
^
drivers/usb/isp1760/isp1760-hcd.c:1914:2: note: Calling 'packetize_urb'
packetize_urb(hcd, urb, &new_qtds, mem_flags);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/isp1760/isp1760-hcd.c:1783:6: note: Assuming field 'transfer_buffer' is non-null
if (!urb->transfer_buffer && urb->transfer_buffer_length) {
^~~~~~~~~~~~~~~~~~~~~
drivers/usb/isp1760/isp1760-hcd.c:1783:28: note: Left side of '&&' is false
if (!urb->transfer_buffer && urb->transfer_buffer_length) {
^
drivers/usb/isp1760/isp1760-hcd.c:1792:2: note: Taking false branch
if (usb_pipein(urb->pipe))
^
drivers/usb/isp1760/isp1760-hcd.c:1797:2: note: Taking false branch
if (usb_pipecontrol(urb->pipe)) {
^
drivers/usb/isp1760/isp1760-hcd.c:1809:2: note: The value 0 is assigned to 'maxpacketsize'
maxpacketsize = max_packet(usb_maxpacket(urb->dev, urb->pipe,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/isp1760/isp1760-hcd.c:1820:2: note: Loop condition is true. Entering loop body
for (;;) {
^
drivers/usb/isp1760/isp1760-hcd.c:1823:9: note: Calling 'qtd_alloc'
qtd = qtd_alloc(flags, urb, packet_type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/isp1760/isp1760-hcd.c:980:6: note: Assuming 'qtd' is non-null, which participates in a condition later
if (!qtd)
^~~~
drivers/usb/isp1760/isp1760-hcd.c:980:2: note: Taking false branch
if (!qtd)
^
drivers/usb/isp1760/isp1760-hcd.c:989:2: note: Returning pointer (loaded from 'qtd'), which participates in a condition later
return qtd;
^~~~~~~~~~
drivers/usb/isp1760/isp1760-hcd.c:1823:9: note: Returning from 'qtd_alloc'
qtd = qtd_alloc(flags, urb, packet_type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/isp1760/isp1760-hcd.c:1824:8: note: 'qtd' is non-null
if (!qtd)
^~~
drivers/usb/isp1760/isp1760-hcd.c:1824:3: note: Taking false branch
if (!qtd)
^
drivers/usb/isp1760/isp1760-hcd.c:1827:7: note: Assuming the condition is false
if (len > mem->blocks_size[ISP176x_BLOCK_NUM - 1])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/isp1760/isp1760-hcd.c:1827:3: note: Taking false branch
if (len > mem->blocks_size[ISP176x_BLOCK_NUM - 1])
^
drivers/usb/isp1760/isp1760-hcd.c:1836:7: note: 'len' is <= 0
if (len <= 0)
^~~
drivers/usb/isp1760/isp1760-hcd.c:1836:3: note: Taking true branch
if (len <= 0)
^
drivers/usb/isp1760/isp1760-hcd.c:1837:4: note: Execution continues on line 1844
break;
^
drivers/usb/isp1760/isp1760-hcd.c:1844:6: note: Assuming field 'transfer_buffer_length' is not equal to 0
if (urb->transfer_buffer_length != 0) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/isp1760/isp1760-hcd.c:1844:2: note: Taking true branch
if (urb->transfer_buffer_length != 0) {
^
drivers/usb/isp1760/isp1760-hcd.c:1847:7: note: Assuming the condition is false
if (usb_pipecontrol(urb->pipe)) {
^
include/linux/usb.h:1946:32: note: expanded from macro 'usb_pipecontrol'
#define usb_pipecontrol(pipe) (usb_pipetype((pipe)) == PIPE_CONTROL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/usb.h:1943:28: note: expanded from macro 'usb_pipetype'
#define usb_pipetype(pipe) (((pipe) >> 30) & 3)
^
drivers/usb/isp1760/isp1760-hcd.c:1847:3: note: Taking false branch
if (usb_pipecontrol(urb->pipe)) {
^
drivers/usb/isp1760/isp1760-hcd.c:1853:14: note: Assuming the condition is true
} else if (usb_pipebulk(urb->pipe)
vim +/scratch +735 drivers/usb/isp1760/isp1760-hcd.c
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 718
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 719 static int isp1760_hc_setup(struct usb_hcd *hcd)
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 720 {
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 721 struct isp1760_hcd *priv = hcd_to_priv(hcd);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 722 u32 atx_reset;
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 723 int result;
1da9e1c0687335 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 724 u32 scratch;
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 725 u32 pattern;
1da9e1c0687335 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 726
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 727 if (priv->is_isp1763)
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 728 pattern = 0xcafe;
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 729 else
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 730 pattern = 0xdeadcafe;
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 731
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 732 isp1760_hcd_write(hcd, HC_SCRATCH, pattern);
3faefc88c1a32b drivers/usb/host/isp1760-hcd.c Nate Case 2008-06-17 733
3faefc88c1a32b drivers/usb/host/isp1760-hcd.c Nate Case 2008-06-17 734 /* Change bus pattern */
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 @735 scratch = isp1760_hcd_read(hcd, HC_CHIP_ID_HIGH);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 736 scratch = isp1760_hcd_read(hcd, HC_SCRATCH);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 737 if (scratch != pattern) {
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 738 dev_err(hcd->self.controller, "Scratch test failed. 0x%08x\n", scratch);
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 739 return -ENODEV;
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 740 }
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 741
5171446a3aec60 drivers/usb/host/isp1760-hcd.c Laurent Pinchart 2015-01-21 742 /*
5171446a3aec60 drivers/usb/host/isp1760-hcd.c Laurent Pinchart 2015-01-21 743 * The RESET_HC bit in the SW_RESET register is supposed to reset the
5171446a3aec60 drivers/usb/host/isp1760-hcd.c Laurent Pinchart 2015-01-21 744 * host controller without touching the CPU interface registers, but at
5171446a3aec60 drivers/usb/host/isp1760-hcd.c Laurent Pinchart 2015-01-21 745 * least on the ISP1761 it seems to behave as the RESET_ALL bit and
5171446a3aec60 drivers/usb/host/isp1760-hcd.c Laurent Pinchart 2015-01-21 746 * reset the whole device. We thus can't use it here, so let's reset
5171446a3aec60 drivers/usb/host/isp1760-hcd.c Laurent Pinchart 2015-01-21 747 * the host controller through the EHCI USB Command register. The device
5171446a3aec60 drivers/usb/host/isp1760-hcd.c Laurent Pinchart 2015-01-21 748 * has been reset in core code anyway, so this shouldn't matter.
5171446a3aec60 drivers/usb/host/isp1760-hcd.c Laurent Pinchart 2015-01-21 749 */
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 750 isp1760_hcd_clear(hcd, ISO_BUF_FILL);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 751 isp1760_hcd_clear(hcd, INT_BUF_FILL);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 752 isp1760_hcd_clear(hcd, ATL_BUF_FILL);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 753
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 754 isp1760_hcd_set(hcd, HC_ATL_PTD_SKIPMAP);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 755 isp1760_hcd_set(hcd, HC_INT_PTD_SKIPMAP);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 756 isp1760_hcd_set(hcd, HC_ISO_PTD_SKIPMAP);
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 757
6bda21bc0941c1 drivers/usb/host/isp1760-hcd.c Arvid Brodin 2011-02-26 758 result = ehci_reset(hcd);
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 759 if (result)
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 760 return result;
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 761
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 762 /* Step 11 passed */
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 763
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 764 /* ATL reset */
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 765 if (priv->is_isp1763)
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 766 atx_reset = SW_RESET_RESET_ATX;
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 767 else
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 768 atx_reset = ALL_ATX_RESET;
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 769
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 770 isp1760_hcd_set(hcd, atx_reset);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 771 mdelay(10);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 772 isp1760_hcd_clear(hcd, atx_reset);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 773
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 774 if (priv->is_isp1763) {
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 775 isp1760_hcd_set(hcd, HW_OTG_DISABLE);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 776 isp1760_hcd_set(hcd, HW_SW_SEL_HC_DC_CLEAR);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 777 isp1760_hcd_set(hcd, HW_HC_2_DIS_CLEAR);
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 778 mdelay(10);
3faefc88c1a32b drivers/usb/host/isp1760-hcd.c Nate Case 2008-06-17 779
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 780 isp1760_hcd_set(hcd, HW_INTF_LOCK);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 781 }
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 782
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 783 isp1760_hcd_set(hcd, HC_INT_IRQ_ENABLE);
60d789f3bfbb74 drivers/usb/isp1760/isp1760-hcd.c Rui Miguel Silva 2021-05-13 784 isp1760_hcd_set(hcd, HC_ATL_IRQ_ENABLE);
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 785
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 786 return priv_init(hcd);
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 787 }
db11e47dd7b09b drivers/usb/host/isp1760-hcd.c Sebastian Siewior 2008-04-24 788
:::::: The code at line 735 was first introduced by commit
:::::: 60d789f3bfbb7428e6ba2949de70a6db8e12e8fa usb: isp1760: add support for isp1763
:::::: TO: Rui Miguel Silva <rui.silva(a)linaro.org>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH v6 1/5] soc: mediatek: mmsys: Add support for MDP
by kernel test robot
Hi Moudy,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on robh/for-next linus/master mediatek/for-next v5.14-rc6 next-20210819]
[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/Moudy-Ho/media-mediatek-support-...
base: git://linuxtv.org/media_tree.git master
config: riscv-randconfig-r033-20210818 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 11.2.0
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
# https://github.com/0day-ci/linux/commit/ffae2ca50c715cb1ded96d9374a828831...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Moudy-Ho/media-mediatek-support-mdp3-on-mt8183-platform/20210819-151256
git checkout ffae2ca50c715cb1ded96d9374a82883190f548d
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o: in function `.L27':
>> mtk-mmsys.c:(.text+0x420): undefined reference to `cmdq_pkt_write_mask'
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o: in function `.L34':
mtk-mmsys.c:(.text+0x5a0): undefined reference to `cmdq_pkt_write_mask'
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o: in function `.L45':
mtk-mmsys.c:(.text+0x7a0): undefined reference to `cmdq_pkt_write_mask'
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o: in function `.L66':
mtk-mmsys.c:(.text+0x7d8): undefined reference to `cmdq_pkt_write_mask'
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o: in function `.L42':
mtk-mmsys.c:(.text+0x7f4): undefined reference to `cmdq_pkt_write_mask'
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o:mtk-mmsys.c:(.text+0x84c): more undefined references to `cmdq_pkt_write_mask' follow
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o: in function `platform_device_register_resndata.constprop.0':
mtk-mmsys.c:(.text+0xce8): undefined reference to `cmdq_dev_get_client_reg'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH 2/3] powerpc: Refactor verification of MSR_RI
by kernel test robot
Hi Christophe,
I love your patch! Perhaps something to improve:
[auto build test WARNING on powerpc/next]
[also build test WARNING on v5.14-rc6 next-20210819]
[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/Christophe-Leroy/powerpc-Remove-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0
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
# https://github.com/0day-ci/linux/commit/797b527549df3f1f8e4d9f2bafeb5fe5e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Christophe-Leroy/powerpc-Remove-MSR_PR-check-in-interrupt_exit_-user-kernel-_prepare/20210819-143251
git checkout 797b527549df3f1f8e4d9f2bafeb5fe5ec810409
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/powerpc/mm/book3s64/slb.c:13:
arch/powerpc/mm/book3s64/slb.c: In function '____do_slb_fault':
arch/powerpc/include/asm/interrupt.h:398:29: error: invalid storage class for function '____do_bad_slb_fault'
398 | static __always_inline void ____##func(struct pt_regs *regs); \
| ^~~~
arch/powerpc/mm/book3s64/slb.c:872:1: note: in expansion of macro 'DEFINE_INTERRUPT_HANDLER'
872 | DEFINE_INTERRUPT_HANDLER(do_bad_slb_fault)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/include/asm/interrupt.h:398:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
398 | static __always_inline void ____##func(struct pt_regs *regs); \
| ^~~~~~
arch/powerpc/mm/book3s64/slb.c:872:1: note: in expansion of macro 'DEFINE_INTERRUPT_HANDLER'
872 | DEFINE_INTERRUPT_HANDLER(do_bad_slb_fault)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/include/asm/interrupt.h:400:36: warning: 'externally_visible' attribute have effect only on public objects [-Wattributes]
400 | interrupt_handler void func(struct pt_regs *regs) \
| ^~~~~~~
arch/powerpc/mm/book3s64/slb.c:872:1: note: in expansion of macro 'DEFINE_INTERRUPT_HANDLER'
872 | DEFINE_INTERRUPT_HANDLER(do_bad_slb_fault)
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/mm/book3s64/slb.c: In function 'do_bad_slb_fault':
arch/powerpc/include/asm/interrupt.h:406:9: error: implicit declaration of function '____do_bad_slb_fault'; did you mean 'do_bad_slb_fault'? [-Werror=implicit-function-declaration]
406 | ____##func (regs); \
| ^~~~
arch/powerpc/mm/book3s64/slb.c:872:1: note: in expansion of macro 'DEFINE_INTERRUPT_HANDLER'
872 | DEFINE_INTERRUPT_HANDLER(do_bad_slb_fault)
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/kprobes.h:5,
from arch/powerpc/include/asm/interrupt.h:73,
from arch/powerpc/mm/book3s64/slb.c:13:
arch/powerpc/mm/book3s64/slb.c: In function '____do_slb_fault':
include/asm-generic/kprobes.h:14:29: error: initializer element is not constant
14 | _kbl_addr_##fname = (unsigned long)fname;
| ^
include/asm-generic/kprobes.h:15:33: note: in expansion of macro '__NOKPROBE_SYMBOL'
15 | # define NOKPROBE_SYMBOL(fname) __NOKPROBE_SYMBOL(fname)
| ^~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/interrupt.h:410:1: note: in expansion of macro 'NOKPROBE_SYMBOL'
410 | NOKPROBE_SYMBOL(func); \
| ^~~~~~~~~~~~~~~
arch/powerpc/mm/book3s64/slb.c:872:1: note: in expansion of macro 'DEFINE_INTERRUPT_HANDLER'
872 | DEFINE_INTERRUPT_HANDLER(do_bad_slb_fault)
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/mm/book3s64/slb.c:13:
arch/powerpc/include/asm/interrupt.h:412:29: error: invalid storage class for function '____do_bad_slb_fault'
412 | static __always_inline void ____##func(struct pt_regs *regs)
| ^~~~
arch/powerpc/mm/book3s64/slb.c:872:1: note: in expansion of macro 'DEFINE_INTERRUPT_HANDLER'
872 | DEFINE_INTERRUPT_HANDLER(do_bad_slb_fault)
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/interrupt.h:412:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
412 | static __always_inline void ____##func(struct pt_regs *regs)
| ^~~~~~
arch/powerpc/mm/book3s64/slb.c:872:1: note: in expansion of macro 'DEFINE_INTERRUPT_HANDLER'
872 | DEFINE_INTERRUPT_HANDLER(do_bad_slb_fault)
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/mm/book3s64/slb.c:886:1: error: expected declaration or statement at end of input
886 | }
| ^
arch/powerpc/mm/book3s64/slb.c:887: error: control reaches end of non-void function [-Werror=return-type]
cc1: some warnings being treated as errors
vim +398 arch/powerpc/include/asm/interrupt.h
8d41fc618ab804 Nicholas Piggin 2021-01-30 380
8d41fc618ab804 Nicholas Piggin 2021-01-30 381 /**
8d41fc618ab804 Nicholas Piggin 2021-01-30 382 * DECLARE_INTERRUPT_HANDLER - Declare synchronous interrupt handler function
8d41fc618ab804 Nicholas Piggin 2021-01-30 383 * @func: Function name of the entry point
8d41fc618ab804 Nicholas Piggin 2021-01-30 384 */
8d41fc618ab804 Nicholas Piggin 2021-01-30 385 #define DECLARE_INTERRUPT_HANDLER(func) \
8d41fc618ab804 Nicholas Piggin 2021-01-30 386 __visible void func(struct pt_regs *regs)
8d41fc618ab804 Nicholas Piggin 2021-01-30 387
8d41fc618ab804 Nicholas Piggin 2021-01-30 388 /**
8d41fc618ab804 Nicholas Piggin 2021-01-30 389 * DEFINE_INTERRUPT_HANDLER - Define synchronous interrupt handler function
8d41fc618ab804 Nicholas Piggin 2021-01-30 390 * @func: Function name of the entry point
8d41fc618ab804 Nicholas Piggin 2021-01-30 391 *
8d41fc618ab804 Nicholas Piggin 2021-01-30 392 * @func is called from ASM entry code.
8d41fc618ab804 Nicholas Piggin 2021-01-30 393 *
8d41fc618ab804 Nicholas Piggin 2021-01-30 394 * The macro is written so it acts as function definition. Append the
8d41fc618ab804 Nicholas Piggin 2021-01-30 395 * body with a pair of curly brackets.
8d41fc618ab804 Nicholas Piggin 2021-01-30 396 */
8d41fc618ab804 Nicholas Piggin 2021-01-30 397 #define DEFINE_INTERRUPT_HANDLER(func) \
8d41fc618ab804 Nicholas Piggin 2021-01-30 @398 static __always_inline void ____##func(struct pt_regs *regs); \
8d41fc618ab804 Nicholas Piggin 2021-01-30 399 \
e4bb64c7a42e61 Nicholas Piggin 2021-02-11 @400 interrupt_handler void func(struct pt_regs *regs) \
8d41fc618ab804 Nicholas Piggin 2021-01-30 401 { \
25b7e6bb743ca5 Nicholas Piggin 2021-01-30 402 struct interrupt_state state; \
25b7e6bb743ca5 Nicholas Piggin 2021-01-30 403 \
25b7e6bb743ca5 Nicholas Piggin 2021-01-30 404 interrupt_enter_prepare(regs, &state); \
25b7e6bb743ca5 Nicholas Piggin 2021-01-30 405 \
8d41fc618ab804 Nicholas Piggin 2021-01-30 406 ____##func (regs); \
25b7e6bb743ca5 Nicholas Piggin 2021-01-30 407 \
25b7e6bb743ca5 Nicholas Piggin 2021-01-30 408 interrupt_exit_prepare(regs, &state); \
8d41fc618ab804 Nicholas Piggin 2021-01-30 409 } \
e4bb64c7a42e61 Nicholas Piggin 2021-02-11 410 NOKPROBE_SYMBOL(func); \
8d41fc618ab804 Nicholas Piggin 2021-01-30 411 \
8d41fc618ab804 Nicholas Piggin 2021-01-30 412 static __always_inline void ____##func(struct pt_regs *regs)
8d41fc618ab804 Nicholas Piggin 2021-01-30 413
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 8015/9113] fs/ksmbd/vfs.c:79:18: error: implicit declaration of function 'lookup_one'; did you mean 'lookup_bdev'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 33e65b1f975cd2814fc0ea9617250fc4c1d7a553
commit: 4b499755e1024f97e75411920a404b357af6e153 [8015/9113] ksmbd: fix lookup on idmapped mounts
config: nios2-randconfig-r033-20210819 (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 4b499755e1024f97e75411920a404b357af6e153
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the linux-next/master HEAD 33e65b1f975cd2814fc0ea9617250fc4c1d7a553 builds fine.
It may have been fixed somewhere.
All error/warnings (new ones prefixed by >>):
fs/ksmbd/vfs.c: In function 'ksmbd_vfs_lock_parent':
>> fs/ksmbd/vfs.c:79:18: error: implicit declaration of function 'lookup_one'; did you mean 'lookup_bdev'? [-Werror=implicit-function-declaration]
79 | dentry = lookup_one(user_ns, child->d_name.name, parent,
| ^~~~~~~~~~
| lookup_bdev
>> fs/ksmbd/vfs.c:79:16: warning: assignment to 'struct dentry *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
79 | dentry = lookup_one(user_ns, child->d_name.name, parent,
| ^
fs/ksmbd/vfs.c: In function 'ksmbd_vfs_mkdir':
fs/ksmbd/vfs.c:223:19: warning: assignment to 'struct dentry *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
223 | d = lookup_one(user_ns, dentry->d_name.name, dentry->d_parent,
| ^
fs/ksmbd/vfs.c: In function '__ksmbd_vfs_rename':
fs/ksmbd/vfs.c:753:18: warning: assignment to 'struct dentry *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
753 | dst_dent = lookup_one(dst_user_ns, dst_name, dst_dent_parent,
| ^
fs/ksmbd/vfs.c: In function 'ksmbd_vfs_fp_rename':
fs/ksmbd/vfs.c:816:19: warning: assignment to 'struct dentry *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
816 | src_child = lookup_one(user_ns, src_dent->d_name.name, src_dent_parent,
| ^
cc1: some warnings being treated as errors
--
fs/ksmbd/smb2pdu.c: In function 'process_query_dir_entries':
>> fs/ksmbd/smb2pdu.c:3546:24: error: implicit declaration of function 'lookup_one'; did you mean 'lookup_bdev'? [-Werror=implicit-function-declaration]
3546 | dent = lookup_one(user_ns, priv->d_info->name,
| ^~~~~~~~~~
| lookup_bdev
>> fs/ksmbd/smb2pdu.c:3546:22: warning: assignment to 'struct dentry *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
3546 | dent = lookup_one(user_ns, priv->d_info->name,
| ^
cc1: some warnings being treated as errors
vim +79 fs/ksmbd/vfs.c
62
63 /**
64 * ksmbd_vfs_lock_parent() - lock parent dentry if it is stable
65 *
66 * the parent dentry got by dget_parent or @parent could be
67 * unstable, we try to lock a parent inode and lookup the
68 * child dentry again.
69 *
70 * the reference count of @parent isn't incremented.
71 */
72 int ksmbd_vfs_lock_parent(struct user_namespace *user_ns, struct dentry *parent,
73 struct dentry *child)
74 {
75 struct dentry *dentry;
76 int ret = 0;
77
78 inode_lock_nested(d_inode(parent), I_MUTEX_PARENT);
> 79 dentry = lookup_one(user_ns, child->d_name.name, parent,
80 child->d_name.len);
81 if (IS_ERR(dentry)) {
82 ret = PTR_ERR(dentry);
83 goto out_err;
84 }
85
86 if (dentry != child) {
87 ret = -ESTALE;
88 dput(dentry);
89 goto out_err;
90 }
91
92 dput(dentry);
93 return 0;
94 out_err:
95 inode_unlock(d_inode(parent));
96 return ret;
97 }
98
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 1545/9113] drivers/media/usb/pvrusb2/pvrusb2-encoder.c:288 pvr2_encoder_cmd() warn: inconsistent indenting
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 33e65b1f975cd2814fc0ea9617250fc4c1d7a553
commit: 337015573718b161891a3473d25f59273f2e626b [1545/9113] printk: Userspace format indexing support
config: i386-randconfig-m021-20210818 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/media/usb/pvrusb2/pvrusb2-encoder.c:288 pvr2_encoder_cmd() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-hdw.c:1730 pvr2_hdw_set_streaming() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3461 pvr2_hdw_cpufw_set_enabled() warn: inconsistent indenting
drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3501 pvr2_hdw_cpufw_get() warn: inconsistent indenting
vim +288 drivers/media/usb/pvrusb2/pvrusb2-encoder.c
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 120
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 121
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 122 /* This prototype is set up to be compatible with the
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 123 cx2341x_mbox_func prototype in cx2341x.h, which should be in
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 124 kernels 2.6.18 or later. We do this so that we can enable
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 125 cx2341x.ko to write to our encoder (by handing it a pointer to this
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 126 function). For earlier kernels this doesn't really matter. */
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 127 static int pvr2_encoder_cmd(void *ctxt,
ea48c13ad0e562 drivers/media/video/pvrusb2/pvrusb2-encoder.c Hans Verkuil 2007-12-12 128 u32 cmd,
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 129 int arg_cnt_send,
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 130 int arg_cnt_recv,
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 131 u32 *argp)
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 132 {
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 133 unsigned int poll_count;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 134 unsigned int try_count = 0;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 135 int retry_flag;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 136 int ret = 0;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 137 unsigned int idx;
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 138 /* These sizes look to be limited by the FX2 firmware implementation */
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 139 u32 wrData[16];
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 140 u32 rdData[16];
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 141 struct pvr2_hdw *hdw = (struct pvr2_hdw *)ctxt;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 142
c05c0462da0e3a drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 143
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 144 /*
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 145
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 146 The encoder seems to speak entirely using blocks 32 bit words.
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 147 In ivtv driver terms, this is a mailbox at MBOX_BASE which we
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 148 populate with data and watch what the hardware does with it.
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 149 The first word is a set of flags used to control the
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 150 transaction, the second word is the command to execute, the
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 151 third byte is zero (ivtv driver suggests that this is some
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 152 kind of return value), and the fourth byte is a specified
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 153 timeout (windows driver always uses 0x00060000 except for one
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 154 case when it is zero). All successive words are the argument
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 155 words for the command.
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 156
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 157 First, write out the entire set of words, with the first word
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 158 being zero.
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 159
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 160 Next, write out just the first word again, but set it to
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 161 IVTV_MBOX_DRIVER_DONE | IVTV_DRIVER_BUSY this time (which
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 162 probably means "go").
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 163
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 164 Next, read back the return count words. Check the first word,
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 165 which should have IVTV_MBOX_FIRMWARE_DONE set. If however
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 166 that bit is not set, then the command isn't done so repeat the
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 167 read until it is set.
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 168
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 169 Finally, write out just the first word again, but set it to
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 170 0x0 this time (which probably means "idle").
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 171
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 172 */
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 173
eca8ebfc11d193 drivers/media/video/pvrusb2/pvrusb2-encoder.c Ahmed S. Darwish 2007-01-20 174 if (arg_cnt_send > (ARRAY_SIZE(wrData) - 4)) {
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 175 pvr2_trace(
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 176 PVR2_TRACE_ERROR_LEGS,
96292c89cf1fa7 drivers/media/usb/pvrusb2/pvrusb2-encoder.c Mauro Carvalho Chehab 2016-10-18 177 "Failed to write cx23416 command - too many input arguments (was given %u limit %lu)",
69b04f0dc1c489 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mauro Carvalho Chehab 2007-01-21 178 arg_cnt_send, (long unsigned) ARRAY_SIZE(wrData) - 4);
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 179 return -EINVAL;
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 180 }
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 181
eca8ebfc11d193 drivers/media/video/pvrusb2/pvrusb2-encoder.c Ahmed S. Darwish 2007-01-20 182 if (arg_cnt_recv > (ARRAY_SIZE(rdData) - 4)) {
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 183 pvr2_trace(
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 184 PVR2_TRACE_ERROR_LEGS,
96292c89cf1fa7 drivers/media/usb/pvrusb2/pvrusb2-encoder.c Mauro Carvalho Chehab 2016-10-18 185 "Failed to write cx23416 command - too many return arguments (was given %u limit %lu)",
69b04f0dc1c489 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mauro Carvalho Chehab 2007-01-21 186 arg_cnt_recv, (long unsigned) ARRAY_SIZE(rdData) - 4);
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 187 return -EINVAL;
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 188 }
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 189
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 190
1ad371deb9b0be drivers/media/usb/pvrusb2/pvrusb2-encoder.c Mauro Carvalho Chehab 2017-06-26 191 LOCK_TAKE(hdw->ctl_lock); while (1) {
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 192
681c739944018d drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-11-26 193 if (!hdw->state_encoder_ok) {
9a607f01b044dd drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-10-14 194 ret = -EIO;
9a607f01b044dd drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-10-14 195 break;
9a607f01b044dd drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-10-14 196 }
9a607f01b044dd drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-10-14 197
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 198 retry_flag = 0;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 199 try_count++;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 200 ret = 0;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 201 wrData[0] = 0;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 202 wrData[1] = cmd;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 203 wrData[2] = 0;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 204 wrData[3] = 0x00060000;
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 205 for (idx = 0; idx < arg_cnt_send; idx++) {
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 206 wrData[idx+4] = argp[idx];
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 207 }
eca8ebfc11d193 drivers/media/video/pvrusb2/pvrusb2-encoder.c Ahmed S. Darwish 2007-01-20 208 for (; idx < ARRAY_SIZE(wrData) - 4; idx++) {
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 209 wrData[idx+4] = 0;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 210 }
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 211
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 212 ret = pvr2_encoder_write_words(hdw,MBOX_BASE,wrData,idx);
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 213 if (ret) break;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 214 wrData[0] = IVTV_MBOX_DRIVER_DONE|IVTV_MBOX_DRIVER_BUSY;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 215 ret = pvr2_encoder_write_words(hdw,MBOX_BASE,wrData,1);
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 216 if (ret) break;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 217 poll_count = 0;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 218 while (1) {
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 219 poll_count++;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 220 ret = pvr2_encoder_read_words(hdw,MBOX_BASE,rdData,
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 221 arg_cnt_recv+4);
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 222 if (ret) {
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 223 break;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 224 }
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 225 if (rdData[0] & IVTV_MBOX_FIRMWARE_DONE) {
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 226 break;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 227 }
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 228 if (rdData[0] && (poll_count < 1000)) continue;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 229 if (!rdData[0]) {
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 230 retry_flag = !0;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 231 pvr2_trace(
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 232 PVR2_TRACE_ERROR_LEGS,
96292c89cf1fa7 drivers/media/usb/pvrusb2/pvrusb2-encoder.c Mauro Carvalho Chehab 2016-10-18 233 "Encoder timed out waiting for us; arranging to retry");
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 234 } else {
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 235 pvr2_trace(
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 236 PVR2_TRACE_ERROR_LEGS,
96292c89cf1fa7 drivers/media/usb/pvrusb2/pvrusb2-encoder.c Mauro Carvalho Chehab 2016-10-18 237 "***WARNING*** device's encoder appears to be stuck (status=0x%08x)",
96292c89cf1fa7 drivers/media/usb/pvrusb2/pvrusb2-encoder.c Mauro Carvalho Chehab 2016-10-18 238 rdData[0]);
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 239 }
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 240 pvr2_trace(
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 241 PVR2_TRACE_ERROR_LEGS,
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 242 "Encoder command: 0x%02x",cmd);
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 243 for (idx = 4; idx < arg_cnt_send; idx++) {
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 244 pvr2_trace(
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 245 PVR2_TRACE_ERROR_LEGS,
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 246 "Encoder arg%d: 0x%08x",
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 247 idx-3,wrData[idx]);
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 248 }
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 249 ret = -EBUSY;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 250 break;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 251 }
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 252 if (retry_flag) {
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 253 if (try_count < 20) continue;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 254 pvr2_trace(
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 255 PVR2_TRACE_ERROR_LEGS,
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 256 "Too many retries...");
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 257 ret = -EBUSY;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 258 }
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 259 if (ret) {
d913d6303072ca drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2008-04-06 260 del_timer_sync(&hdw->encoder_run_timer);
681c739944018d drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-11-26 261 hdw->state_encoder_ok = 0;
681c739944018d drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-11-26 262 pvr2_trace(PVR2_TRACE_STBITS,
681c739944018d drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-11-26 263 "State bit %s <-- %s",
681c739944018d drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-11-26 264 "state_encoder_ok",
681c739944018d drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-11-26 265 (hdw->state_encoder_ok ? "true" : "false"));
d913d6303072ca drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2008-04-06 266 if (hdw->state_encoder_runok) {
d913d6303072ca drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2008-04-06 267 hdw->state_encoder_runok = 0;
d913d6303072ca drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2008-04-06 268 pvr2_trace(PVR2_TRACE_STBITS,
d913d6303072ca drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2008-04-06 269 "State bit %s <-- %s",
d913d6303072ca drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2008-04-06 270 "state_encoder_runok",
d913d6303072ca drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2008-04-06 271 (hdw->state_encoder_runok ?
d913d6303072ca drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2008-04-06 272 "true" : "false"));
d913d6303072ca drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2008-04-06 273 }
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 274 pvr2_trace(
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 275 PVR2_TRACE_ERROR_LEGS,
96292c89cf1fa7 drivers/media/usb/pvrusb2/pvrusb2-encoder.c Mauro Carvalho Chehab 2016-10-18 276 "Giving up on command. This is normally recovered via a firmware reload and re-initialization; concern is only warranted if this happens repeatedly and rapidly.");
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 277 break;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 278 }
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 279 wrData[0] = 0x7;
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 280 for (idx = 0; idx < arg_cnt_recv; idx++) {
eacbe7c51f0fe7 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-25 281 argp[idx] = rdData[idx+4];
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 282 }
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 283
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 284 wrData[0] = 0x0;
c43000ef0c9f21 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2007-01-28 285 ret = pvr2_encoder_write_words(hdw,MBOX_BASE,wrData,1);
1ad371deb9b0be drivers/media/usb/pvrusb2/pvrusb2-encoder.c Mauro Carvalho Chehab 2017-06-26 286 break;
11c48e41d5fcc5 drivers/media/usb/pvrusb2/pvrusb2-encoder.c Ma Feng 2019-12-19 287 }
11c48e41d5fcc5 drivers/media/usb/pvrusb2/pvrusb2-encoder.c Ma Feng 2019-12-19 @288 LOCK_GIVE(hdw->ctl_lock);
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 289
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 290 return ret;
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 291 }
d855497edbfbf9 drivers/media/video/pvrusb2/pvrusb2-encoder.c Mike Isely 2006-06-26 292
:::::: The code at line 288 was first introduced by commit
:::::: 11c48e41d5fcc5b4cf17aa74388be128ca5444f8 media: pvrusb2: Remove unneeded semicolon and add newline
:::::: TO: Ma Feng <mafeng.ma(a)huawei.com>
:::::: CC: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[android-common:android12-5.10 3/3] arch/arm64/mm/fault.c:594:15: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 9e4d84273c9d786ee7592970f0a46c1c28eb3c18
commit: 9e4d84273c9d786ee7592970f0a46c1c28eb3c18 [3/3] ANDROID: Fix sparse warning in __handle_speculative_fault caused by SPF
config: arm64-randconfig-s032-20210818 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 9e4d84273c9d786ee7592970f0a46c1c28eb3c18
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
arch/arm64/mm/fault.c:494:31: sparse: sparse: incorrect type in return expression (different base types) @@ expected int @@ got restricted vm_fault_t @@
arch/arm64/mm/fault.c:494:31: sparse: expected int
arch/arm64/mm/fault.c:494:31: sparse: got restricted vm_fault_t
>> arch/arm64/mm/fault.c:594:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted vm_fault_t [assigned] [usertype] fault @@ got int @@
arch/arm64/mm/fault.c:594:15: sparse: expected restricted vm_fault_t [assigned] [usertype] fault
arch/arm64/mm/fault.c:594:15: sparse: got int
arch/arm64/mm/fault.c:623:13: sparse: sparse: restricted vm_fault_t degrades to integer
arch/arm64/mm/fault.c:623:13: sparse: sparse: restricted vm_fault_t degrades to integer
arch/arm64/mm/fault.c:666:39: sparse: sparse: restricted vm_fault_t degrades to integer
vim +594 arch/arm64/mm/fault.c
c49bd02f4c7412 Anshuman Khandual 2019-06-07 510
1ad9551f1d90e3 Peter Collingbourne 2021-01-22 511 static int __kprobes do_page_fault(unsigned long far, unsigned int esr,
1d18c47c735e8a Catalin Marinas 2012-03-05 512 struct pt_regs *regs)
1d18c47c735e8a Catalin Marinas 2012-03-05 513 {
2d2837fab5fada Eric W. Biederman 2018-09-22 514 const struct fault_info *inf;
61681036004318 Anshuman Khandual 2019-06-03 515 struct mm_struct *mm = current->mm;
6a1bb025d28e10 Peter Xu 2020-08-11 516 vm_fault_t fault;
6cb4d9a2870d20 Anshuman Khandual 2020-04-10 517 unsigned long vm_flags = VM_ACCESS_FLAGS;
dde1607248328c Peter Xu 2020-04-01 518 unsigned int mm_flags = FAULT_FLAG_DEFAULT;
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 519 struct vm_area_struct *vma = NULL;
1ad9551f1d90e3 Peter Collingbourne 2021-01-22 520 unsigned long addr = untagged_addr(far);
db6f41063cbdb5 Will Deacon 2013-07-19 521
b98cca444d287a Anshuman Khandual 2019-07-16 522 if (kprobe_page_fault(regs, esr))
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 523 return 0;
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 524
1d18c47c735e8a Catalin Marinas 2012-03-05 525 /*
1d18c47c735e8a Catalin Marinas 2012-03-05 526 * If we're in an interrupt or have no user context, we must not take
1d18c47c735e8a Catalin Marinas 2012-03-05 527 * the fault.
1d18c47c735e8a Catalin Marinas 2012-03-05 528 */
70ffdb9393a726 David Hildenbrand 2015-05-11 529 if (faulthandler_disabled() || !mm)
1d18c47c735e8a Catalin Marinas 2012-03-05 530 goto no_context;
1d18c47c735e8a Catalin Marinas 2012-03-05 531
759496ba6407c6 Johannes Weiner 2013-09-12 532 if (user_mode(regs))
759496ba6407c6 Johannes Weiner 2013-09-12 533 mm_flags |= FAULT_FLAG_USER;
759496ba6407c6 Johannes Weiner 2013-09-12 534
541ec870ef3143 Mark Rutland 2016-05-31 535 if (is_el0_instruction_abort(esr)) {
759496ba6407c6 Johannes Weiner 2013-09-12 536 vm_flags = VM_EXEC;
01de1776f62e64 Anshuman Khandual 2019-05-05 537 mm_flags |= FAULT_FLAG_INSTRUCTION;
c49bd02f4c7412 Anshuman Khandual 2019-06-07 538 } else if (is_write_abort(esr)) {
759496ba6407c6 Johannes Weiner 2013-09-12 539 vm_flags = VM_WRITE;
759496ba6407c6 Johannes Weiner 2013-09-12 540 mm_flags |= FAULT_FLAG_WRITE;
759496ba6407c6 Johannes Weiner 2013-09-12 541 }
759496ba6407c6 Johannes Weiner 2013-09-12 542
356607f21e6035 Andrey Konovalov 2018-12-28 543 if (is_ttbr0_addr(addr) && is_el1_permission_fault(addr, esr, regs)) {
e19a6ee2460bdd James Morse 2016-06-20 544 /* regs->orig_addr_limit may be 0 if we entered from EL0 */
e19a6ee2460bdd James Morse 2016-06-20 545 if (regs->orig_addr_limit == KERNEL_DS)
c870f14ea115bb Mark Rutland 2018-05-21 546 die_kernel_fault("access to user memory with fs=KERNEL_DS",
c870f14ea115bb Mark Rutland 2018-05-21 547 addr, esr, regs);
705441960033e6 James Morse 2016-02-05 548
9adeb8e72dbfe9 Laura Abbott 2016-08-09 549 if (is_el1_instruction_abort(esr))
c870f14ea115bb Mark Rutland 2018-05-21 550 die_kernel_fault("execution of user memory",
c870f14ea115bb Mark Rutland 2018-05-21 551 addr, esr, regs);
9adeb8e72dbfe9 Laura Abbott 2016-08-09 552
57f4959bad0a15 James Morse 2016-02-05 553 if (!search_exception_tables(regs->pc))
c870f14ea115bb Mark Rutland 2018-05-21 554 die_kernel_fault("access to user memory outside uaccess routines",
c870f14ea115bb Mark Rutland 2018-05-21 555 addr, esr, regs);
57f4959bad0a15 James Morse 2016-02-05 556 }
338d4f49d6f711 James Morse 2015-07-22 557
0e3a9026396cd7 Punit Agrawal 2017-06-08 558 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, addr);
0e3a9026396cd7 Punit Agrawal 2017-06-08 559
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 560 /*
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 561 * let's try a speculative page fault without grabbing the
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 562 * mmap_sem.
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 563 */
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 564 fault = handle_speculative_fault(mm, addr, mm_flags, &vma);
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 565 if (fault != VM_FAULT_RETRY)
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 566 goto done;
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 567
1d18c47c735e8a Catalin Marinas 2012-03-05 568 /*
1d18c47c735e8a Catalin Marinas 2012-03-05 569 * As per x86, we may deadlock here. However, since the kernel only
1d18c47c735e8a Catalin Marinas 2012-03-05 570 * validly references user space from well defined areas of the code,
1d18c47c735e8a Catalin Marinas 2012-03-05 571 * we can bug out early if this is from code which shouldn't.
1d18c47c735e8a Catalin Marinas 2012-03-05 572 */
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 573 if (!mmap_read_trylock(mm)) {
1d18c47c735e8a Catalin Marinas 2012-03-05 574 if (!user_mode(regs) && !search_exception_tables(regs->pc))
1d18c47c735e8a Catalin Marinas 2012-03-05 575 goto no_context;
1d18c47c735e8a Catalin Marinas 2012-03-05 576 retry:
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 577 mmap_read_lock(mm);
1d18c47c735e8a Catalin Marinas 2012-03-05 578 } else {
1d18c47c735e8a Catalin Marinas 2012-03-05 579 /*
1d18c47c735e8a Catalin Marinas 2012-03-05 580 * The above down_read_trylock() might have succeeded in which
1d18c47c735e8a Catalin Marinas 2012-03-05 581 * case, we'll have missed the might_sleep() from down_read().
1d18c47c735e8a Catalin Marinas 2012-03-05 582 */
1d18c47c735e8a Catalin Marinas 2012-03-05 583 might_sleep();
1d18c47c735e8a Catalin Marinas 2012-03-05 584 #ifdef CONFIG_DEBUG_VM
a0509313d5dea0 Anshuman Khandual 2019-06-03 585 if (!user_mode(regs) && !search_exception_tables(regs->pc)) {
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 586 mmap_read_unlock(mm);
1d18c47c735e8a Catalin Marinas 2012-03-05 587 goto no_context;
a0509313d5dea0 Anshuman Khandual 2019-06-03 588 }
1d18c47c735e8a Catalin Marinas 2012-03-05 589 #endif
1d18c47c735e8a Catalin Marinas 2012-03-05 590 }
1d18c47c735e8a Catalin Marinas 2012-03-05 591
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 592 if (!vma || !can_reuse_spf_vma(vma, addr))
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 593 vma = find_vma(mm, addr);
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 @594 fault = __do_page_fault(vma, addr, mm_flags, vm_flags, regs);
1d18c47c735e8a Catalin Marinas 2012-03-05 595
b502f038f2ffc9 Peter Xu 2020-04-01 596 /* Quick path to respond to signals */
b502f038f2ffc9 Peter Xu 2020-04-01 597 if (fault_signal_pending(fault, regs)) {
289d07a2dc6c6b Mark Rutland 2017-07-11 598 if (!user_mode(regs))
289d07a2dc6c6b Mark Rutland 2017-07-11 599 goto no_context;
1d18c47c735e8a Catalin Marinas 2012-03-05 600 return 0;
289d07a2dc6c6b Mark Rutland 2017-07-11 601 }
1d18c47c735e8a Catalin Marinas 2012-03-05 602
b502f038f2ffc9 Peter Xu 2020-04-01 603 if (fault & VM_FAULT_RETRY) {
0e3a9026396cd7 Punit Agrawal 2017-06-08 604 if (mm_flags & FAULT_FLAG_ALLOW_RETRY) {
569ba74a7ba69f Mark Salyzyn 2015-09-21 605 mm_flags |= FAULT_FLAG_TRIED;
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 606
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 607 /*
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 608 * Do not try to reuse this vma and fetch it
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 609 * again since we will release the mmap_sem.
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 610 */
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 611 vma = NULL;
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 612
1d18c47c735e8a Catalin Marinas 2012-03-05 613 goto retry;
1d18c47c735e8a Catalin Marinas 2012-03-05 614 }
1d18c47c735e8a Catalin Marinas 2012-03-05 615 }
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 616 mmap_read_unlock(mm);
1d18c47c735e8a Catalin Marinas 2012-03-05 617
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 618 done:
2fd69fa6bcab98 Mahendran Ganesh 2018-05-04 619
1d18c47c735e8a Catalin Marinas 2012-03-05 620 /*
0e3a9026396cd7 Punit Agrawal 2017-06-08 621 * Handle the "normal" (no error) case first.
1d18c47c735e8a Catalin Marinas 2012-03-05 622 */
1d18c47c735e8a Catalin Marinas 2012-03-05 623 if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP |
6a1bb025d28e10 Peter Xu 2020-08-11 624 VM_FAULT_BADACCESS))))
1d18c47c735e8a Catalin Marinas 2012-03-05 625 return 0;
1d18c47c735e8a Catalin Marinas 2012-03-05 626
871341023c771a Johannes Weiner 2013-09-12 627 /*
871341023c771a Johannes Weiner 2013-09-12 628 * If we are in kernel mode at this point, we have no context to
871341023c771a Johannes Weiner 2013-09-12 629 * handle this fault with.
871341023c771a Johannes Weiner 2013-09-12 630 */
871341023c771a Johannes Weiner 2013-09-12 631 if (!user_mode(regs))
871341023c771a Johannes Weiner 2013-09-12 632 goto no_context;
871341023c771a Johannes Weiner 2013-09-12 633
1d18c47c735e8a Catalin Marinas 2012-03-05 634 if (fault & VM_FAULT_OOM) {
1d18c47c735e8a Catalin Marinas 2012-03-05 635 /*
1d18c47c735e8a Catalin Marinas 2012-03-05 636 * We ran out of memory, call the OOM killer, and return to
1d18c47c735e8a Catalin Marinas 2012-03-05 637 * userspace (which will retry the fault, or kill us if we got
1d18c47c735e8a Catalin Marinas 2012-03-05 638 * oom-killed).
1d18c47c735e8a Catalin Marinas 2012-03-05 639 */
1d18c47c735e8a Catalin Marinas 2012-03-05 640 pagefault_out_of_memory();
1d18c47c735e8a Catalin Marinas 2012-03-05 641 return 0;
1d18c47c735e8a Catalin Marinas 2012-03-05 642 }
1d18c47c735e8a Catalin Marinas 2012-03-05 643
2d2837fab5fada Eric W. Biederman 2018-09-22 644 inf = esr_to_fault_info(esr);
559d8d91a89cc2 Eric W. Biederman 2018-09-22 645 set_thread_esr(addr, esr);
1d18c47c735e8a Catalin Marinas 2012-03-05 646 if (fault & VM_FAULT_SIGBUS) {
1d18c47c735e8a Catalin Marinas 2012-03-05 647 /*
1d18c47c735e8a Catalin Marinas 2012-03-05 648 * We had some memory, but were unable to successfully fix up
1d18c47c735e8a Catalin Marinas 2012-03-05 649 * this page fault.
1d18c47c735e8a Catalin Marinas 2012-03-05 650 */
1ad9551f1d90e3 Peter Collingbourne 2021-01-22 651 arm64_force_sig_fault(SIGBUS, BUS_ADRERR, far, inf->name);
9ea3a9743cac4f Eric W. Biederman 2018-09-22 652 } else if (fault & (VM_FAULT_HWPOISON_LARGE | VM_FAULT_HWPOISON)) {
9ea3a9743cac4f Eric W. Biederman 2018-09-22 653 unsigned int lsb;
9ea3a9743cac4f Eric W. Biederman 2018-09-22 654
9ea3a9743cac4f Eric W. Biederman 2018-09-22 655 lsb = PAGE_SHIFT;
9ea3a9743cac4f Eric W. Biederman 2018-09-22 656 if (fault & VM_FAULT_HWPOISON_LARGE)
9ea3a9743cac4f Eric W. Biederman 2018-09-22 657 lsb = hstate_index_to_shift(VM_FAULT_GET_HINDEX(fault));
92ff0674f5d801 Will Deacon 2018-02-20 658
1ad9551f1d90e3 Peter Collingbourne 2021-01-22 659 arm64_force_sig_mceerr(BUS_MCEERR_AR, far, lsb, inf->name);
1d18c47c735e8a Catalin Marinas 2012-03-05 660 } else {
1d18c47c735e8a Catalin Marinas 2012-03-05 661 /*
1d18c47c735e8a Catalin Marinas 2012-03-05 662 * Something tried to access memory that isn't in our memory
1d18c47c735e8a Catalin Marinas 2012-03-05 663 * map.
1d18c47c735e8a Catalin Marinas 2012-03-05 664 */
feca355b3d8eba Eric W. Biederman 2018-09-22 665 arm64_force_sig_fault(SIGSEGV,
feca355b3d8eba Eric W. Biederman 2018-09-22 666 fault == VM_FAULT_BADACCESS ? SEGV_ACCERR : SEGV_MAPERR,
1ad9551f1d90e3 Peter Collingbourne 2021-01-22 667 far, inf->name);
1d18c47c735e8a Catalin Marinas 2012-03-05 668 }
1d18c47c735e8a Catalin Marinas 2012-03-05 669
1d18c47c735e8a Catalin Marinas 2012-03-05 670 return 0;
1d18c47c735e8a Catalin Marinas 2012-03-05 671
1d18c47c735e8a Catalin Marinas 2012-03-05 672 no_context:
67ce16ec15ce9d Kristina Martsenko 2017-06-09 673 __do_kernel_fault(addr, esr, regs);
1d18c47c735e8a Catalin Marinas 2012-03-05 674 return 0;
1d18c47c735e8a Catalin Marinas 2012-03-05 675 }
1d18c47c735e8a Catalin Marinas 2012-03-05 676
:::::: The code at line 594 was first introduced by commit
:::::: 2fd69fa6bcab984b56ccfd4860b10f11f1966bed FROMLIST: arm64/mm: add speculative page fault
:::::: TO: Mahendran Ganesh <opensource.ganesh(a)gmail.com>
:::::: CC: Suren Baghdasaryan <surenb(a)google.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 7181/8804] fs/fat/fat_test.c:23:8: warning: Excessive padding in 'struct fat_timestamp_testcase' (11 padding bytes, where 3 is optimal).
by kernel test robot
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: f26c3abc432a2026ba9ee7767061a1f88aead6ec
commit: b0d4adaf3b3c4402d9c3b6186e02aa1e4f7985cd [7181/8804] fat: Add
KUnit tests for checksums and timestamps
:::::: branch date: 19 hours ago
:::::: commit date: 5 days ago
config: riscv-randconfig-c006-20210818 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project
d2b574a4dea5b718e4386bf2e26af0126e5978ce)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout b0d4adaf3b3c4402d9c3b6186e02aa1e4f7985cd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross
ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^
drivers/tty/serial/serial_core.c:2719:2: note: Returning from
'uart_get_info'
uart_get_info(port, &tmp);
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/serial_core.c:2720:9: note: 3rd function call
argument is an uninitialized value
return sprintf(buf, "0x%lX\n", (unsigned long)tmp.iomem_base);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/serial_core.c:2730:9: warning: 3rd function call
argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
return sprintf(buf, "%d\n", tmp.iomem_reg_shift);
^ ~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/serial_core.c:2729:2: note: Calling 'uart_get_info'
uart_get_info(port, &tmp);
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/serial_core.c:734:29: note: Left side of '&&' is
false
struct uart_state *state = container_of(port, struct
uart_state, port);
^
include/linux/kernel.h:495:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member)
&& \
^
drivers/tty/serial/serial_core.c:734:29: note: Taking false branch
struct uart_state *state = container_of(port, struct
uart_state, port);
^
include/linux/kernel.h:495:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member)
&& \
^
include/linux/build_bug.h:39:37: note: expanded from macro
'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
include/linux/compiler_types.h:328:2: note: expanded from macro
'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
^
include/linux/compiler_types.h:316:2: note: expanded from macro
'_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:308:3: note: expanded from macro
'__compiletime_assert'
if (!(condition))
\
^
drivers/tty/serial/serial_core.c:734:29: note: Loop condition is
false. Exiting loop
struct uart_state *state = container_of(port, struct
uart_state, port);
^
include/linux/kernel.h:495:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member)
&& \
^
include/linux/build_bug.h:39:37: note: expanded from macro
'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
include/linux/compiler_types.h:328:2: note: expanded from macro
'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
^
include/linux/compiler_types.h:316:2: note: expanded from macro
'_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:306:2: note: expanded from macro
'__compiletime_assert'
do {
\
^
drivers/tty/serial/serial_core.c:744:6: note: Assuming 'uport' is null
if (!uport)
^~~~~~
drivers/tty/serial/serial_core.c:744:2: note: Taking true branch
if (!uport)
^
drivers/tty/serial/serial_core.c:745:3: note: Control jumps to line 768
goto out;
^
drivers/tty/serial/serial_core.c:769:2: note: Returning without
writing to 'retinfo->iomem_reg_shift'
return ret;
^
drivers/tty/serial/serial_core.c:2729:2: note: Returning from
'uart_get_info'
uart_get_info(port, &tmp);
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/tty/serial/serial_core.c:2730:9: note: 3rd function call
argument is an uninitialized value
return sprintf(buf, "%d\n", tmp.iomem_reg_shift);
^ ~~~~~~~~~~~~~~~~~~~
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
5 warnings generated.
>> fs/fat/fat_test.c:23:8: warning: Excessive padding in 'struct
fat_timestamp_testcase' (11 padding bytes, where 3 is optimal).
Optimal fields order:
ts,
name,
time_offset,
time,
date,
cs,
consider reordering the fields or adding explicit padding members
[clang-analyzer-optin.performance.Padding]
struct fat_timestamp_testcase {
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
fs/fat/fat_test.c:23:8: note: Excessive padding in 'struct
fat_timestamp_testcase' (11 padding bytes, where 3 is optimal). Optimal
fields order: ts, name, time_offset, time, date, cs, consider reordering
the fields or adding explicit padding members
struct fat_timestamp_testcase {
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
6 warnings generated.
fs/exfat/inode.c:148:3: warning: Value stored to 'clu_offset' is
never read [clang-analyzer-deadcode.DeadStores]
clu_offset -= fclus;
^ ~~~~~
fs/exfat/inode.c:148:3: note: Value stored to 'clu_offset' is never read
clu_offset -= fclus;
^ ~~~~~
fs/exfat/inode.c:217:3: warning: Value stored to 'num_clusters' is
never read [clang-analyzer-deadcode.DeadStores]
num_clusters += num_to_be_allocated;
^ ~~~~~~~~~~~~~~~~~~~
fs/exfat/inode.c:217:3: note: Value stored to 'num_clusters' is
never read
num_clusters += num_to_be_allocated;
^ ~~~~~~~~~~~~~~~~~~~
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers.
Use -system-headers to display errors from system headers as well.
5 warnings generated.
fs/exfat/dir.c:92:22: warning: The result of the right shift is
undefined because the right operand is negative
[clang-analyzer-core.UndefinedBinaryOperatorResult]
clu_offset = dentry >> dentries_per_clu_bits;
^
fs/exfat/dir.c:232:2: note: Taking false branch
if (!dir_emit_dots(filp, ctx))
^
fs/exfat/dir.c:235:6: note: Assuming field 'pos' is equal to
ITER_POS_FILLED_DOTS
if (ctx->pos == ITER_POS_FILLED_DOTS) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/exfat/dir.c:235:2: note: Taking true branch
if (ctx->pos == ITER_POS_FILLED_DOTS) {
^
fs/exfat/dir.c:240:2: note: Taking false branch
if (cpos & (DENTRY_SIZE - 1)) {
^
fs/exfat/dir.c:247:6: note: 'err' is 0
if (err)
^~~
fs/exfat/dir.c:247:2: note: Taking false branch
if (err)
^
fs/exfat/dir.c:250:6: note: Assuming field 'flags' is not equal to
ALLOC_NO_FAT_CHAIN
if (ei->flags == ALLOC_NO_FAT_CHAIN && cpos >=
i_size_read(inode))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/exfat/dir.c:250:38: note: Left side of '&&' is false
if (ei->flags == ALLOC_NO_FAT_CHAIN && cpos >=
i_size_read(inode))
^
fs/exfat/dir.c:253:8: note: Calling 'exfat_readdir'
err = exfat_readdir(inode, &cpos, &de);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/exfat/dir.c:78:6: note: Assuming field 'type' is equal to TYPE_DIR
if (ei->type != TYPE_DIR)
^~~~~~~~~~~~~~~~~~~~
fs/exfat/dir.c:78:2: note: Taking false branch
if (ei->type != TYPE_DIR)
^
fs/exfat/dir.c:81:6: note: Assuming the condition is true
if (ei->entry == -1)
^~~~~~~~~~~~~~~
fs/exfat/dir.c:81:2: note: Taking true branch
if (ei->entry == -1)
^
fs/exfat/dir.c:88:26: note: '?' condition is false
dentries_per_clu_bits = ilog2(dentries_per_clu);
^
include/linux/log2.h:158:2: note: expanded from macro 'ilog2'
__builtin_constant_p(n) ? \
^
fs/exfat/dir.c:88:26: note: '?' condition is true
dentries_per_clu_bits = ilog2(dentries_per_clu);
^
include/linux/log2.h:161:2: note: expanded from macro 'ilog2'
(sizeof(n) <= 4) ? \
^
fs/exfat/dir.c:88:26: note: Calling '__ilog2_u32'
dentries_per_clu_bits = ilog2(dentries_per_clu);
^
include/linux/log2.h:162:2: note: expanded from macro 'ilog2'
__ilog2_u32(n) : \
^~~~~~~~~~~~~~
include/linux/log2.h:24:2: note: Returning the value -1
return fls(n) - 1;
^~~~~~~~~~~~~~~~~
fs/exfat/dir.c:88:26: note: Returning from '__ilog2_u32'
dentries_per_clu_bits = ilog2(dentries_per_clu);
^
vim +23 fs/fat/fat_test.c
b0d4adaf3b3c44 David Gow 2021-04-15 22
b0d4adaf3b3c44 David Gow 2021-04-15 @23 struct fat_timestamp_testcase {
b0d4adaf3b3c44 David Gow 2021-04-15 24 const char *name;
b0d4adaf3b3c44 David Gow 2021-04-15 25 struct timespec64 ts;
b0d4adaf3b3c44 David Gow 2021-04-15 26 __le16 time;
b0d4adaf3b3c44 David Gow 2021-04-15 27 __le16 date;
b0d4adaf3b3c44 David Gow 2021-04-15 28 u8 cs;
b0d4adaf3b3c44 David Gow 2021-04-15 29 int time_offset;
b0d4adaf3b3c44 David Gow 2021-04-15 30 };
b0d4adaf3b3c44 David Gow 2021-04-15 31
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH net-next v2] net: ipvs: add sysctl_run_estimation to support disable estimation
by kernel test robot
Hi Dust,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Dust-Li/net-ipvs-add-sysctl_run_...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 19b8ece42c56aaa122f7e91eb391bb3dd7e193cd
config: ia64-randconfig-r024-20210818 (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.0
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
# https://github.com/0day-ci/linux/commit/8f0f8c6b2f04fe397ca8df17353590cdd...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dust-Li/net-ipvs-add-sysctl_run_estimation-to-support-disable-estimation/20210819-125335
git checkout 8f0f8c6b2f04fe397ca8df17353590cdd2f5a414
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash net/netfilter/ipvs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/ia64/include/asm/pgtable.h:153,
from include/linux/pgtable.h:6,
from arch/ia64/include/asm/uaccess.h:40,
from include/linux/uaccess.h:11,
from include/net/checksum.h:21,
from include/net/ip_vs.h:23,
from net/netfilter/ipvs/ip_vs_lc.c:18:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:127:48: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
In file included from net/netfilter/ipvs/ip_vs_lc.c:18:
include/net/ip_vs.h: At top level:
>> include/net/ip_vs.h:1660:19: error: redefinition of 'sysctl_run_estimation'
1660 | static inline int sysctl_run_estimation(struct netns_ipvs *ipvs)
| ^~~~~~~~~~~~~~~~~~~~~
include/net/ip_vs.h:1075:19: note: previous definition of 'sysctl_run_estimation' with type 'int(struct netns_ipvs *)'
1075 | static inline int sysctl_run_estimation(struct netns_ipvs *ipvs)
| ^~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/ia64/include/asm/pgtable.h:153,
from include/linux/pgtable.h:6,
from include/linux/mm.h:33,
from include/linux/bvec.h:14,
from include/linux/skbuff.h:17,
from include/linux/ip.h:16,
from net/netfilter/ipvs/ip_vs_core.c:27:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:127:48: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
In file included from net/netfilter/ipvs/ip_vs_core.c:52:
include/net/ip_vs.h: At top level:
>> include/net/ip_vs.h:1660:19: error: redefinition of 'sysctl_run_estimation'
1660 | static inline int sysctl_run_estimation(struct netns_ipvs *ipvs)
| ^~~~~~~~~~~~~~~~~~~~~
include/net/ip_vs.h:1075:19: note: previous definition of 'sysctl_run_estimation' with type 'int(struct netns_ipvs *)'
1075 | static inline int sysctl_run_estimation(struct netns_ipvs *ipvs)
| ^~~~~~~~~~~~~~~~~~~~~
net/netfilter/ipvs/ip_vs_core.c: In function 'ip_vs_in_icmp':
net/netfilter/ipvs/ip_vs_core.c:1643:15: warning: variable 'outer_proto' set but not used [-Wunused-but-set-variable]
1643 | char *outer_proto = "IPIP";
| ^~~~~~~~~~~
vim +/sysctl_run_estimation +1660 include/net/ip_vs.h
1659
> 1660 static inline int sysctl_run_estimation(struct netns_ipvs *ipvs)
1661 {
1662 return 1;
1663 }
1664
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month