media: fimc-is-sysfs: silence Wsizeof-array-div
authorAnan Jaser <ananjaser@gmail.com>
Tue, 22 Sep 2020 20:50:20 +0000 (00:50 +0400)
committerivanmeler <i_ivan@windowslive.com>
Wed, 13 Apr 2022 21:14:07 +0000 (21:14 +0000)
drivers/media/platform/exynos/fimc-is2/vendor/mcd/fimc-is-sysfs.c:248:40: error: expression does not compute the number of elements in this arr
ay; element type is 'struct ssrm_camera_data', not 'int' [-Werror,-Wsizeof-array-div]
        if (ret_count > sizeof(SsrmCameraInfo)/sizeof(int))

Change-Id: I2f3b33c7c1951cfa316a9cc59d87308564ffbd93

drivers/media/platform/exynos/fimc-is2/vendor/mcd/fimc-is-sysfs.c

index 8910db40adc5df46b205e4d79e3dd262e191f6e1..2ab3be630efb6ed5d783c41ced5c0b611e7d73fb 100644 (file)
@@ -245,7 +245,7 @@ static ssize_t camera_ssrm_camera_info_store(struct device *dev,
        ret_count = sscanf(buf, "%d%d%d%d%d%d%d", &temp.operation, &temp.cameraID, &temp.previewMinFPS,
                &temp.previewMaxFPS, &temp.previewSizeWidth,  &temp.previewSizeHeight, &temp.sensorOn);
 
-       if (ret_count > sizeof(SsrmCameraInfo)/sizeof(int))
+       if (ret_count > sizeof(SsrmCameraInfo)/(sizeof(int)))
                return -EINVAL;
 
        switch (temp.operation) {