Skip to contentSkip to conversation

edac: Remove fixmes in e7xxx_edac.c

PATCH In review Nicholas Krause 7 participants 16 messages Jul 22, 2014 – Jul 23, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 edac: Remove fixmes in e7xxx_edac.c

This removes two Page shift fixs me in this file and not checking if row is -1 in process_ce as it cannot be this value or be must exit this function by returning.

---
 drivers/edac/e7xxx_edac.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/edac/e7xxx_edac.c +4 -5
index 3cda79b..563983f 100644
@@ -211,12 +211,13 @@ static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
 	edac_dbg(3, "\n");
 	/* read the error address */
 	error_1b = info->dram_celog_add;
-	/* FIXME - should use PAGE_SHIFT */
-	page = error_1b >> 6;	/* convert the address to 4k page */
+	page = error_1b >> PAGE_SHIFT;	/* convert the address to 4k page */
 	/* read the syndrome */
 	syndrome = info->dram_celog_syndrome;
-	/* FIXME - check for -1 */
 	row = edac_mc_find_csrow_by_page(mci, page);
+	if (row == -1)
+		return;
 	/* convert syndrome to channel */
 	channel = e7xxx_find_channel(syndrome);
 	edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, page, 0, syndrome,
@@ -238,8 +239,7 @@ static void process_ue(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
 	edac_dbg(3, "\n");
 	/* read the error address */
 	error_2b = info->dram_uelog_add;
-	/* FIXME - should use PAGE_SHIFT */
-	block_page = error_2b >> 6;	/* convert to 4k address */
+	block_page = error_2b >> PAGE_SHIFT;	/* convert to 4k address */
 	row = edac_mc_find_csrow_by_page(mci, block_page);
 
 	edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, block_page, 0, 0,
Signature · 1 line
1.9.1
#1 lore raw
Quoted 14 lines · Nicholas Krause

This removes two Page shift fixs me in this file and not checking if row is -1 in process_ce as it cannot be this value or be must exit this function by returning.

---
 drivers/edac/e7xxx_edac.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/edac/e7xxx_edac.c +0 -0
index 3cda79b..563983f 100644

drivers/edac/e7xxx_edac.c static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info) · line 214

Quoted 6 lines
drivers/edac/e7xxx_edac.c +1 -2
@@ -211,12 +211,13 @@ static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
 	edac_dbg(3, "\n");
 	/* read the error address */
 	error_1b = info->dram_celog_add;
-	/* FIXME - should use PAGE_SHIFT */
-	page = error_1b >> 6;	/* convert the address to 4k page */
+	page = error_1b >> PAGE_SHIFT;	/* convert the address to 4k page */

I just have to bite... Where did you get the idea that you can go around and "fix" FIMXE's like they were spelling errors?

Bjørn

#2 lore raw
Quoted 6 lines · Bjørn Mork

drivers/edac/e7xxx_edac.c static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info) · line 214

Quoted 3 lines
drivers/edac/e7xxx_edac.c +1 -2
-     /* FIXME - should use PAGE_SHIFT */
-     page = error_1b >> 6;   /* convert the address to 4k page */
+     page = error_1b >> PAGE_SHIFT;  /* convert the address to 4k page */

I just have to bite... Where did you get the idea that you can go around and "fix" FIMXE's like they were spelling errors?

Or apparently without thinking? Since "PAGE_SHIFT" does not have the numerical value "6" your new code is obviously not equivalent to the old.

-Tony

#3 lore raw
Quoted 5 lines · Tony Luck
Quoted 4 lines · Bjørn Mork
Quoted 3 lines
drivers/edac/e7xxx_edac.c +1 -2
-     /* FIXME - should use PAGE_SHIFT */
-     page = error_1b >> 6;   /* convert the address to 4k page */
+     page = error_1b >> PAGE_SHIFT;  /* convert the address to 4k page */
Quoted 8 lines
Quoted 2 lines

I just have to bite... Where did you get the idea that you can go around and "fix" FIMXE's like they were spelling errors?

Or apparently without thinking? Since "PAGE_SHIFT" does not have the numerical value "6" your new code is obviously not equivalent to the old.

-Tony

Tony,

What is the value of Page shift then ? If you can tell me it would be much easier for
me to fix this.
Cheers Nick

