[PATCH 04/10] hid/hid-picolcd: Remove struct backlight_ops.check_fb
kernel test robot
lkp at intel.com
Tue Feb 13 14:53:23 UTC 2024
Hi Thomas,
kernel test robot noticed the following build errors:
[auto build test ERROR on lee-backlight/for-backlight-next]
[also build test ERROR on lee-backlight/for-backlight-fixes hid/for-next lee-leds/for-leds-next linus/master v6.8-rc4 next-20240213]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Thomas-Zimmermann/backlight-Match-backlight-device-against-struct-fb_info-bl_dev/20240213-002853
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git for-backlight-next
patch link: https://lore.kernel.org/r/20240212162645.5661-5-tzimmermann%40suse.de
patch subject: [PATCH 04/10] hid/hid-picolcd: Remove struct backlight_ops.check_fb
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240213/202402132248.A5ky78Hx-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240213/202402132248.A5ky78Hx-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402132248.A5ky78Hx-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/hid/hid-picolcd_fb.c:497:8: error: no member named 'bl_dev' in 'struct fb_info'
497 | info->bl_dev = data->backlight;
| ~~~~ ^
1 error generated.
vim +497 drivers/hid/hid-picolcd_fb.c
459
460 static DEVICE_ATTR(fb_update_rate, 0664, picolcd_fb_update_rate_show,
461 picolcd_fb_update_rate_store);
462
463 /* initialize Framebuffer device */
464 int picolcd_init_framebuffer(struct picolcd_data *data)
465 {
466 struct device *dev = &data->hdev->dev;
467 struct fb_info *info = NULL;
468 struct picolcd_fb_data *fbdata = NULL;
469 int i, error = -ENOMEM;
470 u32 *palette;
471
472 /* The extra memory is:
473 * - 256*u32 for pseudo_palette
474 * - struct fb_deferred_io
475 */
476 info = framebuffer_alloc(256 * sizeof(u32) +
477 sizeof(struct fb_deferred_io) +
478 sizeof(struct picolcd_fb_data) +
479 PICOLCDFB_SIZE, dev);
480 if (!info)
481 goto err_nomem;
482
483 info->fbdefio = info->par;
484 *info->fbdefio = picolcd_fb_defio;
485 info->par += sizeof(struct fb_deferred_io);
486 palette = info->par;
487 info->par += 256 * sizeof(u32);
488 for (i = 0; i < 256; i++)
489 palette[i] = i > 0 && i < 16 ? 0xff : 0;
490 info->pseudo_palette = palette;
491 info->fbops = &picolcdfb_ops;
492 info->var = picolcdfb_var;
493 info->fix = picolcdfb_fix;
494 info->fix.smem_len = PICOLCDFB_SIZE*8;
495
496 #ifdef CONFIG_HID_PICOLCD_BACKLIGHT
> 497 info->bl_dev = data->backlight;
498 #endif
499
500 fbdata = info->par;
501 spin_lock_init(&fbdata->lock);
502 fbdata->picolcd = data;
503 fbdata->update_rate = PICOLCDFB_UPDATE_RATE_DEFAULT;
504 fbdata->bpp = picolcdfb_var.bits_per_pixel;
505 fbdata->force = 1;
506 fbdata->vbitmap = info->par + sizeof(struct picolcd_fb_data);
507 fbdata->bitmap = vmalloc(PICOLCDFB_SIZE*8);
508 if (fbdata->bitmap == NULL) {
509 dev_err(dev, "can't get a free page for framebuffer\n");
510 goto err_nomem;
511 }
512 info->flags |= FBINFO_VIRTFB;
513 info->screen_buffer = fbdata->bitmap;
514 info->fix.smem_start = (unsigned long)fbdata->bitmap;
515 memset(fbdata->vbitmap, 0xff, PICOLCDFB_SIZE);
516 data->fb_info = info;
517
518 error = picolcd_fb_reset(data, 1);
519 if (error) {
520 dev_err(dev, "failed to configure display\n");
521 goto err_cleanup;
522 }
523
524 error = device_create_file(dev, &dev_attr_fb_update_rate);
525 if (error) {
526 dev_err(dev, "failed to create sysfs attributes\n");
527 goto err_cleanup;
528 }
529
530 fb_deferred_io_init(info);
531 error = register_framebuffer(info);
532 if (error) {
533 dev_err(dev, "failed to register framebuffer\n");
534 goto err_sysfs;
535 }
536 return 0;
537
538 err_sysfs:
539 device_remove_file(dev, &dev_attr_fb_update_rate);
540 fb_deferred_io_cleanup(info);
541 err_cleanup:
542 data->fb_info = NULL;
543
544 err_nomem:
545 if (fbdata)
546 vfree(fbdata->bitmap);
547 framebuffer_release(info);
548 return error;
549 }
550
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the dri-devel
mailing list