Re: [PATCH 4/4] i2c-mux-pca954x: Add regulator support
by kernel test robot
Hi Patrick,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on robh/for-next linux/master linus/master v5.16-rc5]
[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/Patrick-Rudolph/dt-bindings-i2c-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: riscv-randconfig-r042-20211214 (https://download.01.org/0day-ci/archive/20211214/202112142101.s4i5cHhd-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
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://github.com/0day-ci/linux/commit/3498c52eb6aec09c78a3f07cdcb042897...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Patrick-Rudolph/dt-bindings-i2c-Update-PCA954x/20211214-175258
git checkout 3498c52eb6aec09c78a3f07cdcb042897960f8ef
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/i2c/muxes/
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 >>):
>> drivers/i2c/muxes/i2c-mux-pca954x.c:502:58: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
dev_warn(dev, "Failed to get regulator for vcc: %d\n", ret);
^~~
include/linux/dev_printk.h:146:70: note: expanded from macro 'dev_warn'
dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
_p_func(dev, fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
drivers/i2c/muxes/i2c-mux-pca954x.c:483:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +/ret +502 drivers/i2c/muxes/i2c-mux-pca954x.c
470
471 /*
472 * I2C init/probing/exit functions
473 */
474 static int pca954x_probe(struct i2c_client *client,
475 const struct i2c_device_id *id)
476 {
477 struct i2c_adapter *adap = client->adapter;
478 struct device *dev = &client->dev;
479 struct gpio_desc *gpio;
480 struct i2c_mux_core *muxc;
481 struct pca954x *data;
482 int num;
483 int ret;
484
485 if (!i2c_check_functionality(adap, I2C_FUNC_SMBUS_BYTE))
486 return -ENODEV;
487
488 muxc = i2c_mux_alloc(adap, dev, PCA954X_MAX_NCHANS, sizeof(*data), 0,
489 pca954x_select_chan, pca954x_deselect_mux);
490 if (!muxc)
491 return -ENOMEM;
492
493 data = i2c_mux_priv(muxc);
494
495 i2c_set_clientdata(client, muxc);
496 data->client = client;
497
498 data->supply = devm_regulator_get(dev, "vcc");
499 if (IS_ERR(data->supply)) {
500 if ((PTR_ERR(data->supply) == -EPROBE_DEFER))
501 return -EPROBE_DEFER;
> 502 dev_warn(dev, "Failed to get regulator for vcc: %d\n", ret);
503 } else {
504 ret = regulator_enable(data->supply);
505 if (ret) {
506 dev_err(dev, "Failed to enable regulator vcc\n");
507 return ret;
508 }
509 }
510
511 /* Reset the mux if a reset GPIO is specified. */
512 gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
513 if (IS_ERR(gpio)) {
514 ret = PTR_ERR(gpio);
515 goto fail_cleanup;
516 }
517 if (gpio) {
518 udelay(1);
519 gpiod_set_value_cansleep(gpio, 0);
520 /* Give the chip some time to recover. */
521 udelay(1);
522 }
523
524 data->chip = device_get_match_data(dev);
525 if (!data->chip)
526 data->chip = &chips[id->driver_data];
527
528 if (data->chip->id.manufacturer_id != I2C_DEVICE_ID_NONE) {
529 struct i2c_device_identity id;
530
531 ret = i2c_get_device_id(client, &id);
532 if (ret && ret != -EOPNOTSUPP)
533 goto fail_cleanup;
534
535 if (!ret &&
536 (id.manufacturer_id != data->chip->id.manufacturer_id ||
537 id.part_id != data->chip->id.part_id)) {
538 dev_warn(dev, "unexpected device id %03x-%03x-%x\n",
539 id.manufacturer_id, id.part_id,
540 id.die_revision);
541 ret = -ENODEV;
542 goto fail_cleanup;
543 }
544 }
545
546 data->idle_state = MUX_IDLE_AS_IS;
547 if (device_property_read_u32(dev, "idle-state", &data->idle_state)) {
548 if (device_property_read_bool(dev, "i2c-mux-idle-disconnect"))
549 data->idle_state = MUX_IDLE_DISCONNECT;
550 }
551
552 /*
553 * Write the mux register at addr to verify
554 * that the mux is in fact present. This also
555 * initializes the mux to a channel
556 * or disconnected state.
557 */
558 ret = pca954x_init(client, data);
559 if (ret < 0) {
560 dev_warn(dev, "probe failed\n");
561 ret = -ENODEV;
562 goto fail_cleanup;
563 }
564
565 ret = pca954x_irq_setup(muxc);
566 if (ret)
567 goto fail_cleanup;
568
569 /* Now create an adapter for each channel */
570 for (num = 0; num < data->chip->nchans; num++) {
571 ret = i2c_mux_add_adapter(muxc, 0, num, 0);
572 if (ret)
573 goto fail_cleanup;
574 }
575
576 if (data->irq) {
577 ret = devm_request_threaded_irq(dev, data->client->irq,
578 NULL, pca954x_irq_handler,
579 IRQF_ONESHOT | IRQF_SHARED,
580 "pca954x", data);
581 if (ret)
582 goto fail_cleanup;
583 }
584
585 /*
586 * The attr probably isn't going to be needed in most cases,
587 * so don't fail completely on error.
588 */
589 device_create_file(dev, &dev_attr_idle_state);
590
591 dev_info(dev, "registered %d multiplexed busses for I2C %s %s\n",
592 num, data->chip->muxtype == pca954x_ismux
593 ? "mux" : "switch", client->name);
594
595 return 0;
596
597 fail_cleanup:
598 pca954x_cleanup(muxc);
599 return ret;
600 }
601
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH v31 26/28] Audit: Add record for multiple object security contexts
by kernel test robot
Hi Casey,
I love your patch! Yet something to improve:
[auto build test ERROR on nf-next/master]
[cannot apply to pcmoore-audit/next nf/master linus/master v5.16-rc5]
[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/Casey-Schaufler/integrity-disass...
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: sparc64-randconfig-r015-20211213 (https://download.01.org/0day-ci/archive/20211214/202112142141.E8wcYag3-lk...)
compiler: sparc64-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/2a62f660ff9d766a192fda713edfa3ea1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Casey-Schaufler/integrity-disassociate-ima_filter_rule-from-security_audit_rule/20211214-084057
git checkout 2a62f660ff9d766a192fda713edfa3ea129efdee
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sparc64 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 >>):
In file included from arch/sparc/kernel/ptrace_64.c:25:
include/linux/audit.h:262:1: error: expected identifier or '(' before '{' token
262 | { }
| ^
>> include/linux/audit.h:260:20: error: 'audit_log_object_context' declared 'static' but never defined [-Werror=unused-function]
260 | static inline void audit_log_object_context(struct audit_buffer *ab,
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +260 include/linux/audit.h
220
221 #else /* CONFIG_AUDIT */
222 static inline __printf(4, 5)
223 void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
224 const char *fmt, ...)
225 { }
226 static inline struct audit_buffer *audit_log_start(struct audit_context *ctx,
227 gfp_t gfp_mask, int type)
228 {
229 return NULL;
230 }
231 static inline __printf(2, 3)
232 void audit_log_format(struct audit_buffer *ab, const char *fmt, ...)
233 { }
234 static inline void audit_log_end(struct audit_buffer *ab)
235 { }
236 static inline void audit_log_n_hex(struct audit_buffer *ab,
237 const unsigned char *buf, size_t len)
238 { }
239 static inline void audit_log_n_string(struct audit_buffer *ab,
240 const char *buf, size_t n)
241 { }
242 static inline void audit_log_n_untrustedstring(struct audit_buffer *ab,
243 const char *string, size_t n)
244 { }
245 static inline void audit_log_untrustedstring(struct audit_buffer *ab,
246 const char *string)
247 { }
248 static inline void audit_log_d_path(struct audit_buffer *ab,
249 const char *prefix,
250 const struct path *path)
251 { }
252 static inline void audit_log_key(struct audit_buffer *ab, char *key)
253 { }
254 static inline void audit_log_path_denied(int type, const char *operation)
255 { }
256 static inline int audit_log_task_context(struct audit_buffer *ab)
257 {
258 return 0;
259 }
> 260 static inline void audit_log_object_context(struct audit_buffer *ab,
261 struct lsmblob *blob);
262 { }
263 static inline void audit_log_task_info(struct audit_buffer *ab)
264 { }
265
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[chenxing:msc313_mainlining 66/78] drivers/irqchip/irq-msc313-pm-wakeup.c:132:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute
by kernel test robot
tree: git://github.com/linux-chenxing/linux.git msc313_mainlining
head: 04c62a6ed8b1b9034464e903809c8b6a9354bf6e
commit: ef6b5b20ff3e51fa6026bc510f66980c5107698c [66/78] irqchip: MStar wakeup intc
config: hexagon-buildonly-randconfig-r002-20211214 (https://download.01.org/0day-ci/archive/20211214/202112142011.TrAzr38n-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
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/linux-chenxing/linux/commit/ef6b5b20ff3e51fa6026bc510f...
git remote add chenxing git://github.com/linux-chenxing/linux.git
git fetch --no-tags chenxing msc313_mainlining
git checkout ef6b5b20ff3e51fa6026bc510f66980c5107698c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/clocksource/ drivers/irqchip/
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 >>):
>> drivers/irqchip/irq-msc313-pm-wakeup.c:132:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
request_irq(irq, msc313_pm_wakeup_intc_chainedhandler, IRQF_SHARED,
^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +/warn_unused_result +132 drivers/irqchip/irq-msc313-pm-wakeup.c
97
98 static int __init msc313_pm_wakeup_intc_of_init(struct device_node *node,
99 struct device_node *parent)
100 {
101 int ret = 0, irq;
102 struct regmap *pmsleep;
103 struct msc313_sleep_intc *intc;
104 struct irq_domain *domain;
105
106 irq = of_irq_get(node, 0);
107 if (irq <= 0)
108 return irq;
109
110 pmsleep = syscon_regmap_lookup_by_phandle(node, "mstar,pmsleep");
111 if (IS_ERR(pmsleep))
112 return PTR_ERR(pmsleep);
113
114 intc = kzalloc(sizeof(*intc), GFP_KERNEL);
115 if (!intc)
116 return -ENOMEM;
117
118 intc->mask = regmap_field_alloc(pmsleep, field_mask);
119 intc->type = regmap_field_alloc(pmsleep, field_type);
120 intc->status = regmap_field_alloc(pmsleep, field_status);
121
122 /* The masks survive deep sleep so clear them. */
123 regmap_field_write(intc->mask, ~0);
124
125 domain = irq_domain_add_linear(node, NUM_IRQ,
126 &msc313_pm_wakeup_intc_domain_ops, intc);
127 if (!domain) {
128 ret = -ENOMEM;
129 goto out_free;
130 }
131
> 132 request_irq(irq, msc313_pm_wakeup_intc_chainedhandler, IRQF_SHARED,
133 "pmsleep", domain);
134
135 return 0;
136
137 out_free:
138 kfree(intc);
139 return ret;
140 }
141
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH 16/17] fortify: Detect struct member overflows in memset() at compile-time
by kernel test robot
Hi Kees,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc5]
[cannot apply to rdma/for-next axboe-block/for-next kvm/queue tip/x86/core mkp-scsi/for-next jejb-scsi/for-next]
[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/Kees-Cook/Enable-strict-compile-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git aa50faff4416c869b52dff68a937c84d29e12f4b
config: i386-randconfig-s001-20211214 (https://download.01.org/0day-ci/archive/20211214/202112142014.LCVuJteC-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/5827537ce9a9fe9059d982a74a6cd7afe...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kees-Cook/Enable-strict-compile-time-memcpy-fortify-checks/20211214-064002
git checkout 5827537ce9a9fe9059d982a74a6cd7afeccc9145
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/video/fbdev/
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/i740fb.c:743:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/i740fb.c:743:9: sparse: expected void const *
drivers/video/fbdev/i740fb.c:743:9: sparse: got char [noderef] __iomem *screen_base
>> drivers/video/fbdev/i740fb.c:743:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/i740fb.c:743:9: sparse: expected void const *
drivers/video/fbdev/i740fb.c:743:9: sparse: got char [noderef] __iomem *screen_base
drivers/video/fbdev/i740fb.c:743:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got char [noderef] __iomem *screen_base @@
drivers/video/fbdev/i740fb.c:743:9: sparse: expected void *
drivers/video/fbdev/i740fb.c:743:9: sparse: got char [noderef] __iomem *screen_base
vim +743 drivers/video/fbdev/i740fb.c
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 732
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 733 static int i740fb_set_par(struct fb_info *info)
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 734 {
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 735 struct i740fb_par *par = info->par;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 736 u32 itemp;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 737 int i;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 738
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 739 i = i740fb_decode_var(&info->var, par, info);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 740 if (i)
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 741 return i;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 742
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 @743 memset(info->screen_base, 0, info->screen_size);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 744
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 745 vga_protect(par);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 746
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 747 i740outreg(par, XRX, DRAM_EXT_CNTL, DRAM_REFRESH_DISABLE);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 748
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 749 mdelay(1);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 750
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 751 i740outreg(par, XRX, VCLK2_VCO_M, par->video_clk2_m);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 752 i740outreg(par, XRX, VCLK2_VCO_N, par->video_clk2_n);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 753 i740outreg(par, XRX, VCLK2_VCO_MN_MSBS, par->video_clk2_mn_msbs);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 754 i740outreg(par, XRX, VCLK2_VCO_DIV_SEL, par->video_clk2_div_sel);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 755
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 756 i740outreg_mask(par, XRX, PIXPIPE_CONFIG_0,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 757 par->pixelpipe_cfg0 & DAC_8_BIT, 0x80);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 758
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 759 i740inb(par, 0x3DA);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 760 i740outb(par, 0x3C0, 0x00);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 761
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 762 /* update misc output register */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 763 i740outb(par, VGA_MIS_W, par->misc | 0x01);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 764
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 765 /* synchronous reset on */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 766 i740outreg(par, VGA_SEQ_I, VGA_SEQ_RESET, 0x01);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 767 /* write sequencer registers */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 768 i740outreg(par, VGA_SEQ_I, VGA_SEQ_CLOCK_MODE,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 769 par->seq[VGA_SEQ_CLOCK_MODE] | 0x20);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 770 for (i = 2; i < VGA_SEQ_C; i++)
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 771 i740outreg(par, VGA_SEQ_I, i, par->seq[i]);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 772
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 773 /* synchronous reset off */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 774 i740outreg(par, VGA_SEQ_I, VGA_SEQ_RESET, 0x03);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 775
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 776 /* deprotect CRT registers 0-7 */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 777 i740outreg(par, VGA_CRT_IC, VGA_CRTC_V_SYNC_END,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 778 par->crtc[VGA_CRTC_V_SYNC_END]);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 779
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 780 /* write CRT registers */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 781 for (i = 0; i < VGA_CRT_C; i++)
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 782 i740outreg(par, VGA_CRT_IC, i, par->crtc[i]);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 783
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 784 /* write graphics controller registers */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 785 for (i = 0; i < VGA_GFX_C; i++)
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 786 i740outreg(par, VGA_GFX_I, i, par->gdc[i]);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 787
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 788 /* write attribute controller registers */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 789 for (i = 0; i < VGA_ATT_C; i++) {
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 790 i740inb(par, VGA_IS1_RC); /* reset flip-flop */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 791 i740outb(par, VGA_ATT_IW, i);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 792 i740outb(par, VGA_ATT_IW, par->atc[i]);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 793 }
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 794
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 795 i740inb(par, VGA_IS1_RC);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 796 i740outb(par, VGA_ATT_IW, 0x20);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 797
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 798 i740outreg(par, VGA_CRT_IC, EXT_VERT_TOTAL, par->ext_vert_total);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 799 i740outreg(par, VGA_CRT_IC, EXT_VERT_DISPLAY, par->ext_vert_disp_end);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 800 i740outreg(par, VGA_CRT_IC, EXT_VERT_SYNC_START,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 801 par->ext_vert_sync_start);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 802 i740outreg(par, VGA_CRT_IC, EXT_VERT_BLANK_START,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 803 par->ext_vert_blank_start);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 804 i740outreg(par, VGA_CRT_IC, EXT_HORIZ_TOTAL, par->ext_horiz_total);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 805 i740outreg(par, VGA_CRT_IC, EXT_HORIZ_BLANK, par->ext_horiz_blank);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 806 i740outreg(par, VGA_CRT_IC, EXT_OFFSET, par->ext_offset);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 807 i740outreg(par, VGA_CRT_IC, EXT_START_ADDR_HI, par->ext_start_addr_hi);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 808 i740outreg(par, VGA_CRT_IC, EXT_START_ADDR, par->ext_start_addr);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 809
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 810 i740outreg_mask(par, VGA_CRT_IC, INTERLACE_CNTL,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 811 par->interlace_cntl, INTERLACE_ENABLE);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 812 i740outreg_mask(par, XRX, ADDRESS_MAPPING, par->address_mapping, 0x1F);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 813 i740outreg_mask(par, XRX, BITBLT_CNTL, par->bitblt_cntl, COLEXP_MODE);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 814 i740outreg_mask(par, XRX, DISPLAY_CNTL,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 815 par->display_cntl, VGA_WRAP_MODE | GUI_MODE);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 816 i740outreg_mask(par, XRX, PIXPIPE_CONFIG_0, par->pixelpipe_cfg0, 0x9B);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 817 i740outreg_mask(par, XRX, PIXPIPE_CONFIG_2, par->pixelpipe_cfg2, 0x0C);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 818
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 819 i740outreg(par, XRX, PLL_CNTL, par->pll_cntl);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 820
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 821 i740outreg_mask(par, XRX, PIXPIPE_CONFIG_1,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 822 par->pixelpipe_cfg1, DISPLAY_COLOR_MODE);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 823
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 824 itemp = readl(par->regs + FWATER_BLC);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 825 itemp &= ~(LMI_BURST_LENGTH | LMI_FIFO_WATERMARK);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 826 itemp |= par->lmi_fifo_watermark;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 827 writel(itemp, par->regs + FWATER_BLC);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 828
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 829 i740outreg(par, XRX, DRAM_EXT_CNTL, DRAM_REFRESH_60HZ);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 830
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 831 i740outreg_mask(par, MRX, COL_KEY_CNTL_1, 0, BLANK_DISP_OVERLAY);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 832 i740outreg_mask(par, XRX, IO_CTNL,
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 833 par->io_cntl, EXTENDED_ATTR_CNTL | EXTENDED_CRTC_CNTL);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 834
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 835 if (par->pixelpipe_cfg1 != DISPLAY_8BPP_MODE) {
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 836 i740outb(par, VGA_PEL_MSK, 0xFF);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 837 i740outb(par, VGA_PEL_IW, 0x00);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 838 for (i = 0; i < 256; i++) {
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 839 itemp = (par->pixelpipe_cfg0 & DAC_8_BIT) ? i : i >> 2;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 840 i740outb(par, VGA_PEL_D, itemp);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 841 i740outb(par, VGA_PEL_D, itemp);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 842 i740outb(par, VGA_PEL_D, itemp);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 843 }
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 844 }
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 845
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 846 /* Wait for screen to stabilize. */
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 847 mdelay(50);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 848 vga_unprotect(par);
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 849
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 850 info->fix.line_length =
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 851 info->var.xres_virtual * info->var.bits_per_pixel / 8;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 852 if (info->var.bits_per_pixel == 8)
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 853 info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 854 else
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 855 info->fix.visual = FB_VISUAL_TRUECOLOR;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 856
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 857 return 0;
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 858 }
5350c65f4f15bb drivers/video/i740fb.c Ondrej Zary 2012-02-10 859
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[hch-misc:um-set_fs 1/2] arch/x86/include/asm/memtype.h:9:13: warning: conflicting types for 'pat_disable'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git um-set_fs
head: 62ef80add97f4b90b4435670fcd5c0a6bd424fad
commit: bc1802ed3414136e0dfe2ea0a747aca59dc33b5c [1/2] x86/mtrr: don't include <asm/memtype.h> for !CONFIG_MTRR
config: i386-randconfig-a001-20211214 (https://download.01.org/0day-ci/archive/20211214/202112142040.U9bqf0Ta-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc um-set_fs
git checkout bc1802ed3414136e0dfe2ea0a747aca59dc33b5c
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kernel/cpu/ arch/x86/mm/
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/x86/kernel/cpu/common.c:46:
arch/x86/include/asm/mtrr.h: In function 'mtrr_bp_init':
arch/x86/include/asm/mtrr.h:89:2: error: implicit declaration of function 'pat_disable'; did you mean 'ptrace_disable'? [-Werror=implicit-function-declaration]
89 | pat_disable("PAT support disabled because CONFIG_MTRR is disabled in the kernel.");
| ^~~~~~~~~~~
| ptrace_disable
In file included from arch/x86/kernel/cpu/common.c:55:
arch/x86/include/asm/memtype.h: At top level:
>> arch/x86/include/asm/memtype.h:9:13: warning: conflicting types for 'pat_disable'
9 | extern void pat_disable(const char *reason);
| ^~~~~~~~~~~
In file included from arch/x86/kernel/cpu/common.c:46:
arch/x86/include/asm/mtrr.h:89:2: note: previous implicit declaration of 'pat_disable' was here
89 | pat_disable("PAT support disabled because CONFIG_MTRR is disabled in the kernel.");
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from arch/x86/mm/pat/memtype.c:51:
arch/x86/include/asm/mtrr.h: In function 'mtrr_bp_init':
arch/x86/include/asm/mtrr.h:89:2: error: implicit declaration of function 'pat_disable' [-Werror=implicit-function-declaration]
89 | pat_disable("PAT support disabled because CONFIG_MTRR is disabled in the kernel.");
| ^~~~~~~~~~~
In file included from arch/x86/mm/pat/memtype.c:54:
arch/x86/include/asm/memtype.h: At top level:
>> arch/x86/include/asm/memtype.h:9:13: warning: conflicting types for 'pat_disable'
9 | extern void pat_disable(const char *reason);
| ^~~~~~~~~~~
In file included from arch/x86/mm/pat/memtype.c:51:
arch/x86/include/asm/mtrr.h:89:2: note: previous implicit declaration of 'pat_disable' was here
89 | pat_disable("PAT support disabled because CONFIG_MTRR is disabled in the kernel.");
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/pat_disable +9 arch/x86/include/asm/memtype.h
2e5d9c857d4e6c include/asm-x86/pat.h venkatesh.pallipadi(a)intel.com 2008-03-18 7
533d49b37a2b53 arch/x86/include/asm/memtype.h Ingo Molnar 2019-11-20 8 extern bool pat_enabled(void);
533d49b37a2b53 arch/x86/include/asm/memtype.h Ingo Molnar 2019-11-20 @9 extern void pat_disable(const char *reason);
2e5d9c857d4e6c include/asm-x86/pat.h venkatesh.pallipadi(a)intel.com 2008-03-18 10 extern void pat_init(void);
99c13b8c8896d7 arch/x86/include/asm/pat.h Mikulas Patocka 2017-07-04 11 extern void init_cache_modes(void);
2e5d9c857d4e6c include/asm-x86/pat.h venkatesh.pallipadi(a)intel.com 2008-03-18 12
:::::: The code at line 9 was first introduced by commit
:::::: 533d49b37a2b532354d3841a142173b8321818df x86/mm/pat: Clean up <asm/memtype.h> externs
:::::: TO: Ingo Molnar <mingo(a)kernel.org>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[robh:for-kernelci 1/9] drivers/tty/serial/lantiq.c:732 fetch_irq_lantiq() warn: unsigned 'ltq_port->tx_irq' is never less than zero.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-kernelci
head: 0e59c9b64d3363b98201fc040101f8ff62c7eafb
commit: e12887def507246bafed1c9b1b7f4f03ab225da5 [1/9] serial: lantiq: Remove usage of of_irq_to_resource_table()/of_irq_get()
config: i386-randconfig-m021-20211210 (https://download.01.org/0day-ci/archive/20211214/202112141920.cCz4wG5n-lk...)
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/tty/serial/lantiq.c:732 fetch_irq_lantiq() warn: unsigned 'ltq_port->tx_irq' is never less than zero.
drivers/tty/serial/lantiq.c:735 fetch_irq_lantiq() warn: unsigned 'ltq_port->rx_irq' is never less than zero.
drivers/tty/serial/lantiq.c:738 fetch_irq_lantiq() warn: unsigned 'ltq_port->err_irq' is never less than zero.
vim +732 drivers/tty/serial/lantiq.c
725
726 static int fetch_irq_lantiq(struct device *dev, struct ltq_uart_port *ltq_port)
727 {
728 struct uart_port *port = <q_port->port;
729 struct platform_device *pdev = to_platform_device(dev);
730
731 ltq_port->tx_irq = platform_get_irq(pdev, 0);
> 732 if (ltq_port->tx_irq < 0)
733 return ltq_port->tx_irq;
734 ltq_port->rx_irq = platform_get_irq(pdev, 1);
> 735 if (ltq_port->rx_irq < 0)
736 return ltq_port->rx_irq;
737 ltq_port->err_irq = platform_get_irq(pdev, 2);
> 738 if (ltq_port->err_irq < 0)
739 return ltq_port->err_irq;
740
741 port->irq = ltq_port->tx_irq;
742
743 return 0;
744 }
745
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH 06/17] fortify: Detect struct member overflows in memcpy() at compile-time
by kernel test robot
Hi Kees,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc5]
[cannot apply to rdma/for-next axboe-block/for-next kvm/queue tip/x86/core mkp-scsi/for-next jejb-scsi/for-next]
[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/Kees-Cook/Enable-strict-compile-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git aa50faff4416c869b52dff68a937c84d29e12f4b
config: riscv-randconfig-s031-20211214 (https://download.01.org/0day-ci/archive/20211214/202112141904.hqRtWx0l-lk...)
compiler: riscv32-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.4-dirty
# https://github.com/0day-ci/linux/commit/80c8d2aae95aae6bd09e3ef84b74d0afe...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kees-Cook/Enable-strict-compile-time-memcpy-fortify-checks/20211214-064002
git checkout 80c8d2aae95aae6bd09e3ef84b74d0afe631abae
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash drivers/video/fbdev/core/
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/core/fbmem.c:808:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got unsigned char [noderef] [usertype] __iomem *[assigned] src @@
drivers/video/fbdev/core/fbmem.c:808:17: sparse: expected void const *
drivers/video/fbdev/core/fbmem.c:808:17: sparse: got unsigned char [noderef] [usertype] __iomem *[assigned] src
drivers/video/fbdev/core/fbmem.c:808:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got unsigned char [noderef] [usertype] __iomem *[assigned] src @@
drivers/video/fbdev/core/fbmem.c:808:17: sparse: expected void const *
drivers/video/fbdev/core/fbmem.c:808:17: sparse: got unsigned char [noderef] [usertype] __iomem *[assigned] src
drivers/video/fbdev/core/fbmem.c:808:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const * @@ got unsigned char [noderef] [usertype] __iomem *[assigned] src @@
drivers/video/fbdev/core/fbmem.c:808:17: sparse: expected void const *
drivers/video/fbdev/core/fbmem.c:808:17: sparse: got unsigned char [noderef] [usertype] __iomem *[assigned] src
>> drivers/video/fbdev/core/fbmem.c:885:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got unsigned char [noderef] [usertype] __iomem *[assigned] dst @@
drivers/video/fbdev/core/fbmem.c:885:17: sparse: expected void const *
drivers/video/fbdev/core/fbmem.c:885:17: sparse: got unsigned char [noderef] [usertype] __iomem *[assigned] dst
>> drivers/video/fbdev/core/fbmem.c:885:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got unsigned char [noderef] [usertype] __iomem *[assigned] dst @@
drivers/video/fbdev/core/fbmem.c:885:17: sparse: expected void const *
drivers/video/fbdev/core/fbmem.c:885:17: sparse: got unsigned char [noderef] [usertype] __iomem *[assigned] dst
drivers/video/fbdev/core/fbmem.c:885:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got unsigned char [noderef] [usertype] __iomem *[assigned] dst @@
drivers/video/fbdev/core/fbmem.c:885:17: sparse: expected void *
drivers/video/fbdev/core/fbmem.c:885:17: sparse: got unsigned char [noderef] [usertype] __iomem *[assigned] dst
vim +885 drivers/video/fbdev/core/fbmem.c
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 826
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 827 static ssize_t
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 828 fb_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 829 {
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 830 unsigned long p = *ppos;
c47747fde931c0 drivers/video/fbmem.c Linus Torvalds 2011-05-11 831 struct fb_info *info = file_fb_info(file);
f11b478d461b71 drivers/video/fbmem.c James Hogan 2010-10-27 832 u8 *buffer, *src;
f11b478d461b71 drivers/video/fbmem.c James Hogan 2010-10-27 833 u8 __iomem *dst;
f11b478d461b71 drivers/video/fbmem.c James Hogan 2010-10-27 834 int c, cnt = 0, err = 0;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 835 unsigned long total_size;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 836
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 837 if (!info || !info->screen_base)
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 838 return -ENODEV;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 839
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 840 if (info->state != FBINFO_STATE_RUNNING)
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 841 return -EPERM;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 842
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 843 if (info->fbops->fb_write)
3f9b0880e4a96b drivers/video/fbmem.c Antonino A. Daplas 2007-05-08 844 return info->fbops->fb_write(info, buf, count, ppos);
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 845
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 846 total_size = info->screen_size;
0a484a3af905a2 drivers/video/fbmem.c Antonino A. Daplas 2006-01-09 847
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 848 if (total_size == 0)
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 849 total_size = info->fix.smem_len;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 850
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 851 if (p > total_size)
6a2a88668e90cd drivers/video/fbmem.c Antonino A. Daplas 2006-04-18 852 return -EFBIG;
0a484a3af905a2 drivers/video/fbmem.c Antonino A. Daplas 2006-01-09 853
6a2a88668e90cd drivers/video/fbmem.c Antonino A. Daplas 2006-04-18 854 if (count > total_size) {
6a2a88668e90cd drivers/video/fbmem.c Antonino A. Daplas 2006-04-18 855 err = -EFBIG;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 856 count = total_size;
6a2a88668e90cd drivers/video/fbmem.c Antonino A. Daplas 2006-04-18 857 }
6a2a88668e90cd drivers/video/fbmem.c Antonino A. Daplas 2006-04-18 858
6a2a88668e90cd drivers/video/fbmem.c Antonino A. Daplas 2006-04-18 859 if (count + p > total_size) {
6a2a88668e90cd drivers/video/fbmem.c Antonino A. Daplas 2006-04-18 860 if (!err)
6a2a88668e90cd drivers/video/fbmem.c Antonino A. Daplas 2006-04-18 861 err = -ENOSPC;
0a484a3af905a2 drivers/video/fbmem.c Antonino A. Daplas 2006-01-09 862
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 863 count = total_size - p;
6a2a88668e90cd drivers/video/fbmem.c Antonino A. Daplas 2006-04-18 864 }
0a484a3af905a2 drivers/video/fbmem.c Antonino A. Daplas 2006-01-09 865
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 866 buffer = kmalloc((count > PAGE_SIZE) ? PAGE_SIZE : count,
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 867 GFP_KERNEL);
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 868 if (!buffer)
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 869 return -ENOMEM;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 870
f11b478d461b71 drivers/video/fbmem.c James Hogan 2010-10-27 871 dst = (u8 __iomem *) (info->screen_base + p);
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 872
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 873 if (info->fbops->fb_sync)
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 874 info->fbops->fb_sync(info);
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 875
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 876 while (count) {
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 877 c = (count > PAGE_SIZE) ? PAGE_SIZE : count;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 878 src = buffer;
0a484a3af905a2 drivers/video/fbmem.c Antonino A. Daplas 2006-01-09 879
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 880 if (copy_from_user(src, buf, c)) {
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 881 err = -EFAULT;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 882 break;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 883 }
0a484a3af905a2 drivers/video/fbmem.c Antonino A. Daplas 2006-01-09 884
f11b478d461b71 drivers/video/fbmem.c James Hogan 2010-10-27 @885 fb_memcpy_tofb(dst, src, c);
f11b478d461b71 drivers/video/fbmem.c James Hogan 2010-10-27 886 dst += c;
f11b478d461b71 drivers/video/fbmem.c James Hogan 2010-10-27 887 src += c;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 888 *ppos += c;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 889 buf += c;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 890 cnt += c;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 891 count -= c;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 892 }
0a484a3af905a2 drivers/video/fbmem.c Antonino A. Daplas 2006-01-09 893
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 894 kfree(buffer);
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 895
6a2a88668e90cd drivers/video/fbmem.c Antonino A. Daplas 2006-04-18 896 return (cnt) ? cnt : err;
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 897 }
^1da177e4c3f41 drivers/video/fbmem.c Linus Torvalds 2005-04-16 898
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[remoteproc:rproc-next 13/13] drivers/remoteproc/rcar_rproc.c:28:12: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git rproc-next
head: 285892a74f1370a12249f765c6a4e3b16194852e
commit: 285892a74f1370a12249f765c6a4e3b16194852e [13/13] remoteproc: Add Renesas rcar driver
config: arm64-randconfig-s031-20211214 (https://download.01.org/0day-ci/archive/20211214/202112141828.E9RwMXA2-lk...)
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.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git/comm...
git remote add remoteproc git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git
git fetch --no-tags remoteproc rproc-next
git checkout 285892a74f1370a12249f765c6a4e3b16194852e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/remoteproc/
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/remoteproc/rcar_rproc.c:28:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *va @@ got void [noderef] __iomem * @@
drivers/remoteproc/rcar_rproc.c:28:12: sparse: expected void *va
drivers/remoteproc/rcar_rproc.c:28:12: sparse: got void [noderef] __iomem *
>> drivers/remoteproc/rcar_rproc.c:45:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *va @@
drivers/remoteproc/rcar_rproc.c:45:20: sparse: expected void volatile [noderef] __iomem *addr
drivers/remoteproc/rcar_rproc.c:45:20: sparse: got void *va
vim +28 drivers/remoteproc/rcar_rproc.c
20
21 static int rcar_rproc_mem_alloc(struct rproc *rproc,
22 struct rproc_mem_entry *mem)
23 {
24 struct device *dev = &rproc->dev;
25 void *va;
26
27 dev_dbg(dev, "map memory: %pa+%zx\n", &mem->dma, mem->len);
> 28 va = ioremap_wc(mem->dma, mem->len);
29 if (!va) {
30 dev_err(dev, "Unable to map memory region: %pa+%zx\n",
31 &mem->dma, mem->len);
32 return -ENOMEM;
33 }
34
35 /* Update memory entry va */
36 mem->va = va;
37
38 return 0;
39 }
40
41 static int rcar_rproc_mem_release(struct rproc *rproc,
42 struct rproc_mem_entry *mem)
43 {
44 dev_dbg(&rproc->dev, "unmap memory: %pa\n", &mem->dma);
> 45 iounmap(mem->va);
46
47 return 0;
48 }
49
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week