maintainer
#4 lore raw
Quoted 3 lines · Nick Krause

What is the value of Page shift then ? If you can tell me it would be much easier for
me to fix this.

I'll give you a rat's ass if you find that out on your own.

Signature · 5 lines
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
#5 lore raw
Quoted 5 lines · Borislav Petkov
Quoted 3 lines · Nick Krause

What is the value of Page shift then ? If you can tell me it would be much easier for
me to fix this.

Quoted 8 lines

I'll give you a rat's ass if you find that out on your own.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine. --

Page shift is 12 for 4k pages.
Nick

maintainer
#6 lore raw
Quoted 1 line · Nick Krause

Page shift is 12 for 4k pages.

So you can find stuff out on your own after all, good. Hold on to that thought like your life depended on it!

Signature · 5 lines
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
#7 lore raw
In reply to Nick Krause

2014-07-22 19:40 GMT+02:00 Nick Krause <[email protected]>:

Quoted 8 lines

[...]

Tony,

What is the value of Page shift then ? If you can tell me it would be much easier for
me to fix this.
Cheers Nick

Nick,

Help is always welcome. However, what you are doing is effectively a waste of time for you and for the maintainers as well, and hence cannot be called help. You are writing emails that make absolutely no sense at all. If you want to help us out, please consider learning three things:

* The language that the kernel is written in: C
* The language that most kernel developers understand: English
* The environment the kernel is (in most cases) written in: UNIX

If you had known these, then:

* ... you would have already known that FIXMEs exist for a reason which is not at all simple.

* ... you would have understood that fixing FIXMEs without ANY reasoning and asking about it is completely useless and wastes precious maintainer time.

* ... you could have used grep for finding out PAGE_SHIFT and not need to ask for it.

Nick. Look, it is good that you are enthusiastic. However, this kind of 'work' gives
you an undesirable reputation, which is {IF FROM:xerofoify@* THEN TRASH}...

If you really want to help out, I suggest you to find yourself a piece of hardware from
the store and try to write a driver for it. That way, you will learn how it all works, and if
you are intelligent enough then you might get a "Kernel Job - Payed" like you asked us
for them in November.

Until then, please stop trying for FIXMEs. They will not get you a commit in the kernel
99% of the time.

Hope you understand,

Levente Kurusa

#8 lore raw
Quoted 44 lines · Levente Kurusa

2014-07-22 19:40 GMT+02:00 Nick Krause <[email protected]>:

Quoted 8 lines

[...]

Tony,

What is the value of Page shift then ? If you can tell me it would be much easier for
me to fix this.
Cheers Nick

Nick,

Help is always welcome. However, what you are doing is effectively a waste of time for you and for the maintainers as well, and hence cannot be called help. You are writing emails that make absolutely no sense at all. If you want to help us out, please consider learning three things:

* The language that the kernel is written in: C
* The language that most kernel developers understand: English
* The environment the kernel is (in most cases) written in: UNIX

If you had known these, then:

* ... you would have already known that FIXMEs exist for a reason which is not at all simple.

* ... you would have understood that fixing FIXMEs without ANY reasoning and asking about it is completely useless and wastes precious maintainer time.

* ... you could have used grep for finding out PAGE_SHIFT and not need to ask for it.

Nick. Look, it is good that you are enthusiastic. However, this kind of 'work' gives
you an undesirable reputation, which is {IF FROM:xerofoify@* THEN TRASH}...

If you really want to help out, I suggest you to find yourself a piece of hardware from
the store and try to write a driver for it. That way, you will learn how it all works, and if
you are intelligent enough then you might get a "Kernel Job - Payed" like you asked us
for them in November.

Quoted 7 lines

Until then, please stop trying for FIXMEs. They will not get you a commit in the kernel
99% of the time.

Hope you understand,

Levente Kurusa

Levente,

I understand what your saying and I should have searched for Page shift. In addition I am already got commits in the kernel for fix mes so I feel that your comment on fix mes is incorrect.
Nick

#9 lore raw
Quoted 49 lines · Nick Krause
Quoted 48 lines · Levente Kurusa

2014-07-22 19:40 GMT+02:00 Nick Krause <[email protected]>:

Quoted 8 lines

[...]

Tony,

