CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Daniel Gomez <[email protected]>

Hi Daniel,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v5.7-rc1 next-20200414]
[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/Daniel-Gomez/v4l2-api-changes-for-imx378-driver/20200415-053427
base:   git://linuxtv.org/media_tree.git master
:::::: branch date: 10 hours ago
:::::: commit date: 10 hours ago

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <[email protected]>
Reported-by: Julia Lawall <[email protected]>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/media/i2c/imx378.c:978:2-8: preceding lock on line 975

# 
https://github.com/0day-ci/linux/commit/f64d4e1406bfb5507f25b050f49c07d89711772d
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout f64d4e1406bfb5507f25b050f49c07d89711772d
vim +978 drivers/media/i2c/imx378.c

f64d4e1406bfb5 Daniel Gomez 2020-04-14   965  
f64d4e1406bfb5 Daniel Gomez 2020-04-14   966  static int imx378_set_fmt(struct 
v4l2_subdev *sd,
f64d4e1406bfb5 Daniel Gomez 2020-04-14   967                      struct 
v4l2_subdev_pad_config *cfg,
f64d4e1406bfb5 Daniel Gomez 2020-04-14   968                      struct 
v4l2_subdev_format *fmt)
f64d4e1406bfb5 Daniel Gomez 2020-04-14   969  {
f64d4e1406bfb5 Daniel Gomez 2020-04-14   970    struct imx378 *imx378 = 
to_imx378(sd);
f64d4e1406bfb5 Daniel Gomez 2020-04-14   971    struct v4l2_mbus_framefmt 
*__fmt;
f64d4e1406bfb5 Daniel Gomez 2020-04-14   972    struct v4l2_rect *__crop;
f64d4e1406bfb5 Daniel Gomez 2020-04-14   973    struct 
v4l2_subdev_frame_interval fival = { };
f64d4e1406bfb5 Daniel Gomez 2020-04-14   974  
f64d4e1406bfb5 Daniel Gomez 2020-04-14  @975    mutex_lock(&imx378->mutex);
f64d4e1406bfb5 Daniel Gomez 2020-04-14   976  
f64d4e1406bfb5 Daniel Gomez 2020-04-14   977    if (imx378->streaming && 
fmt->which != V4L2_SUBDEV_FORMAT_TRY)
f64d4e1406bfb5 Daniel Gomez 2020-04-14  @978            return -EBUSY;
f64d4e1406bfb5 Daniel Gomez 2020-04-14   979  
f64d4e1406bfb5 Daniel Gomez 2020-04-14   980    __crop = 
__imx378_get_pad_crop(imx378, cfg, fmt->pad, fmt->which);
f64d4e1406bfb5 Daniel Gomez 2020-04-14   981  
f64d4e1406bfb5 Daniel Gomez 2020-04-14   982    
v4l_bound_align_image(&fmt->format.width, IMX378_MIN_WIDTH,
f64d4e1406bfb5 Daniel Gomez 2020-04-14   983                          
IMX378_MAX_BOUNDS_WIDTH, ilog2(4),
f64d4e1406bfb5 Daniel Gomez 2020-04-14   984                          
&fmt->format.height, IMX378_MIN_HEIGHT,
f64d4e1406bfb5 Daniel Gomez 2020-04-14   985                          
IMX378_MAX_BOUNDS_HEIGHT, ilog2(8), 0);
f64d4e1406bfb5 Daniel Gomez 2020-04-14   986  
f64d4e1406bfb5 Daniel Gomez 2020-04-14   987    __crop->width = 
fmt->format.width;
f64d4e1406bfb5 Daniel Gomez 2020-04-14   988    __crop->height = 
fmt->format.height;
f64d4e1406bfb5 Daniel Gomez 2020-04-14   989  
f64d4e1406bfb5 Daniel Gomez 2020-04-14   990    
v4l_bound_align_image(&__crop->left, 0,
f64d4e1406bfb5 Daniel Gomez 2020-04-14   991                          
IMX378_MAX_BOUNDS_WIDTH - __crop->width, ilog2(4),
f64d4e1406bfb5 Daniel Gomez 2020-04-14   992                          
&__crop->top, 0,
f64d4e1406bfb5 Daniel Gomez 2020-04-14   993                          
IMX378_MAX_BOUNDS_HEIGHT - __crop->height,
f64d4e1406bfb5 Daniel Gomez 2020-04-14   994                          ilog2(8), 
0);
f64d4e1406bfb5 Daniel Gomez 2020-04-14   995  
f64d4e1406bfb5 Daniel Gomez 2020-04-14   996    __fmt = 
__imx378_get_pad_format(imx378, cfg, fmt->pad, fmt->which);
f64d4e1406bfb5 Daniel Gomez 2020-04-14   997  
f64d4e1406bfb5 Daniel Gomez 2020-04-14   998    __fmt->width = __crop->width;
f64d4e1406bfb5 Daniel Gomez 2020-04-14   999    __fmt->height = __crop->height;
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1000  
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1001    if (fmt->format.code && 
fmt->which != V4L2_SUBDEV_FORMAT_TRY)
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1002            
imx378_set_flip_mode(imx378, fmt->format.code);
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1003  
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1004    __fmt->code = 
imx378_get_format_code(imx378);
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1005  
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1006    __fmt->field = V4L2_FIELD_NONE;
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1007    __fmt->colorspace = 
V4L2_COLORSPACE_SRGB;
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1008    __fmt->ycbcr_enc = 
V4L2_MAP_YCBCR_ENC_DEFAULT(fmt->format.colorspace);
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1009    __fmt->quantization = 
V4L2_MAP_QUANTIZATION_DEFAULT(true,
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1010                          
__fmt->colorspace, __fmt->ycbcr_enc);
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1011    __fmt->xfer_func = 
V4L2_MAP_XFER_FUNC_DEFAULT(__fmt->colorspace);
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1012  
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1013    fmt->format = *__fmt;
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1014  
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1015    /* Frame interval depends on 
the format so, update it accordingly */
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1016    if (fmt->which != 
V4L2_SUBDEV_FORMAT_TRY) {
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1017            fival.interval = 
imx378->fival;
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1018            
imx378_s_frame_interval(sd, &fival);
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1019    }
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1020  
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1021    mutex_unlock(&imx378->mutex);
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1022  
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1023    return 0;
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1024  }
f64d4e1406bfb5 Daniel Gomez 2020-04-14  1025  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to