-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
homework #49
base: Alexandr.Nikitin
Are you sure you want to change the base?
homework #49
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My review is quite shallow and without testing.
The exercise overall is done, despite doesn't fully conform the task.
But:
- All the changes merged into baseline sources, which make it almost impossible to provide normal review;
- No description of what is done;
${KERNEL_SOURCE}/scripts/checkpatch.pl --file lesson-8-Character-Devices/*.c --terse
:
total: 45 errors, 49 warnings, 285 lines checked
.
The PR should be formatted according to the wiki.
static struct i2c_driver mpu6050_i2c_driver = { .driver = | ||
{ .name = "gl_mpu6050", }, | ||
|
||
.probe = mpu6050_probe, .remove = mpu6050_remove, .id_table = mpu6050_idtable, }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code formatting is just fantastic sometime.
if (kthread_should_stop()) { | ||
do_exit(0); | ||
} | ||
mpu6050_read_data(&g_mpu6050_data[number]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This's not a big deal, but, AFAIR, the task was to read sensor data only by request (but not more often than once per second) - not each second.
But there's an actual issue - no synchronization between reading and writing number
and g_mpu6050_data[]
.
mpu6050 with kthread