What is the value of Page shift then ? If you can tell me it would be much easier for
me to fix this.
Cheers Nick

Nick,

Help is always welcome. However, what you are doing is effectively a waste of time for you and for the maintainers as well, and hence cannot be called help. You are writing emails that make absolutely no sense at all. If you want to help us out, please consider learning three things:

* The language that the kernel is written in: C
* The language that most kernel developers understand: English
* The environment the kernel is (in most cases) written in: UNIX

If you had known these, then:

* ... you would have already known that FIXMEs exist for a reason which is not at all simple.

* ... you would have understood that fixing FIXMEs without ANY reasoning and asking about it is completely useless and wastes precious maintainer time.

* ... you could have used grep for finding out PAGE_SHIFT and not need to ask for it.

Nick. Look, it is good that you are enthusiastic. However, this kind of 'work' gives
you an undesirable reputation, which is {IF FROM:xerofoify@* THEN TRASH}...

If you really want to help out, I suggest you to find yourself a piece of hardware from
the store and try to write a driver for it. That way, you will learn how it all works, and if
you are intelligent enough then you might get a "Kernel Job - Payed" like you asked us
for them in November.

Until then, please stop trying for FIXMEs. They will not get you a commit in the kernel
99% of the time.

Quoted 8 lines
Quoted 3 lines

Hope you understand,

Levente Kurusa

Levente,

I understand what your saying and I should have searched for Page shift.

so you know that PAGE_SHIFT is not always 12?

Quoted 2 lines

In addition I am already got commits in the kernel for fix mes so I feel that your comment on fix mes is incorrect.

what is your goal?

Signature · 1 line
~Randy
#10 lore raw
In reply to Nick Krause
Quoted 4 lines · Nick Krause

I understand what your saying and I should have searched for Page shift. In addition I am already got commits in the kernel for fix mes so I feel that your comment on fix mes is incorrect.

After seeing your other solutions to "fix mes" around the kernel, I now have to investigate the patches that were accepted, and see if they did not cause any new bugs. If any of them do, I will ask to have all your patches reverted.

You are not helping. You are actually doing quite the opposite. Who do you work for? Microsoft or Apple?

-- Steve

#11 lore raw
Quoted 6 lines · Steven Rostedt
Quoted 4 lines · Nick Krause

I understand what your saying and I should have searched for Page shift. In addition I am already got commits in the kernel for fix mes so I feel that your comment on fix mes is incorrect.

Quoted 9 lines

After seeing your other solutions to "fix mes" around the kernel, I now have to investigate the patches that were accepted, and see if they did not cause any new bugs. If any of them do, I will ask to have all your patches reverted.

You are not helping. You are actually doing quite the opposite. Who do you work for? Microsoft or Apple?

-- Steve

I don't work for any companies. And here is one of them that has been accepted. I am removing two fix mes in this file as after dicussing then it seems there is no reason to check against Null for usb_device as it can never be NULL and this is check is therefore not needed.

---
 drivers/usb/core/hcd.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/usb/core/hcd.c +0 -2
index bec31e2..487abcf 100644
@@ -855,8 +855,6 @@ static ssize_t authorized_default_show(struct device *dev,
        struct usb_bus *usb_bus = rh_usb_dev->bus;
        struct usb_hcd *usb_hcd;
 
-       if (usb_bus == NULL)    /* FIXME: not sure if this case is possible */
-               return -ENODEV;
        usb_hcd = bus_to_hcd(usb_bus);
        return snprintf(buf, PAGE_SIZE, "%u\n", usb_hcd->authorized_default);
 }
