Skip to contentSkip to conversation

Ask for help finding cleanups

Outreachy Info Alison Schofield 6 participants 13 messages Mar 14, 2023 – Mar 17, 2023 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi Applicants,

We want to support you finding cleanups. Today I spent some time looking through staging and am working up a small todo list that may be useful.

I posted one such cleanup to Menna because I saw them submit a couple of attempts at a first patches.

I think that Kloudifold, Khadija, and Sumitra are busy iterating on their first patches. Keep going! Ask for help finding your second patch if needed.

Anyone else who wants help in finding their first patch, please reach out. I imagine their are some folks exploring here, that I haven't met on the list yet.

Finally, it seems we won't be holding to the traditional 10 cleanup patch requirement this round! Please continue your efforts and I'll redirect you towards projects after a 'few' cleanup patches are accepted into staging.

Thanks,
Alison

#1 lore raw
Quoted 5 lines · Alison Schofield

Hi Applicants,

We want to support you finding cleanups. Today I spent some time looking through staging and am working up a small todo list that may be useful.

I'm interested in doing the required demo for the kernel. Let me know what I should do next presupposing there is a list of tasks.

Quoted 11 lines

I posted one such cleanup to Menna because I saw them submit a couple of attempts at a first patches.

I think that Kloudifold, Khadija, and Sumitra are busy iterating on their first patches. Keep going! Ask for help finding your second patch if needed.

Anyone else who wants help in finding their first patch, please reach out. I imagine their are some folks exploring here, that I haven't met on the list yet.

Hello, that's me! I was originally working on the Outreachy LLVM project but had short term health problems, and that meant I let that opportunity get away.

Quoted 6 lines

Finally, it seems we won't be holding to the traditional 10 cleanup patch requirement this round! Please continue your efforts and I'll redirect you towards projects after a 'few' cleanup patches are accepted into staging.

I have some catching up to do. I dug through a little more than a page of Linux mailing list messages but was able to glean a bunch of things that were helpful. These are things like patch creation best practices, posting on code style, joining a mailing list, and documentation.

Hope to hear from everyone later.

(here's a question: is it best practice to include 100 percent of the message pre-insertion of comments, or can I delete some of the original message?)

Quoted 5 lines

Thanks,
Alison

#2 lore raw
Quoted 42 lines · Mark Heim
Quoted 5 lines · Alison Schofield

Hi Applicants,

We want to support you finding cleanups. Today I spent some time looking through staging and am working up a small todo list that may be useful.

I'm interested in doing the required demo for the kernel. Let me know what I should do next presupposing there is a list of tasks.

Quoted 11 lines

I posted one such cleanup to Menna because I saw them submit a couple of attempts at a first patches.

I think that Kloudifold, Khadija, and Sumitra are busy iterating on their first patches. Keep going! Ask for help finding your second patch if needed.

Anyone else who wants help in finding their first patch, please reach out. I imagine their are some folks exploring here, that I haven't met on the list yet.

Hello, that's me! I was originally working on the Outreachy LLVM project but had short term health problems, and that meant I let that opportunity get away.

Quoted 6 lines

Finally, it seems we won't be holding to the traditional 10 cleanup patch requirement this round! Please continue your efforts and I'll redirect you towards projects after a 'few' cleanup patches are accepted into staging.

I have some catching up to do. I dug through a little more than a page of Linux mailing list messages but was able to glean a bunch of things that were helpful. These are things like patch creation best practices, posting on code style, joining a mailing list, and documentation.

Quoted 5 lines

Hope to hear from everyone later.

(here's a question: is it best practice to include 100 percent of the message pre-insertion of comments, or can I delete some of the original message?)

To snip or not to snip! I think not-snipping here was appropriate.

This is the formal starting point:
https://www.outreachy.org/outreachy-may-2023-internship-cohort/communities/linux-kernel/

Each project starts with 'Community-Wide Requirements', so follow that section.

Welcome,
Alison

Quoted 7 lines
Quoted 6 lines

Thanks,
Alison

A message that is not in the archive (sent off-list or not yet received): CALfc2nhr7fWD33T5000kJt9stcgQ3fJM8YNTQhRgozxFYDxyYw@mail.gmail.com

#4 lore raw
Quoted 5 lines · Mark Heim

Hello all,

I have found a refactoring opportunity that might be a good starting point for me, but it is buried in the code.

Quoted 8 lines

It is in the prism2fw.c file under the directory tree kernels/staging/drivers/staging. I'm trying to do a procedure called extract a method (according to a book I have) that provides better modularity for the code and makes further refactorings easier.

I was a little surprised that the rebasing was going through with updates, but I'm probably going to be able to finish this task by tomorrow. I hope I get a shot at this one this time.

Sounds interesting Mark!

prism2fw.c is a 'utility for downloading prism2 images moved into kernelspace' so you'll just be compiling the utility itself, not the PRIMS2_USB driver.

At the moment, it doesn't compile, as is, in my environment. Let me know if you encounter, and have a solution for this:

$ cc prism2fw.c
prism2fw.c:51:10: fatal error: linux/ihex.h: No such file or directory
   51 | #include <linux/ihex.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.

Alison

Quoted 76 lines

Mark

Quoted 70 lines · Alison Schofield
Quoted 42 lines · Mark Heim
Quoted 5 lines · Alison Schofield

Hi Applicants,

We want to support you finding cleanups. Today I spent some time looking through staging and am working up a small todo list that may be useful.

I'm interested in doing the required demo for the kernel. Let me know what I should do next presupposing there is a list of tasks.

Quoted 11 lines

I posted one such cleanup to Menna because I saw them submit a couple of attempts at a first patches.

I think that Kloudifold, Khadija, and Sumitra are busy iterating on their first patches. Keep going! Ask for help finding your second patch if needed.

Anyone else who wants help in finding their first patch, please reach out. I imagine their are some folks exploring here, that I haven't met on the list yet.

Hello, that's me! I was originally working on the Outreachy LLVM project but had short term health problems, and that meant I let that opportunity get away.

Quoted 6 lines

Finally, it seems we won't be holding to the traditional 10 cleanup patch requirement this round! Please continue your efforts and I'll redirect you towards projects after a 'few' cleanup patches are accepted into staging.

I have some catching up to do. I dug through a little more than a page of Linux mailing list messages but was able to glean a bunch of things that were helpful. These are things like patch creation best practices, posting on code style, joining a mailing list, and documentation.

Quoted 5 lines

Hope to hear from everyone later.

(here's a question: is it best practice to include 100 percent of the message pre-insertion of comments, or can I delete some of the original message?)

To snip or not to snip! I think not-snipping here was appropriate.

This is the formal starting point:

https://www.outreachy.org/outreachy-may-2023-internship-cohort/communities/linux-kernel/

Each project starts with 'Community-Wide Requirements', so follow that section.

Welcome,
Alison

Quoted 7 lines
Quoted 6 lines

Thanks,
Alison

A message that is not in the archive (sent off-list or not yet received): CALfc2nioOy+T7GyV==Akr5WY5gC_awadai77k4tqr-NGNhaR+A@mail.gmail.com

#6 lore raw

+outreachy

Quoted 7 lines · Mark Heim

Hello,

It looks like the two headers at the top of prism2fw.c are in the staging/include directory. I didn't notice that the makefile for the build does not compile it. A proper PATH variable upon compiling should fix that issue.

Thanks Mark!
Maybe directions to compile it belong at the top of the file.

Quoted 119 lines

Mark

Quoted 113 lines · Alison Schofield
Quoted 11 lines · Mark Heim

Hello all,

I have found a refactoring opportunity that might be a good starting point for me, but it is buried in the code.

It is in the prism2fw.c file under the directory tree kernels/staging/drivers/staging. I'm trying to do a procedure called extract a method (according to a book I have) that provides better modularity for the code and makes further refactorings easier.

I was a little surprised that the rebasing was going through with

updates,

Quoted 2 lines

but I'm probably going to be able to finish this task by tomorrow. I hope I get a shot at this one this time.

Sounds interesting Mark!

prism2fw.c is a 'utility for downloading prism2 images moved into kernelspace'
so you'll just be compiling the utility itself, not the PRIMS2_USB driver.

At the moment, it doesn't compile, as is, in my environment. Let me know if you encounter, and have a solution for this:

$ cc prism2fw.c
prism2fw.c:51:10: fatal error: linux/ihex.h: No such file or directory
   51 | #include <linux/ihex.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.

Alison

Quoted 29 lines

Mark

Quoted 23 lines · Alison Schofield
Quoted 22 lines · Mark Heim
Quoted 5 lines · Alison Schofield

Hi Applicants,

We want to support you finding cleanups. Today I spent some time looking through staging and am working up a small todo list that may be useful.

I'm interested in doing the required demo for the kernel. Let me know what I should do next presupposing there is a list of tasks.

Quoted 9 lines

I posted one such cleanup to Menna because I saw them submit a couple of attempts at a first patches.

I think that Kloudifold, Khadija, and Sumitra are busy iterating on their first patches. Keep going! Ask for help finding your second patch if needed.

Anyone else who wants help in finding their first patch, please

reach

Quoted 26 lines
Quoted 26 lines
Quoted 25 lines
Quoted 2 lines

out. I imagine their are some folks exploring here, that I haven't met on the list yet.

Hello, that's me! I was originally working on the Outreachy LLVM project but had short term health problems, and that meant I let that opportunity get away.

Quoted 6 lines

Finally, it seems we won't be holding to the traditional 10 cleanup patch requirement this round! Please continue your efforts and I'll redirect you towards projects after a 'few' cleanup patches are accepted into staging.

I have some catching up to do. I dug through a little more than a page of Linux mailing list messages but was able to glean a bunch of things that were helpful. These are things like patch creation best practices, posting on code style, joining a mailing list, and documentation.

Hope to hear from everyone later.

(here's a question: is it best practice to include 100 percent of the message pre-insertion of comments, or can I delete some of the original message?)

Quoted 5 lines
Quoted 5 lines

To snip or not to snip! I think not-snipping here was appropriate.

This is the formal starting point:

https://www.outreachy.org/outreachy-may-2023-internship-cohort/communities/linux-kernel/

Quoted 16 lines
Quoted 16 lines

Each project starts with 'Community-Wide Requirements', so follow that section.

Welcome,
Alison

Quoted 7 lines
Quoted 6 lines

Thanks,
Alison

#7 lore raw
In reply to Alison Schofield

Hi Alison,

Thanks, appreciate your help.

Quoted 8 lines · Alison Schofield

Hi Applicants,

We want to support you finding cleanups. Today I spent some time looking through staging and am working up a small todo list that may be useful.

I posted one such cleanup to Menna because I saw them submit a couple of attempts at a first patches.

Thanks, but Ira said that Kadija has been working on it, so please if you can send another one.

appreciate your support.

Best Regards,

Menna

Quoted 19 lines

I think that Kloudifold, Khadija, and Sumitra are busy iterating on their first patches. Keep going! Ask for help finding your second patch if needed.

Anyone else who wants help in finding their first patch, please reach out. I imagine their are some folks exploring here, that I haven't met on the list yet.

Finally, it seems we won't be holding to the traditional 10 cleanup patch requirement this round! Please continue your efforts and I'll redirect you towards projects after a 'few' cleanup patches are accepted into staging.

Thanks,
Alison

#8 lore raw

Here is a possible suggestion of something to do.

There is a macro called container_of that extracts a structure that surrounds another structure (you may find it interesting to look at the definition of this macro).

In the staging tree, there are some definitions like:

#define to_lm3554(p_sd) container_of(p_sd, struct lm3554, sd)

These are often in header (.h) files, but you may want to check .c files too.

It is not great to have such a thing as a macro, because from looking at the definition one cannot tell what type it applies to.

One can get the same benefit from an efficiency point of view by making an inline function (concretely, typically a static inline function, because the definition only needs to be visible in the current file, or in the case of a header file in the file that includes the header file).

So the idea is to convert these macros into function definitions.

The possible challenge is that a function takes an argument of a specific type and returns a value of a specific type. In this case, there is always the possibility that the macro is being used because the arguemnt has different types at different call sites. So you need to check all the call sites, find the type of the argument, and check that that same type is used at all call sites.

julia

#9 lore raw
Quoted 23 lines · Julia Lawall

Here is a possible suggestion of something to do.

There is a macro called container_of that extracts a structure that surrounds another structure (you may find it interesting to look at the definition of this macro).

In the staging tree, there are some definitions like:

#define to_lm3554(p_sd) container_of(p_sd, struct lm3554, sd)

These are often in header (.h) files, but you may want to check .c files too.

It is not great to have such a thing as a macro, because from looking at the definition one cannot tell what type it applies to.

One can get the same benefit from an efficiency point of view by making an inline function (concretely, typically a static inline function, because the definition only needs to be visible in the current file, or in the case of a header file in the file that includes the header file).

So the idea is to convert these macros into function definitions.

Quoted 9 lines

The possible challenge is that a function takes an argument of a specific type and returns a value of a specific type. In this case, there is always the possibility that the macro is being used because the arguemnt has different types at different call sites. So you need to check all the call sites, find the type of the argument, and check that that same type is used at all call sites.

julia

Got it, Thanks Julia, I will check this. appreciate your help.

Menna

A message that is not in the archive (sent off-list or not yet received): CAOHb_39SAEOwJOCNqsvND5w81MbAHLROf+sRAu0AWi911teidA@mail.gmail.com

#11 lore raw
Quoted 4 lines · Olofu Ojoachubione

Hello Alison,
Please where can I text you so you could help me out with the kernel process so I can start making my contributions.

Hi Olofu,

I'm personally not on any of the Outreachy chat rooms, but you can try them out:

Join the #outreachy IRC channel on irc.gnome.org, and the #kernel-outreachy channel on irc.oftc.net.

It looks like you found the mailing list, so scroll back through that and find the Welcome message of March 7th.

You are welcome to email me, and please 'CC the outreachy list.

Welcome,
Alison

Quoted 31 lines
Quoted 28 lines · Alison Schofield

Hi Applicants,

We want to support you finding cleanups. Today I spent some time looking through staging and am working up a small todo list that may be useful.

I posted one such cleanup to Menna because I saw them submit a couple of attempts at a first patches.

I think that Kloudifold, Khadija, and Sumitra are busy iterating on their first patches. Keep going! Ask for help finding your second patch if needed.

Anyone else who wants help in finding their first patch, please reach out. I imagine their are some folks exploring here, that I haven't met on the list yet.

Finally, it seems we won't be holding to the traditional 10 cleanup patch requirement this round! Please continue your efforts and I'll redirect you towards projects after a 'few' cleanup patches are accepted into staging.

Thanks,
Alison

#12 lore raw
In reply to Alison Schofield
Quoted 6 lines · Alison Schofield

Hi Applicants,

We want to support you finding cleanups. Today I spent some time looking through staging and am working up a small todo list that may be useful.

Quoted 7 lines

I posted one such cleanup to Menna because I saw them submit a couple of attempts at a first patches.

I think that Kloudifold, Khadija, and Sumitra are busy iterating on their first patches. Keep going! Ask for help finding your second patch if needed.

Hi Alison,

My first patch is accepted. I will appreciate if you could help me to find a second patch.

Regards,

Sumitra

Quoted 13 lines

Anyone else who wants help in finding their first patch, please reach out. I imagine their are some folks exploring here, that I haven't met on the list yet.

Finally, it seems we won't be holding to the traditional 10 cleanup patch requirement this round! Please continue your efforts and I'll redirect you towards projects after a 'few' cleanup patches are accepted into staging.
Thanks,
Alison

#13 lore raw
Quoted 15 lines · Sumitra Sharma
Quoted 6 lines · Alison Schofield

Hi Applicants,

We want to support you finding cleanups. Today I spent some time looking through staging and am working up a small todo list that may be useful.

Quoted 7 lines

I posted one such cleanup to Menna because I saw them submit a couple of attempts at a first patches.

I think that Kloudifold, Khadija, and Sumitra are busy iterating on their first patches. Keep going! Ask for help finding your second patch if needed.

Quoted 8 lines

Hi Alison,

My first patch is accepted. I will appreciate if you could help me to find a second patch.

Regards,

Sumitra

Congratulations on getting the patch accepted!
I do see you sent another patch, and GregKH responded that it needs followup. He sent his automatic, problem with commit message and or commit log email. Revisit the docs he suggested and the first patch tutorial and see if you can come up with a rev 2 where the commit message 'says what you did' and the commit log 'says why you did it'.

Quoted 15 lines
Quoted 14 lines

Anyone else who wants help in finding their first patch, please reach out. I imagine their are some folks exploring here, that I haven't met on the list yet.

Finally, it seems we won't be holding to the traditional 10 cleanup patch requirement this round! Please continue your efforts and I'll redirect you towards projects after a 'few' cleanup patches are accepted into staging.
Thanks,
Alison

#14 lore raw
Quoted 23 lines · Alison Schofield
Quoted 22 lines · Sumitra Sharma
Quoted 6 lines · Alison Schofield

Hi Applicants,

We want to support you finding cleanups. Today I spent some time looking through staging and am working up a small todo list that may be useful.

Quoted 7 lines

I posted one such cleanup to Menna because I saw them submit a couple of attempts at a first patches.

I think that Kloudifold, Khadija, and Sumitra are busy iterating on their first patches. Keep going! Ask for help finding your second patch if needed.

Hi Alison,

My first patch is accepted. I will appreciate if you could help me to find a second patch.

Regards,

Quoted 9 lines
Quoted 1 line

Sumitra

Congratulations on getting the patch accepted!
I do see you sent another patch, and GregKH responded that it needs followup. He sent his automatic, problem with commit message and or commit log email. Revisit the docs he suggested and the first patch tutorial and see if you can come up with a rev 2 where the commit message 'says what you did' and the commit log 'says why you did it'.

Hi Alison,

I will work this way, Thank you for your guidance.

Regards,

Sumitra

#15 lore raw
In reply to Sumitra Sharma
Quoted 10 lines · On giovedì 16 marzo 2023 14:16:56 CET Sumitra Sharma wrote:
Quoted 9 lines · Alison Schofield

Hi Applicants,

We want to support you finding cleanups. Today I spent some time looking through staging and am working up a small todo list that may be useful.

I posted one such cleanup to Menna because I saw them submit a couple of attempts at a first patches.

Quoted 8 lines
Quoted 3 lines

I think that Kloudifold, Khadija, and Sumitra are busy iterating on their first patches. Keep going! Ask for help finding your second patch if needed.

Hi Alison,

My first patch is accepted. I will appreciate if you could help me to find a second patch.

I don't want to answer for Alison, however I would like to point out that in this same thread there are several suggestions, both from Alison and Julia, on how to find tasks in "driver/staging".

Scroll through the thread again and see if it helps you find more tasks. Alison's first post explains an effective way to find something in drivers/ staging

Thank you,

Fabio

PS: I think applicants shouldn't overlook Julia's post about certain macros evaluating in container_of(). As Julia suggested, you can work on converting these macros into function definitions.

Furthermore, this kind of work would help to understand the working and implementation details of container_of(), itself a macro used a lot in the drivers and core subsystems of the entire Kernel.

Isn't anyone interested in this kind of tasks? Please have a look at https://
lore.kernel.org/outreachy/[email protected]/

Quoted 14 lines

Regards,

Sumitra

Quoted 10 lines

Anyone else who wants help in finding their first patch, please reach out. I imagine their are some folks exploring here, that I haven't met on the list yet.

Finally, it seems we won't be holding to the traditional 10 cleanup patch requirement this round! Please continue your efforts and I'll redirect you towards projects after a 'few' cleanup patches are accepted into staging.
Thanks,
Alison