Re: [PATCH 04/10] iio: cros_ec: Add common functions for cros_ec sensors.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Thanks for the review, I'll add the changes in v2, some answers below ...

and my answers
 
> >>> +static ssize_t cros_ec_sensors_id(struct iio_dev *indio_dev,
> >>> +            uintptr_t private, const struct iio_chan_spec *chan,
> >>> +            char *buf)
> >>> +{
> >>> +    struct cros_ec_sensors_core_state *st = iio_priv(indio_dev);
> >>> +
> >>> +    return sprintf(buf, "%d\n", st->param.info.sensor_num);
> >>
> >> can't we be a bit more careful with buffer sizes here (and below)?
> >>
> 
> I'm not sure I get what you mean here.

snprintf(buf, PAGE_SIZE, ...
or maybe a more appropriate bound
 
p.

-- 

Peter Meerwald-Stadler
+43-664-2444418 (mobile)
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux