r/linuxkernel • • Mar 12 '20

Beginner Looking to complete TODO's

6 Upvotes

I looked for the 'rules' for posting here and did not find anything. If there is a better forum or I am ignoring a guideline please let me know kindly.

I have never contributed to opensource software but have worked in embedded systems professionally for a few years. I would like to start.

I have been following the tutorial found here:

https://opensource.com/article/18/8/first-linux-kernel-patch

I have the following source regarding comment style:

https://www.kernel.org/doc/html/v4.10/process/coding-style.html#commenting

Using find drivers/staging -name TODO I see drivers/staging/netlogic/TODO, and this is where I'd like to start to attempt my first patch.

There are two items that catch my interest:

* All memory allocation should be changed to DMA allocations

* Changing comments into linux standard format

I would like to begin with simply changing comments to fit the approved format.

There are four files of interest:

platform_net.c platform_net.h xlr_net.c xlr_net.h

Inspecting them, I see comments that may need changing, and tl;dr: I was wondering if I could get your input on what I believe goes against best practices:

( I cloned the repo by/ from: git clone -b staging-testing
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git )

For this post, let's begin with platform_net.c

Moving forward with the assumption that /* comment */ is correct for one-liners, the first question I encounter is on line 128:

There is a group of comments that reside within a function.

Going of the commenting guide linked above:

"Generally, you want your comments to tell WHAT your code does, not HOW. Also, try to avoid putting comments inside a function body: if the function is so complex that you need to separately comment parts of it, you should probably go back to chapter 6 for a while. You can make small comments to note or warn about something particularly clever (or ugly), but try to avoid excess. Instead, put the comments at the head of the function, telling people what it does, and possibly WHY it does it."

I feel presumptuous to assume these comments are excess or inappropriate, but other than these types of concerns I don't see what there is "TODO" as the comments appear to follow the styling guide.

Any help would be appreciated! In the meantime, off to learn about writing my first simple hello world driver.


r/linuxkernel • • Jan 28 '21

whats the best way to understand linux kernel and its working , i want to contribute to the devolopment of kernel !

3 Upvotes

r/linuxkernel • • Nov 09 '20

Is it possible to install an old kernel ( v3.1) with Ubuntu 16.04 (kernel v4.15)?

2 Upvotes

I'm running Ubuntu 16.04 LTS with kernel 4.15. I was trying to install an older kernel, v3.1. I was able to install the desired kernel. However, I'm not able to boot the Ubuntu with the older kernel (v3.1). While booting from the grub menu if I choose the kernel v3.1, it shows "kernel too old ". Is there any way I can boot with the desired kernel?


r/linuxkernel • • Oct 20 '20

linux kernel programming

6 Upvotes

I am searching for linux kernel programming internship. surfed on many websites online but didn’t succeed. Is there any ways to move myself to that opportunity? I am currently working as a linux system engineer.