Staging: qlge: Remove parenthesis around single condition
Subsystems (3)
PATCH 1/1 Staging: qlge: Remove parenthesis around single condition
At line #354 checkpatch.pl:
CHECK: Unnecessary parentheses around 'i == 0x00000114'
CHECK: Unnecessary parentheses around 'i == 0x00000118'
CHECK: Unnecessary parenthesis around 'i == 0x00000140'
CHECK: Unnecessary parentheses around 'i == 0x0000013c'
--- drivers/staging/qlge/qlge_dbg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/qlge/qlge_dbg.c +4 -4
@@ -351,10 +351,10 @@ static int qlge_get_xgmac_regs(struct qlge_adapter *qdev, u32 *buf,/* We're reading 400 xgmac registers, but we filter out * several locations that are non-responsive to reads. */ - if ((i == 0x00000114) || - (i == 0x00000118) || - (i == 0x0000013c) || - (i == 0x00000140) || + if (i == 0x00000114 || + i == 0x00000118 || + i == 0x0000013c || + i == 0x00000140 || (i > 0x00000150 && i < 0x000001fc) || (i > 0x00000278 && i < 0x000002a0) || (i > 0x000002c0 && i < 0x000002cf) ||
Signature · 1 line
2.25.1
Quoted 6 lines · Sumitra Sharma
At line #354 checkpatch.pl:
CHECK: Unnecessary parentheses around 'i ==0x00000114'
CHECK: Unnecessary parentheses around 'i ==0x00000118'
CHECK: Unnecessary parenthesis around 'i ==0x00000140'
CHECK: Unnecessary parentheses around 'i ==0x0000013c'
Greg likes the extra parentheses so don't bother sending these sorts of patches to staging.
Quoted 11 lines
Signed-off-by Sumitra Sharma <[email protected]>--- drivers/staging/qlge/qlge_dbg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/staging/qlge/qlge_dbg.c +0
-0@@ -351,10 +351,10 @@ static int qlge_get_xgmac_regs(struct qlge_adapter *qdev, u32 *buf,/* We're reading 400 xgmac registers, but we filter out
drivers/staging/qlge/qlge_dbg.c static int qlge_get_xgmac_regs(struct qlge_adapter *qdev, u32 *buf, · line 357
Quoted 10 lines
drivers/staging/qlge/qlge_dbg.c +4
-4* several locations that are non-responsive to reads. */ - if ((i == 0x00000114) || - (i == 0x00000118) || - (i == 0x0000013c) || - (i == 0x00000140) || + if (i == 0x00000114 || + i == 0x00000118 || + i == 0x0000013c || + i == 0x00000140 ||
The weirder thing about this code is the indenting. It should be:
[tab][tab][space][space][space][space](i ==.
regards,
dan carpenter
Hi Dan,
Your suggestion for correcting the indentation to "[tab][tab][space][space][space][space](i ==." conflicts with the statement "Outside of comments, documentation and except in Kconfig, spaces are never used for indentation" written in
https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst
However, If you still recommend to correct the indentation in the manner "[tab][tab][space][space][space][space](i ==." Should I create a patch for the same?
Regards,
Sumitra
Quoted 7 lines · Sumitra Sharma
Hi Dan,
Your suggestion for correcting the indentation to "[tab][tab][space][space][space][space](i ==." conflicts with the statement "Outside of comments, documentation and except in
Kconfig, spaces are never used for indentation" written in
https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst
You can use spaces at the end of an indentation if it allows lining up things with a similar purpose.
Look around at other examples of kernel code, outside of staging, to see what others have done.
julia
Quoted 7 lines · Sumitra Sharma
Hi Dan,
Your suggestion for correcting the indentation to "[tab][tab][space][space][space][space](i ==." conflicts with the statement "Outside of comments, documentation and except in
Kconfig, spaces are never used for indentation" written in
https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst
Huh... That documentation is very wrong. Maybe you are not the only person who has read that and been confused. Not only do we use spaces, but checkpatch will complain if you don't use spaces to align function parameters.
Aligning conditions is not universal but it's generally prefered. There isn't a checkpatch warning for misaligned conditions, but I think that's because it's much trickier to parse conditions correctly. Aligning conditions is much more subtle.
What this means is that maybe you should consult with your mentor and try to fix the documentation. Maybe say something to the effect of "You can use spaces for micro alignments to function parameters and conditions in an if statement".
Quoted 4 lines
However, If you still recommend to correct the indentation in the manner "[tab][tab][space][space][space][space](i ==." Should I create a patch for the same?
I'm not going to tell you what to do with your life. :P But if you send that patch then we will merge it.
regards,
dan carpenter
Hi dan,
This is the patch https://lore.kernel.org/outreachy/20230311152453.GA23588@ubuntu/T/#u
regards,
sumitra
Since we do not have as such specific mentors and rather this mailing list is our mentor and guide. I was thinking of updating/fixing this document under KERNEL NEWBIES ACCESS as the coding-style document is many a times referred in the firstpatch document.
Regards,
Sumitra
Quoted 8 lines · On sabato 11 marzo 2023 15:43:18 CET Sumitra Sharma wrote:
Hi Dan,
Your suggestion for correcting the indentation to "[tab][tab][space][space][space][space](i ==." conflicts with the statement "Outside of comments, documentation and except in
Kconfig, spaces are never used for indentation" written in
https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst
I just saw that you use to read .rst files. Attention!
These are source files from which human readable documentation is made.
They may contain directives which don't show a large part of the content you are interested in, which is only included when you run "make html", "make pdf" and similar commands.
Obviously, I'm talking about something that is _not_ related to your patch or this thread. I'm just concerned that candidates won't be able to find the information they're looking for and thus miss out on important information that Ira and I have asked candidates to study (if they're interested in applying to our project).
In any case, the study of a certain number of pages of the Kernel documentation is always necessary, whatever project one wishes to undertake.
To better understand what I'm talking about, take the Highmem documentation as an example and compare the .rst file and the .html file. You will understand why I am strongly encouraging you and all other applicants not to use elixir.bootlin.com for study.
Please compare the content (or at least the number of sections and lines) of following .rst file at
https://elixir.bootlin.com/linux/v6.3-rc1/source/Documentation/mm/highmem.rst
with the human readable counterpart at
https://docs.kernel.org/mm/highmem.html
Can you see how many information you may miss by reading an .rst file without any knowledge of its syntax?
Thanks,
Fabio
PS: I don't know why you went to the documentation source files. I see no reason other than the need to work on patches for the source document.
I'd like to invite you to patch the style guide that Dan suggested to you in this same thread.
But I'm not asking you to spend time on that patch during this contribution period because you still have a lot to do before the period expires.
If you want, you could take care of that patch after the contribution period has ended and while you are waiting for the outcome of the selection. If so, study the syntax of the .rst format carefully.
In the "real" kernel (I mean anywhere outside of drivers/staging), you might not always get the custom help of the same kind you can count on here. However, those who intend to go further, regardless of the current project, sooner or later will have to face the world outside :-)
Quoted 8 lines
However, If you still recommend to correct the indentation in the manner "[tab][tab][space][space][space][space](i ==." Should I create a patch for the same?
Regards,
Sumitra
Hi Fabio,
Thank you for the insights. I went to the .rst files because they are directly linked in the first-patch document. I also noticed the difference between a ".rst" file and its counter human readable ".html" file. You were right that many information is being missed when anyone will read the .rst instead of .html/.pdf. I would like to suggest that the links that redirect to the .rst source files in the first-patch document must be changed to the links that redirect to there corresponding human readable format. Let me know if I could do it under the [KERNEL NEWBIEs ACCESS].
Apart from this I will be happy to patch the style guide after this contribution period.
Regards,
Sumitra
Quoted 3 lines · On domenica 12 marzo 2023 08:17:00 CET Sumitra Sharma wrote:
Hi Fabio,
Thank you for the insights.
Hi Sumitra,
Please pay attention to the suggestions that Julia kindly provides to you.
A moment ago I read these other words from her to you: "Sorry to press the point, but you should be doing it now, not promising to do it in the future.".
She is sorry to press because of her special attitudes. I've been helped uncountable times by Julia who, despite her major role and commitments, is so kind to spend time here in a Sunday morning.
I think that it's you who should be sorry for pushing her that way...
You are doing it again and again: in your last message you did not provide the necessary context. You are asking me to recall which "insights" you are talking about. I know for sure that here there is someone who read hundreds of emails per day.
Quoted 5 lines
I went to the .rst files because they are directly
linked in the first-patch document. I also noticed the difference between a ".rst" file and its counter human readable ".html" file. You were right that many information is being missed when anyone will read the .rst instead of .html/.pdf.
Don't summarize my own words in order to make me understand what question you are answering. Just put my question/objection/comment inline while replying.
Most mentors here read several tens of emails per day. You should not expect them to skim the whole thread. Just reply inline, so they find all the necessary context in one place and so there is no need to traverse the thread to understand what you are referring to.
You have been told so several times. You risk that someone starts to ignore your messages in order to save time for other applicants.
Quoted 3 lines
I would like to suggest that the links that redirect to the .rst source files in the first-patch document must be changed to the links that redirect to there corresponding human readable format. Let me know if I
could
Quoted 1 line
do it under the [KERNEL NEWBIEs ACCESS].
This is a great idea and I fully agree with you.
Please ask Alison to grant access to change that documentation (it's not something I can do myself).
Quoted 2 lines
Apart from this I will be happy to patch the style guide after this contribution period.
Best applicants go on with further contributions after the end of these period. This fact has been observed several times in the other rounds. I'd like to see more people who are seriously willing to be part of this Community, regardless of the Outreachy project's deadlines.
Quoted 3 lines
Regards,
Sumitra
Thanks,
Fabio
P.S.: I probably went a bit too far in the first part of this email. I am sorry about it. However, please demonstrate that you finally got it, not with further promises but with actual changes in the way you communicate :-)
Quoted 32 lines · Fabio M. De Francesco
Quoted 3 lines · On domenica 12 marzo 2023 08:17:00 CET Sumitra Sharma wrote:
Hi Fabio,
Thank you for the insights.
Hi Sumitra,
Please pay attention to the suggestions that Julia kindly provides to you.
A moment ago I read these other words from her to you: "Sorry to press the point, but you should be doing it now, not promising to do it in the future.".
She is sorry to press because of her special attitudes. I've been helped uncountable times by Julia who, despite her major role and commitments, is so kind to spend time here in a Sunday morning.
I think that it's you who should be sorry for pushing her that way...
You are doing it again and again: in your last message you did not provide the necessary context. You are asking me to recall which "insights" you are talking about. I know for sure that here there is someone who read hundreds of emails per day.
Quoted 5 lines
I went to the .rst files because they are directly
linked in the first-patch document. I also noticed the difference between a ".rst" file and its counter human readable ".html" file. You were right that many information is being missed when anyone will read the .rst instead of .html/.pdf.Don't summarize my own words in order to make me understand what question you are answering. Just put my question/objection/comment inline while replying.
Quoted 8 lines
Most mentors here read several tens of emails per day. You should not expect them to skim the whole thread. Just reply inline, so they find all the necessary context in one place and so there is no need to traverse the thread to understand what you are referring to.
You have been told so several times. You risk that someone starts to ignore your messages in order to save time for other applicants.
I am sorry for repeating my mistakes again and again as I was struggling setting up the inbox in email-client and because of which I was unable to respond inline. However, with the help of julia now I have set up the inbox well. Hope this time I am doing it correctly.
Quoted 10 lines
Quoted 3 lines
I would like to suggest that the links that redirect to the .rst source files in the first-patch document must be changed to the links that redirect to there corresponding human readable format. Let me know if I
could
Quoted 1 line
do it under the [KERNEL NEWBIEs ACCESS].
This is a great idea and I fully agree with you.
Please ask Alison to grant access to change that documentation (it's not something I can do myself).
Quoted 8 lines
Quoted 2 lines
Apart from this I will be happy to patch the style guide after this contribution period.
Best applicants go on with further contributions after the end of these period. This fact has been observed several times in the other rounds. I'd like to see more people who are seriously willing to be part of this Community, regardless of the Outreachy project's deadlines.
I would be happy to be part of the community.
Quoted 14 lines
Quoted 3 lines
Regards,
Sumitra
Thanks,
Fabio
P.S.: I probably went a bit too far in the first part of this email. I am sorry about it. However, please demonstrate that you finally got it, not with further promises but with actual changes in the way you communicate :-)
Quoted 38 lines · Sumitra Sharma
Quoted 37 lines · Fabio M. De Francesco
Quoted 3 lines · On domenica 12 marzo 2023 08:17:00 CET Sumitra Sharma wrote:
Hi Fabio,
Thank you for the insights.
Hi Sumitra,
Please pay attention to the suggestions that Julia kindly provides to you.
A moment ago I read these other words from her to you: "Sorry to press the point, but you should be doing it now, not promising to do it in the future.".
She is sorry to press because of her special attitudes. I've been helped uncountable times by Julia who, despite her major role and commitments, is so kind to spend time here in a Sunday morning.
I think that it's you who should be sorry for pushing her that way...
You are doing it again and again: in your last message you did not provide the necessary context. You are asking me to recall which "insights" you are talking about. I know for sure that here there is someone who read hundreds of emails per day.
Quoted 5 lines
I went to the .rst files because they are directly
linked in the first-patch document. I also noticed the difference between a ".rst" file and its counter human readable ".html" file. You were right that many information is being missed when anyone will read the .rst instead of .html/.pdf.Don't summarize my own words in order to make me understand what question you are answering. Just put my question/objection/comment inline while replying.
Most mentors here read several tens of emails per day. You should not expect them to skim the whole thread. Just reply inline, so they find all the necessary context in one place and so there is no need to traverse the thread to understand what you are referring to.
Quoted 9 lines
Quoted 3 lines
You have been told so several times. You risk that someone starts to ignore your messages in order to save time for other applicants.
I am sorry for repeating my mistakes again and again as I was struggling setting up the inbox in email-client and because of which I was unable to respond inline. However, with the help of julia now I have set up the inbox well. Hope this time I am doing it correctly.
This looks perfect. Under the text you are responding to, and with some blank lines around it, so it it easy to see. Thanks!
julia
Quoted 37 lines
Quoted 10 lines
Quoted 3 lines
I would like to suggest that the links that redirect to the .rst source files in the first-patch document must be changed to the links that redirect to there corresponding human readable format. Let me know if I
could
Quoted 1 line
do it under the [KERNEL NEWBIEs ACCESS].
This is a great idea and I fully agree with you.
Please ask Alison to grant access to change that documentation (it's not something I can do myself).Quoted 8 lines
Quoted 2 lines
Apart from this I will be happy to patch the style guide after this contribution period.
Best applicants go on with further contributions after the end of these period. This fact has been observed several times in the other rounds. I'd like to see more people who are seriously willing to be part of this Community, regardless of the Outreachy project's deadlines.
I would be happy to be part of the community.
Quoted 14 lines
Quoted 3 lines
Regards,
Sumitra
Thanks,
Fabio
P.S.: I probably went a bit too far in the first part of this email. I am sorry about it. However, please demonstrate that you finally got it, not with further promises but with actual changes in the way you communicate :-)
Quoted 8 lines · On domenica 12 marzo 2023 18:15:17 CET Sumitra Sharma wrote:
Quoted 7 lines · Fabio M. De Francesco
Quoted 3 lines · On domenica 12 marzo 2023 08:17:00 CET Sumitra Sharma wrote:
Hi Fabio,
Thank you for the insights.
Hi Sumitra,
Quoted 8 lines
Quoted 2 lines
Please pay attention to the suggestions that Julia kindly provides to you.
I am sorry for repeating my mistakes again and again as I was struggling setting up the inbox in email-client and because of which I was unable to respond inline. However, with the help of julia now I have set up the inbox well. Hope this time I am doing it correctly.
Sumitra,
You are doing it more than correctly, thanks.
Also, I just noticed that you too took the time to help Khadija by providing well organized written information.[1]
I appreciated it :-)
Fabio
[1] https://lore.kernel.org/all/20230312173112.GA28679@ubuntu/