@@ -871,8 +869,6 @@ static ssize_t authorized_default_store(

struct device *dev,

        struct usb_bus *usb_bus = rh_usb_dev->bus;
        struct usb_hcd *usb_hcd;

- if (usb_bus == NULL) /* FIXME: not sure if this case is possible */

-               return -ENODEV;
        usb_hcd = bus_to_hcd(usb_bus);
        result = sscanf(buf, "%u\n", &val);
        if (result == 1) {

Nick

#12 lore raw
Quoted 14 lines · On Tue, 22 Jul 2014 16:56:06 -0400 Nick Krause <[email protected]> wrote:
Quoted 13 lines · Steven Rostedt
Quoted 4 lines · Nick Krause

I understand what your saying and I should have searched for Page shift. In addition I am already got commits in the kernel for fix mes so I feel that your comment on fix mes is incorrect.

After seeing your other solutions to "fix mes" around the kernel, I now have to investigate the patches that were accepted, and see if they did not cause any new bugs. If any of them do, I will ask to have all your patches reverted.

You are not helping. You are actually doing quite the opposite. Who do you work for? Microsoft or Apple?

Quoted 7 lines
Quoted 2 lines

-- Steve

I don't work for any companies. And here is one of them that has been accepted. I am removing two fix mes in this file as after dicussing then it seems there is no reason to check against Null for usb_device as it can never be NULL and this is check is therefore not needed.

http://marc.info/?l=linux-m68k&m=140612440420712&w=2

And your patches seem to be getting reverted. Wow, I think you broke a new record in having the percentage of patches added to the kernel and then reverted. Even before they made it to mainline.

You may be the only developer that has all their commits reverted before they ever make it into the mainline tree!

Congratulations! I think it is wise now for all maintainers to add your email to their /dev/null folder. It will help them from wasting any more of their precious time on you.

-- Steve

Quoted 30 lines
---
 drivers/usb/core/hcd.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/usb/core/hcd.c +0 -4
index bec31e2..487abcf 100644
@@ -855,8 +855,6 @@ static ssize_t authorized_default_show(struct device *dev,
        struct usb_bus *usb_bus = rh_usb_dev->bus;
        struct usb_hcd *usb_hcd;
 
-       if (usb_bus == NULL)    /* FIXME: not sure if this case is possible */
-               return -ENODEV;
        usb_hcd = bus_to_hcd(usb_bus);
        return snprintf(buf, PAGE_SIZE, "%u\n", usb_hcd->authorized_default);
 }
@@ -871,8 +869,6 @@ static ssize_t authorized_default_store(
 struct device *dev,
        struct usb_bus *usb_bus = rh_usb_dev->bus;
        struct usb_hcd *usb_hcd;
 
-       if (usb_bus == NULL)    /* FIXME: not sure if this case is possible */
-               return -ENODEV;
        usb_hcd = bus_to_hcd(usb_bus);
        result = sscanf(buf, "%u\n", &val);
        if (result == 1) {

Nick

#13 lore raw
Quoted 31 lines · Steven Rostedt
Quoted 14 lines · On Tue, 22 Jul 2014 16:56:06 -0400 Nick Krause <[email protected]> wrote:
Quoted 13 lines · Steven Rostedt
Quoted 4 lines · Nick Krause

I understand what your saying and I should have searched for Page shift. In addition I am already got commits in the kernel for fix mes so I feel that your comment on fix mes is incorrect.

After seeing your other solutions to "fix mes" around the kernel, I now have to investigate the patches that were accepted, and see if they did not cause any new bugs. If any of them do, I will ask to have all your patches reverted.

You are not helping. You are actually doing quite the opposite. Who do you work for? Microsoft or Apple?

Quoted 7 lines
Quoted 2 lines

-- Steve

I don't work for any companies. And here is one of them that has been accepted. I am removing two fix mes in this file as after dicussing then it seems there is no reason to check against Null for usb_device as it can never be NULL and this is check is therefore not needed.

http://marc.info/?l=linux-m68k&m=140612440420712&w=2

And your patches seem to be getting reverted. Wow, I think you broke a new record in having the percentage of patches added to the kernel and then reverted. Even before they made it to mainline.

Quoted 8 lines

You may be the only developer that has all their commits reverted before they ever make it into the mainline tree!

Congratulations! I think it is wise now for all maintainers to add your email to their /dev/null folder. It will help them from wasting any more of their precious time on you.

-- Steve

Steve, I have make a few mistakes. That doesn't give you the right to put me under a waste of time yet.
Nick

#14 lore raw
Quoted 2 lines · On Wed, 23 Jul 2014 11:35:21 -0400 Nick Krause <[email protected]> wrote:

Steve, I have make a few mistakes. That doesn't give you the right to put me under a waste of time yet.

Nobody is upset at you for making a few mistakes. But ignoring advice from people is something quite different, and that is what tends to piss people off.

You were told time and time again to stop this fixme craze because you obviously didn't know the details of what you were fixing, but you continued to care on. The issue is with these patches that you probably caught a maintainer off guard, and they just accepted it thinking you had some clue to the code you were fixing. Thus, not only are you removing crucial comments about areas of code that needs more attention, you end up making things worse. Your actions are dangerous to the kernel and the fact you ignoring everyone telling you to stop it, makes you dangerous to the kernel. That gives me the right to put you under the "waste of time" folder.

Now it may seem that I'm being rather harsh to you, and I may be. The Linux kernel is a serious project and it can not afford having to deal with those that do not listen.

That said...

I see you stated in another email:

"Very well then I guess the community wants me to listen better to the maintainers and not do stupid things"

Finally, you are listening.

You obviously are very enthusiastic, and I would like you not to waste your own time and energy trying to help in a not so helpful way. If you really want to help the Linux community, here's what you do.

Find a single area to focus on. Not a key word throughout the kernel. Look at the USB stack, or find some driver in staging that is for some really cheap hardware that you can afford. And get it cleaned up and working nicely. Start simple. Try to understand that area completely.

Remember, nobody understand every aspect of the kernel. All the main kernel developers are experts in select parts. I wouldn't even try fixing "fixmes" in parts of the kernel that I'm unfamiliar with.

Find a part of the kernel, and learn every aspect of that part inside and out. Study the code. Boot the kernel. Make a modification of that code and see what happens. Yes! Break it (but don't submit a patch that does ;). Sometimes breaking stuff is the best way to understand why it worked in the first place. Use function graph tracing to see the code flow.

After you have done that, and you really have a good understanding of that part of the kernel, you should in the mean time see a way to enhance it, or better yet, find a real bug and fix it. Then you can submit a patch and that will be something of use.

Moral of the story: Learn the kernel before submitting a patch, do not submit a patch to help you learn the kernel.

-- Steve

#15 lore raw
Quoted 60 lines · Steven Rostedt
Quoted 2 lines · On Wed, 23 Jul 2014 11:35:21 -0400 Nick Krause <[email protected]> wrote:

Steve, I have make a few mistakes. That doesn't give you the right to put me under a waste of time yet.

Nobody is upset at you for making a few mistakes. But ignoring advice from people is something quite different, and that is what tends to piss people off.

You were told time and time again to stop this fixme craze because you obviously didn't know the details of what you were fixing, but you continued to care on. The issue is with these patches that you probably caught a maintainer off guard, and they just accepted it thinking you had some clue to the code you were fixing. Thus, not only are you removing crucial comments about areas of code that needs more attention, you end up making things worse. Your actions are dangerous to the kernel and the fact you ignoring everyone telling you to stop it, makes you dangerous to the kernel. That gives me the right to put you under the "waste of time" folder.

Now it may seem that I'm being rather harsh to you, and I may be. The Linux kernel is a serious project and it can not afford having to deal with those that do not listen.

That said...

I see you stated in another email:

"Very well then I guess the community wants me to listen better to the maintainers and not do stupid things"

Finally, you are listening.

You obviously are very enthusiastic, and I would like you not to waste your own time and energy trying to help in a not so helpful way. If you really want to help the Linux community, here's what you do.

Find a single area to focus on. Not a key word throughout the kernel. Look at the USB stack, or find some driver in staging that is for some really cheap hardware that you can afford. And get it cleaned up and working nicely. Start simple. Try to understand that area completely.

Remember, nobody understand every aspect of the kernel. All the main kernel developers are experts in select parts. I wouldn't even try fixing "fixmes" in parts of the kernel that I'm unfamiliar with.

Find a part of the kernel, and learn every aspect of that part inside and out. Study the code. Boot the kernel. Make a modification of that code and see what happens. Yes! Break it (but don't submit a patch that does ;). Sometimes breaking stuff is the best way to understand why it worked in the first place. Use function graph tracing to see the code flow.

After you have done that, and you really have a good understanding of that part of the kernel, you should in the mean time see a way to enhance it, or better yet, find a real bug and fix it. Then you can submit a patch and that will be something of use.

Quoted 4 lines

Moral of the story: Learn the kernel before submitting a patch, do not submit a patch to help you learn the kernel.

-- Steve

Steve ,
Thanks for your help.
Cheers Nick