Skip to content

Commit a1ed394

Browse files
committed
fix code review remarks
1 parent b20569f commit a1ed394

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

kernel/realsense/d4xx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3195,7 +3195,7 @@ static int ds5_s_ctrl(struct v4l2_ctrl *ctrl)
31953195
memcpy(calib_cmd, &set_calib_data, sizeof(set_calib_data));
31963196
calib_cmd->header = 276;
31973197
calib_cmd->param1 = DEPTH_CALIBRATION_ID;
3198-
__memcpy(calib_cmd->Data, (u8 *)ctrl->p_new.p, 256);
3198+
unsafe_memcpy(calib_cmd->Data, (u8 *)ctrl->p_new.p, 256, "flexible array");
31993199
ret = ds5_set_calibration_data(state, calib_cmd,
32003200
sizeof(struct hwm_cmd) + 256);
32013201
devm_kfree(&state->client->dev, calib_cmd);
@@ -3224,7 +3224,7 @@ static int ds5_s_ctrl(struct v4l2_ctrl *ctrl)
32243224
memcpy(calib_cmd, &set_calib_data, sizeof (set_calib_data));
32253225
calib_cmd->header = 532;
32263226
calib_cmd->param1 = COEF_CALIBRATION_ID;
3227-
__memcpy(calib_cmd->Data, (u8 *)ctrl->p_new.p, 512);
3227+
unsafe_memcpy(calib_cmd->Data, (u8 *)ctrl->p_new.p, 512, "flexible array");
32283228
ret = ds5_set_calibration_data(state, calib_cmd,
32293229
sizeof(struct hwm_cmd) + 512);
32303230
devm_kfree(&state->client->dev, calib_cmd);
@@ -3260,7 +3260,7 @@ static int ds5_s_ctrl(struct v4l2_ctrl *ctrl)
32603260
break;
32613261
}
32623262
memcpy(ae_setpoint_cmd, &set_ae_setpoint, sizeof (set_ae_setpoint));
3263-
__memcpy(ae_setpoint_cmd->Data, (u8 *)ctrl->p_new.p_s32, 4);
3263+
unsafe_memcpy(ae_setpoint_cmd->Data, (u8 *)ctrl->p_new.p_s32, 4, "flexible array");
32643264
ret = ds5_send_hwmc(state, sizeof(struct hwm_cmd) + 4,
32653265
ae_setpoint_cmd);
32663266
if (!ret)
@@ -5189,7 +5189,7 @@ static int ds5_mux_get_fmt(struct v4l2_subdev *sd,
51895189

51905190
/* Video ops */
51915191
static int ds5_mux_g_frame_interval(struct v4l2_subdev *sd,
5192-
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0) || LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0)
5192+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0)
51935193
struct v4l2_subdev_state *state,
51945194
#endif
51955195
struct v4l2_subdev_frame_interval *fi)

0 commit comments

Comments
 (0)