-
Notifications
You must be signed in to change notification settings - Fork 564
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
GSoC Warm Up Kernel Task #234
base: 5.4-rt
Are you sure you want to change the base?
Conversation
hartkopp/can-isotp@ced84ca Signed-off-by: Robert Nelson <[email protected]>
Signed-off-by: Robert Nelson <[email protected]>
…all-multi-tce for DDW" This reverts commit c4faf62.
This reverts commit 2875109.
patch-5.4.19-rt11.patch.xz Signed-off-by: Robert Nelson <[email protected]>
https://git.zx2c4.com/WireGuard/commit/edad0d6e99e5133b1e8e865d727a25fff6399cb4 Signed-off-by: Robert Nelson <[email protected]>
Reference: v5.6-rc5 Signed-off-by: Robert Nelson <[email protected]>
Reference: v5.5.8 Signed-off-by: Robert Nelson <[email protected]>
Signed-off-by: Robert Nelson <[email protected]>
Signed-off-by: Robert Nelson <[email protected]>
5.4.20-ti-rt-r6 bb.org_defconfig 5.4 TI Delta: RobertCNelson/ti-linux-kernel@68481af...738552d BBDTBS: beagleboard/BeagleBoard-DeviceTrees@cffe558 CAN-ISOTP: hartkopp/can-isotp@ced84ca RT: patch-5.4.19-rt11.patch.xz TI_AMX3_CM3: http://git.ti.com/gitweb/?p=processor-firmware/ti-amx3-cm3-pm-firmware.git;a=commit;h=6a849767df85ce9399494f53fb5c753665396653 WIREGUARD: https://git.zx2c4.com/WireGuard/commit/edad0d6e99e5133b1e8e865d727a25fff6399cb4 Signed-off-by: Robert Nelson <[email protected]>
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.
Good luck with your project. Looks like you are off to a good start.
I just wanted to share a few housekeeping things I learned from contributing to the Linux kernel (see inline comments).
config GSOC_DUMMY_CHAR_DEVICE | ||
tristate "GSoC Warmup Driver" | ||
help | ||
This builds the GSoC Dummy Char Driver, which is required for the warmup task. |
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.
Help lines should be indented with 1 tab + 2 spaces
drivers/char/Kconfig
Outdated
only mixes the entropy pool. |
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.
Watch out for unintentional changes like editors that automatically add a newline at the end of the file.
* Dummy character driver by | ||
* John Madieu <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or |
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.
Using SPDX license identifier is used nowdays instead of license paragraphs.
https://www.kernel.org/doc/html/latest/process/license-rules.html
#include <linux/cdev.h> | ||
#include <linux/uaccess.h> | ||
|
||
static int gsoc_char_dev_open(struct inode * inode, struct file * file); |
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.
It probably depends on the area of the kernel but most code I have seen tries to avoid forward declarations if possible by rearranging the code.
// register a range of char dev numbers 0 to 1 in this case | ||
err = alloc_chrdev_region(&gsoc_dev, 0, 1, "gsoc_dummy_char_dev"); | ||
if (err < 0) { | ||
pr_err("Can't get major number\n"); |
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.
It is a good idea to include the module name in the error message so users know which module the error came from.
static ssize_t gsoc_char_dev_read(struct file *file, char __user * buf, size_t count, | ||
loff_t * offset) | ||
{ | ||
pr_info("Read function of GSoC dummy driver called.\n"); |
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.
It could be fun to actually put something in the buffer so that you can actually read something from the character device.
Hey David, thank you very much for these helpful tricks. Best, |
326b612
to
aaaf846
Compare
44ff8bd
to
9cf53b3
Compare
b533d1d
to
36e5010
Compare
681c6fa
to
3fef3b8
Compare
dd2e1d9
to
b687de1
Compare
a0eb9c6
to
f1d27f8
Compare
1296885
to
1ec7015
Compare
35c83cd
to
99cce5a
Compare
3ab269b
to
5f60de4
Compare
This is the pull request for Media Ip Streaming project, which implements a dummy kernel driver for the GSoC 2020 warm up task.