[PATCH] crypto: sa2ul: fix odd_ptr_err.cocci warnings
by Julia Lawall
From: kernel test robot <lkp(a)intel.com>
PTR_ERR should normally access the value just tested by IS_ERR
Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci
Fixes: 5b8516f3bedb ("crypto: sa2ul: Add crypto driver")
CC: Keerthy <j-keerthy(a)ti.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: Julia Lawall <julia.lawall(a)inria.fr>
---
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head: 134a1b1f8814115e2dd115b67082321bf9e63cc1
commit: 5b8516f3bedb3e1c273e7747b6e4a85c6e47907a [2369/7050] crypto: sa2ul: Add crypto driver
:::::: branch date: 3 hours ago
:::::: commit date: 5 months ago
sa2ul.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/crypto/sa2ul.c
+++ b/drivers/crypto/sa2ul.c
@@ -1252,14 +1252,14 @@ static int sa_dma_init(struct sa_crypto_
dd->dma_rx2 = dma_request_chan(dd->dev, "rx2");
if (IS_ERR(dd->dma_rx2)) {
dma_release_channel(dd->dma_rx1);
- if (PTR_ERR(dd->dma_rx1) != -EPROBE_DEFER)
+ if (PTR_ERR(dd->dma_rx2) != -EPROBE_DEFER)
dev_err(dd->dev, "Unable to request rx2 DMA channel\n");
return PTR_ERR(dd->dma_rx2);
}
dd->dma_tx = dma_request_chan(dd->dev, "tx");
if (IS_ERR(dd->dma_tx)) {
- if (PTR_ERR(dd->dma_rx1) != -EPROBE_DEFER)
+ if (PTR_ERR(dd->dma_tx) != -EPROBE_DEFER)
dev_err(dd->dev, "Unable to request tx DMA channel\n");
ret = PTR_ERR(dd->dma_tx);
goto err_dma_tx;
2 years, 3 months
drivers/soc/fsl/qe/qe_tdm.c:63 ucc_of_parse_tdm() warn: inconsistent indenting
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1b5044021070efa3259f3e9548dc35d1eb6aa844
commit: 5a35435ef4e6e4bd2aabd6706b146b298a9cffe5 soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE
date: 6 months ago
config: arm-randconfig-m031-20200618 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 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/soc/fsl/qe/qe_tdm.c:63 ucc_of_parse_tdm() warn: inconsistent indenting
vim +63 drivers/soc/fsl/qe/qe_tdm.c
35ef1c20fdb267 Zhao Qiang 2016-06-06 36
35ef1c20fdb267 Zhao Qiang 2016-06-06 37 int ucc_of_parse_tdm(struct device_node *np, struct ucc_tdm *utdm,
35ef1c20fdb267 Zhao Qiang 2016-06-06 38 struct ucc_tdm_info *ut_info)
35ef1c20fdb267 Zhao Qiang 2016-06-06 39 {
35ef1c20fdb267 Zhao Qiang 2016-06-06 40 const char *sprop;
35ef1c20fdb267 Zhao Qiang 2016-06-06 41 int ret = 0;
35ef1c20fdb267 Zhao Qiang 2016-06-06 42 u32 val;
35ef1c20fdb267 Zhao Qiang 2016-06-06 43
35ef1c20fdb267 Zhao Qiang 2016-06-06 44 sprop = of_get_property(np, "fsl,rx-sync-clock", NULL);
35ef1c20fdb267 Zhao Qiang 2016-06-06 45 if (sprop) {
35ef1c20fdb267 Zhao Qiang 2016-06-06 46 ut_info->uf_info.rx_sync = qe_clock_source(sprop);
35ef1c20fdb267 Zhao Qiang 2016-06-06 47 if ((ut_info->uf_info.rx_sync < QE_CLK_NONE) ||
35ef1c20fdb267 Zhao Qiang 2016-06-06 48 (ut_info->uf_info.rx_sync > QE_RSYNC_PIN)) {
35ef1c20fdb267 Zhao Qiang 2016-06-06 49 pr_err("QE-TDM: Invalid rx-sync-clock property\n");
35ef1c20fdb267 Zhao Qiang 2016-06-06 50 return -EINVAL;
35ef1c20fdb267 Zhao Qiang 2016-06-06 51 }
35ef1c20fdb267 Zhao Qiang 2016-06-06 52 } else {
35ef1c20fdb267 Zhao Qiang 2016-06-06 53 pr_err("QE-TDM: Invalid rx-sync-clock property\n");
35ef1c20fdb267 Zhao Qiang 2016-06-06 54 return -EINVAL;
35ef1c20fdb267 Zhao Qiang 2016-06-06 55 }
35ef1c20fdb267 Zhao Qiang 2016-06-06 56
35ef1c20fdb267 Zhao Qiang 2016-06-06 57 sprop = of_get_property(np, "fsl,tx-sync-clock", NULL);
35ef1c20fdb267 Zhao Qiang 2016-06-06 58 if (sprop) {
35ef1c20fdb267 Zhao Qiang 2016-06-06 59 ut_info->uf_info.tx_sync = qe_clock_source(sprop);
35ef1c20fdb267 Zhao Qiang 2016-06-06 60 if ((ut_info->uf_info.tx_sync < QE_CLK_NONE) ||
35ef1c20fdb267 Zhao Qiang 2016-06-06 61 (ut_info->uf_info.tx_sync > QE_TSYNC_PIN)) {
35ef1c20fdb267 Zhao Qiang 2016-06-06 62 pr_err("QE-TDM: Invalid tx-sync-clock property\n");
35ef1c20fdb267 Zhao Qiang 2016-06-06 @63 return -EINVAL;
35ef1c20fdb267 Zhao Qiang 2016-06-06 64 }
35ef1c20fdb267 Zhao Qiang 2016-06-06 65 } else {
35ef1c20fdb267 Zhao Qiang 2016-06-06 66 pr_err("QE-TDM: Invalid tx-sync-clock property\n");
35ef1c20fdb267 Zhao Qiang 2016-06-06 67 return -EINVAL;
35ef1c20fdb267 Zhao Qiang 2016-06-06 68 }
35ef1c20fdb267 Zhao Qiang 2016-06-06 69
35ef1c20fdb267 Zhao Qiang 2016-06-06 70 ret = of_property_read_u32_index(np, "fsl,tx-timeslot-mask", 0, &val);
35ef1c20fdb267 Zhao Qiang 2016-06-06 71 if (ret) {
35ef1c20fdb267 Zhao Qiang 2016-06-06 72 pr_err("QE-TDM: Invalid tx-timeslot-mask property\n");
35ef1c20fdb267 Zhao Qiang 2016-06-06 73 return -EINVAL;
35ef1c20fdb267 Zhao Qiang 2016-06-06 74 }
35ef1c20fdb267 Zhao Qiang 2016-06-06 75 utdm->tx_ts_mask = val;
35ef1c20fdb267 Zhao Qiang 2016-06-06 76
35ef1c20fdb267 Zhao Qiang 2016-06-06 77 ret = of_property_read_u32_index(np, "fsl,rx-timeslot-mask", 0, &val);
35ef1c20fdb267 Zhao Qiang 2016-06-06 78 if (ret) {
35ef1c20fdb267 Zhao Qiang 2016-06-06 79 ret = -EINVAL;
35ef1c20fdb267 Zhao Qiang 2016-06-06 80 pr_err("QE-TDM: Invalid rx-timeslot-mask property\n");
35ef1c20fdb267 Zhao Qiang 2016-06-06 81 return ret;
35ef1c20fdb267 Zhao Qiang 2016-06-06 82 }
35ef1c20fdb267 Zhao Qiang 2016-06-06 83 utdm->rx_ts_mask = val;
35ef1c20fdb267 Zhao Qiang 2016-06-06 84
35ef1c20fdb267 Zhao Qiang 2016-06-06 85 ret = of_property_read_u32_index(np, "fsl,tdm-id", 0, &val);
35ef1c20fdb267 Zhao Qiang 2016-06-06 86 if (ret) {
35ef1c20fdb267 Zhao Qiang 2016-06-06 87 ret = -EINVAL;
35ef1c20fdb267 Zhao Qiang 2016-06-06 88 pr_err("QE-TDM: No fsl,tdm-id property for this UCC\n");
35ef1c20fdb267 Zhao Qiang 2016-06-06 89 return ret;
35ef1c20fdb267 Zhao Qiang 2016-06-06 90 }
35ef1c20fdb267 Zhao Qiang 2016-06-06 91 utdm->tdm_port = val;
35ef1c20fdb267 Zhao Qiang 2016-06-06 92 ut_info->uf_info.tdm_num = utdm->tdm_port;
35ef1c20fdb267 Zhao Qiang 2016-06-06 93
74c269f69cdae8 Julia Lawall 2016-08-05 94 if (of_property_read_bool(np, "fsl,tdm-internal-loopback"))
35ef1c20fdb267 Zhao Qiang 2016-06-06 95 utdm->tdm_mode = TDM_INTERNAL_LOOPBACK;
35ef1c20fdb267 Zhao Qiang 2016-06-06 96 else
35ef1c20fdb267 Zhao Qiang 2016-06-06 97 utdm->tdm_mode = TDM_NORMAL;
35ef1c20fdb267 Zhao Qiang 2016-06-06 98
35ef1c20fdb267 Zhao Qiang 2016-06-06 99 sprop = of_get_property(np, "fsl,tdm-framer-type", NULL);
35ef1c20fdb267 Zhao Qiang 2016-06-06 100 if (!sprop) {
35ef1c20fdb267 Zhao Qiang 2016-06-06 101 ret = -EINVAL;
35ef1c20fdb267 Zhao Qiang 2016-06-06 102 pr_err("QE-TDM: No tdm-framer-type property for UCC\n");
35ef1c20fdb267 Zhao Qiang 2016-06-06 103 return ret;
35ef1c20fdb267 Zhao Qiang 2016-06-06 104 }
35ef1c20fdb267 Zhao Qiang 2016-06-06 105 ret = set_tdm_framer(sprop);
35ef1c20fdb267 Zhao Qiang 2016-06-06 106 if (ret < 0)
35ef1c20fdb267 Zhao Qiang 2016-06-06 107 return -EINVAL;
35ef1c20fdb267 Zhao Qiang 2016-06-06 108 utdm->tdm_framer_type = ret;
35ef1c20fdb267 Zhao Qiang 2016-06-06 109
35ef1c20fdb267 Zhao Qiang 2016-06-06 110 ret = of_property_read_u32_index(np, "fsl,siram-entry-id", 0, &val);
35ef1c20fdb267 Zhao Qiang 2016-06-06 111 if (ret) {
35ef1c20fdb267 Zhao Qiang 2016-06-06 112 ret = -EINVAL;
35ef1c20fdb267 Zhao Qiang 2016-06-06 113 pr_err("QE-TDM: No siram entry id for UCC\n");
35ef1c20fdb267 Zhao Qiang 2016-06-06 114 return ret;
35ef1c20fdb267 Zhao Qiang 2016-06-06 115 }
35ef1c20fdb267 Zhao Qiang 2016-06-06 116 utdm->siram_entry_id = val;
35ef1c20fdb267 Zhao Qiang 2016-06-06 117
35ef1c20fdb267 Zhao Qiang 2016-06-06 118 set_si_param(utdm, ut_info);
35ef1c20fdb267 Zhao Qiang 2016-06-06 119 return ret;
35ef1c20fdb267 Zhao Qiang 2016-06-06 120 }
4ba251626ff1ac Valentin Longchamp 2017-02-17 121 EXPORT_SYMBOL(ucc_of_parse_tdm);
35ef1c20fdb267 Zhao Qiang 2016-06-06 122
:::::: The code at line 63 was first introduced by commit
:::::: 35ef1c20fdb26779b6c3c4fd74bbdd5028e70005 fsl/qe: Add QE TDM lib
:::::: TO: Zhao Qiang <qiang.zhao(a)nxp.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[mlankhorst:locking-rework 26/27] drivers/gpu/drm/i915/i915_vma.c:1011:30: error: implicit declaration of function 'lockdep_is_held'
by kernel test robot
tree: git://people.freedesktop.org/~mlankhorst/linux locking-rework
head: 500c1dc1795a3abb508252aef3fbbef0053f84d4
commit: 0be88c62774a10ec2522a9121affa316b9cb4b4b [26/27] drm/i915: Ensure we hold the pin mutex
config: x86_64-defconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 0be88c62774a10ec2522a9121affa316b9cb4b4b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
vim +/lockdep_is_held +1011 drivers/gpu/drm/i915/i915_vma.c
1002
1003 int i915_ggtt_pin(struct i915_vma *vma, struct i915_gem_ww_ctx *ww,
1004 u32 align, unsigned int flags)
1005 {
1006 struct i915_address_space *vm = vma->vm;
1007 int err;
1008
1009 GEM_BUG_ON(!i915_vma_is_ggtt(vma));
1010
> 1011 WARN_ON(!ww && vma->resv && dma_resv_held(vma->resv));
1012
1013 do {
1014 if (ww)
1015 err = i915_vma_pin_ww(vma, ww, 0, align, flags | PIN_GLOBAL);
1016 else
1017 err = i915_vma_pin(vma, 0, align, flags | PIN_GLOBAL);
1018 if (err != -ENOSPC) {
1019 if (!err) {
1020 err = i915_vma_wait_for_bind(vma);
1021 if (err)
1022 i915_vma_unpin(vma);
1023 }
1024 return err;
1025 }
1026
1027 /* Unlike i915_vma_pin, we don't take no for an answer! */
1028 flush_idle_contexts(vm->gt);
1029 if (mutex_lock_interruptible(&vm->mutex) == 0) {
1030 i915_gem_evict_vm(vm);
1031 mutex_unlock(&vm->mutex);
1032 }
1033 } while (1);
1034 }
1035
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v3 3/3] media: v4l: xilinx: Add Xilinx UHD-SDI Rx Subsystem driver
by kernel test robot
Hi Vishal,
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 v5.8-rc1 next-20200618]
[cannot apply to xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Vishal-Sagar/Add-support-for-Xil...
base: git://linuxtv.org/media_tree.git master
config: arc-allyesconfig (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
vim +/irqreturn_t +1113 drivers/media/platform/xilinx/xilinx-sdirxss.c
1103
1104 /**
1105 * xsdirxss_irq_handler - Interrupt handler for SDI Rx
1106 * @irq: IRQ number
1107 * @dev_id: Pointer to device state
1108 *
1109 * The SDI Rx interrupts are cleared by writing 1 to corresponding bit.
1110 *
1111 * Return: IRQ_HANDLED after handling interrupts
1112 */
> 1113 static irqreturn_t xsdirxss_irq_handler(int irq, void *dev_id)
1114 {
1115 struct xsdirxss_state *state = (struct xsdirxss_state *)dev_id;
1116 struct device *dev = state->dev;
1117 u32 status;
1118
1119 status = xsdirxss_read(state, XSDIRX_ISR_REG);
1120 xsdirxss_write(state, XSDIRX_ISR_REG, status);
1121 dev_dbg(dev, "interrupt status = 0x%08x\n", status);
1122
1123 if (!status)
> 1124 return IRQ_NONE;
1125
1126 if (status & XSDIRX_INTR_VIDLOCK_MASK ||
1127 status & XSDIRX_INTR_VIDUNLOCK_MASK) {
1128 u32 val1, val2;
1129 struct v4l2_event event = { 0 };
1130 unsigned long flags;
1131
1132 dev_dbg(dev, "video lock/unlock interrupt\n");
1133
1134 spin_lock_irqsave(&state->slock, flags);
1135 xsdirx_streamflow_control(state, false);
1136
1137 val1 = xsdirxss_read(state, XSDIRX_MODE_DET_STAT_REG);
1138 val2 = xsdirxss_read(state, XSDIRX_TS_DET_STAT_REG);
1139
1140 if ((val1 & XSDIRX_MODE_DET_STAT_MODE_LOCK_MASK) &&
1141 (val2 & XSDIRX_TS_DET_STAT_LOCKED_MASK)) {
1142 u32 mask = XSDIRX_RST_CTRL_RST_CRC_ERRCNT_MASK |
1143 XSDIRX_RST_CTRL_RST_EDH_ERRCNT_MASK;
1144
1145 dev_dbg(dev, "video lock interrupt\n");
1146
1147 xsdirxss_set(state, XSDIRX_RST_CTRL_REG, mask);
1148 xsdirxss_clr(state, XSDIRX_RST_CTRL_REG, mask);
1149
1150 val1 = xsdirxss_read(state, XSDIRX_ST352_VALID_REG);
1151 val2 = xsdirxss_read(state, XSDIRX_ST352_DS1_REG);
1152
1153 dev_dbg(dev, "valid st352 mask = 0x%08x\n", val1);
1154 dev_dbg(dev, "st352 payload = 0x%08x\n", val2);
1155
1156 if (!xsdirx_get_stream_properties(state)) {
1157 state->vidlocked = true;
1158 xsdirxss_set_gtclk(state);
1159 } else {
1160 dev_err(dev, "Unable to get stream properties!\n");
1161 state->vidlocked = false;
1162 }
1163 } else {
1164 dev_dbg(dev, "video unlock interrupt\n");
1165 state->vidlocked = false;
1166 }
1167 spin_unlock_irqrestore(&state->slock, flags);
1168
1169 event.type = V4L2_EVENT_SOURCE_CHANGE;
1170 event.u.src_change.changes = V4L2_EVENT_SRC_CH_RESOLUTION;
1171 v4l2_subdev_notify_event(&state->subdev, &event);
1172 }
1173
1174 if (status & (XSDIRX_INTR_UNDERFLOW_MASK | XSDIRX_INTR_OVERFLOW_MASK)) {
1175 struct v4l2_event event = { 0 };
1176
1177 dev_dbg(dev, "Video in to AXI4 Stream core under/overflow interrupt\n");
1178
1179 event.type = V4L2_EVENT_XILINX_SDIRX_UND_OVR_FLOW;
1180 if (status & XSDIRX_INTR_UNDERFLOW_MASK)
1181 event.u.data[0] = XILINX_SDIRX_UNDERFLOW_EVENT;
1182 if (status & XSDIRX_INTR_OVERFLOW_MASK)
1183 event.u.data[0] = XILINX_SDIRX_OVERFLOW_EVENT;
1184
1185 v4l2_subdev_notify_event(&state->subdev, &event);
1186 }
> 1187 return IRQ_HANDLED;
1188 }
1189
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[rhvgoyal:asyncpf-error-v1 1/7] WARNING: modpost: vmlinux.o(__ex_table+0x2454): Section mismatch in reference from the (unknown reference) (unknown) to the (unknown reference) .irqentry.text:(unknown)
by kernel test robot
tree: https://github.com/rhvgoyal/linux asyncpf-error-v1
head: 94f54bb2e6f969aa7ceb778bb15ac986f3c9cecf
commit: 771e643ea5c2b5f71f766b8f6c6d4202b1da58fd [1/7] KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery
config: x86_64-defconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 771e643ea5c2b5f71f766b8f6c6d4202b1da58fd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> WARNING: modpost: vmlinux.o(__ex_table+0x2454): Section mismatch in reference from the (unknown reference) (unknown) to the (unknown reference) .irqentry.text:(unknown)
The relocation at __ex_table+0x2454 references
section ".irqentry.text" which is not in the list of
authorized sections. If you're adding a new section
and/or if this reference is valid, add ".irqentry.text" to the
list of authorized sections to jump to on fault.
This can be achieved by adding ".irqentry.text" to
OTHER_TEXT_SECTIONS in scripts/mod/modpost.c.
WARNING: modpost: vmlinux.o(__ex_table+0x2458): Section mismatch in reference from the (unknown reference) (unknown) to the (unknown reference) .irqentry.text:(unknown)
The relocation at __ex_table+0x2458 references
section ".irqentry.text" which is not in the list of
authorized sections. If you're adding a new section
and/or if this reference is valid, add ".irqentry.text" to the
list of authorized sections to jump to on fault.
This can be achieved by adding ".irqentry.text" to
OTHER_TEXT_SECTIONS in scripts/mod/modpost.c.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[jkirsher-next-queue:100GbE 15/15] drivers/net/ethernet/intel/idpf/idpf_main.c:46:5: warning: no previous prototype for 'idpf_probe'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git 100GbE
head: 2c89ef0b849b5d1bdba9bcc93a70f52c4752bc23
commit: 2c89ef0b849b5d1bdba9bcc93a70f52c4752bc23 [15/15] idpf: Introduce idpf driver
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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
git checkout 2c89ef0b849b5d1bdba9bcc93a70f52c4752bc23
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
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 >>, old ones prefixed by <<):
>> drivers/net/ethernet/intel/idpf/idpf_main.c:46:5: warning: no previous prototype for 'idpf_probe' [-Wmissing-prototypes]
46 | int idpf_probe(struct pci_dev *pdev,
| ^~~~~~~~~~
In file included from include/linux/net/intel/iecm.h:50,
from drivers/net/ethernet/intel/idpf/idpf_dev.h:7,
from drivers/net/ethernet/intel/idpf/idpf_main.c:6:
include/linux/net/intel/iecm_txrx.h:293:30: warning: 'iecm_rx_ptype_lkup' defined but not used [-Wunused-const-variable=]
293 | struct iecm_rx_ptype_decoded iecm_rx_ptype_lkup[IECM_RX_SUPP_PTYPE] = {
| ^~~~~~~~~~~~~~~~~~
vim +/idpf_probe +46 drivers/net/ethernet/intel/idpf/idpf_main.c
38
39 /**
40 * idpf_probe - Device initialization routine
41 * @pdev: PCI device information struct
42 * @ent: entry in idpf_pci_tbl
43 *
44 * Returns 0 on success, negative on failure
45 */
> 46 int idpf_probe(struct pci_dev *pdev,
47 const struct pci_device_id __always_unused *ent)
48 {
49 struct iecm_adapter *adapter = NULL;
50 int err;
51
52 err = pcim_enable_device(pdev);
53 if (err)
54 return err;
55
56 adapter = kzalloc(sizeof(*adapter), GFP_KERNEL);
57 if (!adapter)
58 return -ENOMEM;
59
60 adapter->dev_ops.reg_ops_init = idpf_reg_ops_init;
61
62 err = iecm_probe(pdev, ent, adapter);
63 if (err)
64 kfree(adapter);
65
66 return err;
67 }
68
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH] [net/sched]: Remove redundant condition in qdisc_graft
by kernel test robot
Hi Gaurav,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.8-rc1 next-20200617]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Gaurav-Singh/Remove-redundant-co...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1b5044021070efa3259f3e9548dc35d1eb6aa844
config: s390-randconfig-r016-20200618 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
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 >>):
vim +1097 net/sched/sch_api.c
1019
1020 /* Graft qdisc "new" to class "classid" of qdisc "parent" or
1021 * to device "dev".
1022 *
1023 * When appropriate send a netlink notification using 'skb'
1024 * and "n".
1025 *
1026 * On success, destroy old qdisc.
1027 */
1028
1029 static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
1030 struct sk_buff *skb, struct nlmsghdr *n, u32 classid,
1031 struct Qdisc *new, struct Qdisc *old,
1032 struct netlink_ext_ack *extack)
1033 {
1034 struct Qdisc *q = old;
1035 struct net *net = dev_net(dev);
1036
1037 if (parent == NULL) {
1038 unsigned int i, num_q, ingress;
1039
1040 ingress = 0;
1041 num_q = dev->num_tx_queues;
1042 if ((q && q->flags & TCQ_F_INGRESS) ||
1043 (new && new->flags & TCQ_F_INGRESS)) {
1044 num_q = 1;
1045 ingress = 1;
1046 if (!dev_ingress_queue(dev)) {
1047 NL_SET_ERR_MSG(extack, "Device does not have an ingress queue");
1048 return -ENOENT;
1049 }
1050 }
1051
1052 if (dev->flags & IFF_UP)
1053 dev_deactivate(dev);
1054
1055 qdisc_offload_graft_root(dev, new, old, extack);
1056
1057 if (new && new->ops->attach)
1058 goto skip;
1059
1060 for (i = 0; i < num_q; i++) {
1061 struct netdev_queue *dev_queue = dev_ingress_queue(dev);
1062
1063 if (!ingress)
1064 dev_queue = netdev_get_tx_queue(dev, i);
1065
1066 old = dev_graft_qdisc(dev_queue, new);
1067 if (new && i > 0)
1068 qdisc_refcount_inc(new);
1069
1070 if (!ingress)
1071 qdisc_put(old);
1072 }
1073
1074 skip:
1075 if (!ingress) {
1076 notify_and_destroy(net, skb, n, classid,
1077 dev->qdisc, new);
1078 if (new && !new->ops->attach)
1079 qdisc_refcount_inc(new);
1080 dev->qdisc = new ? : &noop_qdisc;
1081
1082 if (new && new->ops->attach)
1083 new->ops->attach(new);
1084 } else {
1085 notify_and_destroy(net, skb, n, classid, old, new);
1086 }
1087
1088 if (dev->flags & IFF_UP)
1089 dev_activate(dev);
1090 } else {
1091 const struct Qdisc_class_ops *cops = parent->ops->cl_ops;
1092 unsigned long cl;
1093 int err;
1094
1095 /* Only support running class lockless if parent is lockless */
1096 if (new && (new->flags & TCQ_F_NOLOCK) &&
> 1097 && !(parent->flags & TCQ_F_NOLOCK))
1098 qdisc_clear_nolock(new);
1099
1100 if (!cops || !cops->graft)
1101 return -EOPNOTSUPP;
1102
1103 cl = cops->find(parent, classid);
1104 if (!cl) {
1105 NL_SET_ERR_MSG(extack, "Specified class not found");
1106 return -ENOENT;
1107 }
1108
1109 err = cops->graft(parent, cl, new, &old, extack);
1110 if (err)
1111 return err;
1112 notify_and_destroy(net, skb, n, classid, old, new);
1113 }
1114 return 0;
1115 }
1116
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH 02/16] md: move the early init autodetect code to drivers/md/
by kernel test robot
Hi Christoph,
I love your patch! Perhaps something to improve:
[auto build test WARNING on song-md/md-next]
[also build test WARNING on sparc-next/master sparc/master linus/master v5.8-rc1 next-20200615]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Christoph-Hellwig/init-remove-th...
base: git://git.kernel.org/pub/scm/linux/kernel/git/song/md.git md-next
config: i386-randconfig-s001-20200615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-3-g55607964-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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 >>)
>> drivers/md/md-autodetect.c:164:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const [noderef] <asn:1> *filename @@ got char * @@
>> drivers/md/md-autodetect.c:164:38: sparse: expected char const [noderef] <asn:1> *filename
>> drivers/md/md-autodetect.c:164:38: sparse: got char *
drivers/md/md-autodetect.c:185:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const [noderef] <asn:1> *filename @@ got char * @@
drivers/md/md-autodetect.c:185:32: sparse: expected char const [noderef] <asn:1> *filename
drivers/md/md-autodetect.c:185:32: sparse: got char *
drivers/md/md-autodetect.c:249:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const [noderef] <asn:1> *filename @@ got char * @@
drivers/md/md-autodetect.c:249:40: sparse: expected char const [noderef] <asn:1> *filename
drivers/md/md-autodetect.c:249:40: sparse: got char *
drivers/md/md-autodetect.c:299:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const [noderef] <asn:1> *filename @@ got char * @@
drivers/md/md-autodetect.c:299:24: sparse: expected char const [noderef] <asn:1> *filename
drivers/md/md-autodetect.c:299:24: sparse: got char *
drivers/md/md-autodetect.c:124:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const [noderef] <asn:1> *pathname @@ got char *name @@
drivers/md/md-autodetect.c:124:21: sparse: expected char const [noderef] <asn:1> *pathname
drivers/md/md-autodetect.c:124:21: sparse: got char *name
drivers/md/md-autodetect.c:125:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const [noderef] <asn:1> *filename @@ got char *name @@
drivers/md/md-autodetect.c:125:27: sparse: expected char const [noderef] <asn:1> *filename
drivers/md/md-autodetect.c:125:27: sparse: got char *name
drivers/md/md-autodetect.c:124:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const [noderef] <asn:1> *pathname @@ got char *name @@
drivers/md/md-autodetect.c:124:21: sparse: expected char const [noderef] <asn:1> *pathname
drivers/md/md-autodetect.c:124:21: sparse: got char *name
drivers/md/md-autodetect.c:125:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const [noderef] <asn:1> *filename @@ got char *name @@
drivers/md/md-autodetect.c:125:27: sparse: expected char const [noderef] <asn:1> *filename
drivers/md/md-autodetect.c:125:27: sparse: got char *name
vim +164 drivers/md/md-autodetect.c
6fc96eea53684d drivers/md/md-autodetect.c Christoph Hellwig 2020-06-15 127
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 128 static void __init md_setup_drive(void)
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 129 {
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 130 int minor, i, ent, partitioned;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 131 dev_t dev;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 132 dev_t devices[MD_SB_DISKS+1];
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 133
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 134 for (ent = 0; ent < md_setup_ents ; ent++) {
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 135 int fd;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 136 int err = 0;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 137 char *devname;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 138 mdu_disk_info_t dinfo;
bdaf8529385d51 init/do_mounts_md.c Greg Kroah-Hartman 2005-06-20 139 char name[16];
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 140
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 141 minor = md_setup_args[ent].minor;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 142 partitioned = md_setup_args[ent].partitioned;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 143 devname = md_setup_args[ent].device_names;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 144
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 145 sprintf(name, "/dev/md%s%d", partitioned?"_d":"", minor);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 146 if (partitioned)
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 147 dev = MKDEV(mdp_major, minor << MdpMinorShift);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 148 else
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 149 dev = MKDEV(MD_MAJOR, minor);
bdaf8529385d51 init/do_mounts_md.c Greg Kroah-Hartman 2005-06-20 150 create_dev(name, dev);
d613c3e2d84188 init/do_mounts_md.c Harvey Harrison 2008-04-28 151 for (i = 0; i < MD_SB_DISKS && devname != NULL; i++) {
86a04656f6cbe2 init/do_mounts_md.c Christoph Hellwig 2020-06-15 152 struct kstat stat;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 153 char *p;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 154 char comp_name[64];
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 155
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 156 p = strchr(devname, ',');
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 157 if (p)
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 158 *p++ = 0;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 159
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 160 dev = name_to_dev_t(devname);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 161 if (strncmp(devname, "/dev/", 5) == 0)
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 162 devname += 5;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 163 snprintf(comp_name, 63, "/dev/%s", devname);
86a04656f6cbe2 init/do_mounts_md.c Christoph Hellwig 2020-06-15 @164 if (vfs_stat(comp_name, &stat) == 0 &&
86a04656f6cbe2 init/do_mounts_md.c Christoph Hellwig 2020-06-15 165 S_ISBLK(stat.mode))
86a04656f6cbe2 init/do_mounts_md.c Christoph Hellwig 2020-06-15 166 dev = new_decode_dev(stat.rdev);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 167 if (!dev) {
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 168 printk(KERN_WARNING "md: Unknown device name: %s\n", devname);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 169 break;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 170 }
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 171
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 172 devices[i] = dev;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 173
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 174 devname = p;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 175 }
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 176 devices[i] = 0;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 177
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 178 if (!i)
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 179 continue;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 180
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 181 printk(KERN_INFO "md: Loading md%s%d: %s\n",
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 182 partitioned ? "_d" : "", minor,
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 183 md_setup_args[ent].device_names);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 184
bae217ea8c7e12 init/do_mounts_md.c Dominik Brodowski 2018-03-11 185 fd = ksys_open(name, 0, 0);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 186 if (fd < 0) {
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 187 printk(KERN_ERR "md: open failed - cannot start "
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 188 "array %s\n", name);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 189 continue;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 190 }
cbb60b924b9f3e init/do_mounts_md.c Dominik Brodowski 2018-03-13 191 if (ksys_ioctl(fd, SET_ARRAY_INFO, 0) == -EBUSY) {
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 192 printk(KERN_WARNING
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 193 "md: Ignoring md=%d, already autodetected. (Use raid=noautodetect)\n",
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 194 minor);
2ca2a09d6215fd init/do_mounts_md.c Dominik Brodowski 2018-03-11 195 ksys_close(fd);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 196 continue;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 197 }
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 198
2604b703b6b3db init/do_mounts_md.c NeilBrown 2006-01-06 199 if (md_setup_args[ent].level != LEVEL_NONE) {
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 200 /* non-persistent */
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 201 mdu_array_info_t ainfo;
2604b703b6b3db init/do_mounts_md.c NeilBrown 2006-01-06 202 ainfo.level = md_setup_args[ent].level;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 203 ainfo.size = 0;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 204 ainfo.nr_disks =0;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 205 ainfo.raid_disks =0;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 206 while (devices[ainfo.raid_disks])
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 207 ainfo.raid_disks++;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 208 ainfo.md_minor =minor;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 209 ainfo.not_persistent = 1;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 210
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 211 ainfo.state = (1 << MD_SB_CLEAN);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 212 ainfo.layout = 0;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 213 ainfo.chunk_size = md_setup_args[ent].chunk;
cbb60b924b9f3e init/do_mounts_md.c Dominik Brodowski 2018-03-13 214 err = ksys_ioctl(fd, SET_ARRAY_INFO, (long)&ainfo);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 215 for (i = 0; !err && i <= MD_SB_DISKS; i++) {
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 216 dev = devices[i];
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 217 if (!dev)
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 218 break;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 219 dinfo.number = i;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 220 dinfo.raid_disk = i;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 221 dinfo.state = (1<<MD_DISK_ACTIVE)|(1<<MD_DISK_SYNC);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 222 dinfo.major = MAJOR(dev);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 223 dinfo.minor = MINOR(dev);
cbb60b924b9f3e init/do_mounts_md.c Dominik Brodowski 2018-03-13 224 err = ksys_ioctl(fd, ADD_NEW_DISK,
cbb60b924b9f3e init/do_mounts_md.c Dominik Brodowski 2018-03-13 225 (long)&dinfo);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 226 }
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 227 } else {
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 228 /* persistent */
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 229 for (i = 0; i <= MD_SB_DISKS; i++) {
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 230 dev = devices[i];
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 231 if (!dev)
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 232 break;
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 233 dinfo.major = MAJOR(dev);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 234 dinfo.minor = MINOR(dev);
cbb60b924b9f3e init/do_mounts_md.c Dominik Brodowski 2018-03-13 235 ksys_ioctl(fd, ADD_NEW_DISK, (long)&dinfo);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 236 }
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 237 }
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 238 if (!err)
cbb60b924b9f3e init/do_mounts_md.c Dominik Brodowski 2018-03-13 239 err = ksys_ioctl(fd, RUN_ARRAY, 0);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 240 if (err)
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 241 printk(KERN_WARNING "md: starting md%d failed\n", minor);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 242 else {
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 243 /* reread the partition table.
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 244 * I (neilb) and not sure why this is needed, but I cannot
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 245 * boot a kernel with devfs compiled in from partitioned md
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 246 * array without it
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 247 */
2ca2a09d6215fd init/do_mounts_md.c Dominik Brodowski 2018-03-11 248 ksys_close(fd);
bae217ea8c7e12 init/do_mounts_md.c Dominik Brodowski 2018-03-11 249 fd = ksys_open(name, 0, 0);
cbb60b924b9f3e init/do_mounts_md.c Dominik Brodowski 2018-03-13 250 ksys_ioctl(fd, BLKRRPART, 0);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 251 }
2ca2a09d6215fd init/do_mounts_md.c Dominik Brodowski 2018-03-11 252 ksys_close(fd);
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 253 }
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 254 }
^1da177e4c3f41 init/do_mounts_md.c Linus Torvalds 2005-04-16 255
:::::: The code at line 164 was first introduced by commit
:::::: 86a04656f6cbe246b402b55ce114ff7a59ba68ea init: remove the bstat helper
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: 0day robot <lkp(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/video/fbdev/tdfxfb.c:1120:27: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1b5044021070efa3259f3e9548dc35d1eb6aa844
commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
date: 7 months ago
config: s390-randconfig-s032-20200618 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-10-gc17b1b06-dirty
git checkout 80591e61a0f7e88deaada69844e4a31280c4a38f
# save the attached .config to linux build tree
make W=1 C=1 ARCH=s390 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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 >>)
>> drivers/video/fbdev/tdfxfb.c:1120:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *s @@ got unsigned char [noderef] [usertype] <asn:2> *cursorbase @@
>> drivers/video/fbdev/tdfxfb.c:1120:27: sparse: expected void *s
drivers/video/fbdev/tdfxfb.c:1120:27: sparse: got unsigned char [noderef] [usertype] <asn:2> *cursorbase
drivers/video/fbdev/tdfxfb.c:1131:33: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/video/fbdev/tdfxfb.c:1134:33: sparse: sparse: cast removes address space '<asn:2>' of expression
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] val
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@
--
>> drivers/video/fbdev/kyro/fbdev.c:725:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *s @@ got char [noderef] <asn:2> *screen_base @@
>> drivers/video/fbdev/kyro/fbdev.c:725:23: sparse: expected void *s
drivers/video/fbdev/kyro/fbdev.c:725:23: sparse: got char [noderef] <asn:2> *screen_base
vim +1120 drivers/video/fbdev/tdfxfb.c
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1040
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1041 static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1042 {
a807f618b62594 drivers/video/tdfxfb.c Antonino A. Daplas 2006-01-09 1043 struct tdfx_par *par = info->par;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1044 u32 vidcfg;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1045
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1046 if (!hwcursor)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1047 return -EINVAL; /* just to force soft_cursor() call */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1048
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1049 /* Too large of a cursor or wrong bpp :-( */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1050 if (cursor->image.width > 64 ||
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1051 cursor->image.height > 64 ||
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1052 cursor->image.depth > 1)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1053 return -EINVAL;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1054
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1055 vidcfg = tdfx_inl(par, VIDPROCCFG);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1056 if (cursor->enable)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1057 tdfx_outl(par, VIDPROCCFG, vidcfg | VIDCFG_HWCURSOR_ENABLE);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1058 else
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1059 tdfx_outl(par, VIDPROCCFG, vidcfg & ~VIDCFG_HWCURSOR_ENABLE);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1060
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1061 /*
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1062 * If the cursor is not be changed this means either we want the
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1063 * current cursor state (if enable is set) or we want to query what
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1064 * we can do with the cursor (if enable is not set)
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1065 */
8af1d50f7f6793 drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1066 if (!cursor->set)
8af1d50f7f6793 drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1067 return 0;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1068
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1069 /* fix cursor color - XFree86 forgets to restore it properly */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1070 if (cursor->set & FB_CUR_SETCMAP) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1071 struct fb_cmap cmap = info->cmap;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1072 u32 bg_idx = cursor->image.bg_color;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1073 u32 fg_idx = cursor->image.fg_color;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1074 unsigned long bg_color, fg_color;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1075
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1076 fg_color = (((u32)cmap.red[fg_idx] & 0xff00) << 8) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1077 (((u32)cmap.green[fg_idx] & 0xff00) << 0) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1078 (((u32)cmap.blue[fg_idx] & 0xff00) >> 8);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1079 bg_color = (((u32)cmap.red[bg_idx] & 0xff00) << 8) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1080 (((u32)cmap.green[bg_idx] & 0xff00) << 0) |
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1081 (((u32)cmap.blue[bg_idx] & 0xff00) >> 8);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1082 banshee_make_room(par, 2);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1083 tdfx_outl(par, HWCURC0, bg_color);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1084 tdfx_outl(par, HWCURC1, fg_color);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1085 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1086
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1087 if (cursor->set & FB_CUR_SETPOS) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1088 int x = cursor->image.dx;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1089 int y = cursor->image.dy - info->var.yoffset;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1090
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1091 x += 63;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1092 y += 63;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1093 banshee_make_room(par, 1);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1094 tdfx_outl(par, HWCURLOC, (y << 16) + x);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1095 }
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1096 if (cursor->set & (FB_CUR_SETIMAGE | FB_CUR_SETSHAPE)) {
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1097 /*
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1098 * Voodoo 3 and above cards use 2 monochrome cursor patterns.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1099 * The reason is so the card can fetch 8 words at a time
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1100 * and are stored on chip for use for the next 8 scanlines.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1101 * This reduces the number of times for access to draw the
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1102 * cursor for each screen refresh.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1103 * Each pattern is a bitmap of 64 bit wide and 64 bit high
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1104 * (total of 8192 bits or 1024 bytes). The two patterns are
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1105 * stored in such a way that pattern 0 always resides in the
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1106 * lower half (least significant 64 bits) of a 128 bit word
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1107 * and pattern 1 the upper half. If you examine the data of
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1108 * the cursor image the graphics card uses then from the
25985edcedea63 drivers/video/tdfxfb.c Lucas De Marchi 2011-03-30 1109 * beginning you see line one of pattern 0, line one of
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1110 * pattern 1, line two of pattern 0, line two of pattern 1,
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1111 * etc etc. The linear stride for the cursor is always 16 bytes
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1112 * (128 bits) which is the maximum cursor width times two for
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1113 * the two monochrome patterns.
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1114 */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1115 u8 __iomem *cursorbase = info->screen_base + info->fix.smem_len;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1116 u8 *bitmap = (u8 *)cursor->image.data;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1117 u8 *mask = (u8 *)cursor->mask;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1118 int i;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1119
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 @1120 fb_memset(cursorbase, 0, 1024);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1121
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1122 for (i = 0; i < cursor->image.height; i++) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1123 int h = 0;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1124 int j = (cursor->image.width + 7) >> 3;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1125
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1126 for (; j > 0; j--) {
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1127 u8 data = *mask ^ *bitmap;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1128 if (cursor->rop == ROP_COPY)
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1129 data = *mask & *bitmap;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1130 /* Pattern 0. Copy the cursor mask to it */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1131 fb_writeb(*mask, cursorbase + h);
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1132 mask++;
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1133 /* Pattern 1. Copy the cursor bitmap to it */
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1134 fb_writeb(data, cursorbase + h + 8);
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1135 bitmap++;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1136 h++;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1137 }
90b0f08536531a drivers/video/tdfxfb.c Krzysztof Helt 2007-10-16 1138 cursorbase += 16;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1139 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1140 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1141 return 0;
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1142 }
^1da177e4c3f41 drivers/video/tdfxfb.c Linus Torvalds 2005-04-16 1143
:::::: The code at line 1120 was first introduced by commit
:::::: 90b0f08536531abbbe7b5d4944792da08cadde01 tdfxfb: hardware cursor
:::::: TO: Krzysztof Helt <krzysztof.h1(a)wp.pl>
:::::: CC: Linus Torvalds <torvalds(a)woody.linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months