drivers: can: handlers: unify naming of local argument copies
Unify the naming scheme for local copies of user provided arguments. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
d98cfd1f8a
commit
ad34c670d8
1 changed files with 8 additions and 8 deletions
|
@ -10,14 +10,14 @@
|
|||
static int z_vrfy_can_calc_timing(const struct device *dev, struct can_timing *res,
|
||||
uint32_t bitrate, uint16_t sample_pnt)
|
||||
{
|
||||
struct can_timing local_res;
|
||||
struct can_timing res_copy;
|
||||
int err;
|
||||
|
||||
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, get_core_clock));
|
||||
Z_OOPS(z_user_from_copy(&local_res, res, sizeof(local_res)));
|
||||
Z_OOPS(z_user_from_copy(&res_copy, res, sizeof(res_copy)));
|
||||
|
||||
err = z_impl_can_calc_timing(dev, &local_res, bitrate, sample_pnt);
|
||||
Z_OOPS(z_user_to_copy(res, &local_res, sizeof(*res)));
|
||||
err = z_impl_can_calc_timing(dev, &res_copy, bitrate, sample_pnt);
|
||||
Z_OOPS(z_user_to_copy(res, &res_copy, sizeof(*res)));
|
||||
|
||||
return err;
|
||||
}
|
||||
|
@ -84,14 +84,14 @@ static inline const struct can_timing *z_vrfy_can_get_timing_max(const struct de
|
|||
static int z_vrfy_can_calc_timing_data(const struct device *dev, struct can_timing *res,
|
||||
uint32_t bitrate, uint16_t sample_pnt)
|
||||
{
|
||||
struct can_timing local_res;
|
||||
struct can_timing res_copy;
|
||||
int err;
|
||||
|
||||
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, get_core_clock));
|
||||
Z_OOPS(z_user_from_copy(&local_res, res, sizeof(local_res)));
|
||||
Z_OOPS(z_user_from_copy(&res_copy, res, sizeof(res_copy)));
|
||||
|
||||
err = z_impl_can_calc_timing_data(dev, &local_res, bitrate, sample_pnt);
|
||||
Z_OOPS(z_user_to_copy(res, &local_res, sizeof(*res)));
|
||||
err = z_impl_can_calc_timing_data(dev, &res_copy, bitrate, sample_pnt);
|
||||
Z_OOPS(z_user_to_copy(res, &res_copy, sizeof(*res)));
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue