Re: [PATCH 1/2] staging: slicoss: rewrite eeprom checksum code

2014-05-19 Thread Dan Carpenter
When you resend, please put in the changelog what the affect of this fix is for the user. Even if it's something like "It doesn't affect the user normally." that is useful information. regards, dan carpenter ___ devel mailing list de...@linuxdriverproj

Re: [PATCH 1/2] staging: slicoss: rewrite eeprom checksum code

2014-05-19 Thread Dan Carpenter
Sounds great. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/2] staging: slicoss: rewrite eeprom checksum code

2014-05-19 Thread David Matlack
On Mon, May 19, 2014 at 2:16 AM, Dan Carpenter wrote: > This patch is great, thanks, don't resend. But I wish the subject said > "fix" instead of "rewrite". I was expecting it to just be a cleanup. > > It helps a lot if `git log --oneline` says which patches should be > backported. > > regards,

Re: [PATCH 1/2] staging: slicoss: rewrite eeprom checksum code

2014-05-19 Thread Dan Carpenter
This patch is great, thanks, don't resend. But I wish the subject said "fix" instead of "rewrite". I was expecting it to just be a cleanup. It helps a lot if `git log --oneline` says which patches should be backported. regards, dan carpenter ___ deve

Re: [PATCH 1/2] staging: slicoss: rewrite eeprom checksum code

2014-05-18 Thread David Matlack
On Sat, May 17, 2014 at 9:51 PM, David Matlack wrote: > On Sat, May 17, 2014 at 9:12 PM, Joe Perches wrote: >> The if seems unnecessary. >> >> Perhaps declare a u16 return var or use >> >> return lower_16 + upper_16; > > I agree it's fishy... but using overflow doesn't produce the same re

Re: [PATCH 1/2] staging: slicoss: rewrite eeprom checksum code

2014-05-17 Thread David Matlack
On Sat, May 17, 2014 at 9:12 PM, Joe Perches wrote: > On Sat, 2014-05-17 at 21:00 -0700, David Matlack wrote: > [] >> diff --git a/drivers/staging/slicoss/slicoss.c >> b/drivers/staging/slicoss/slicoss.c > [] >> +static inline u16 __reduce(u32 checksum) >> +{ >> + u16 lower_16 = checksum & 0x

Re: [PATCH 1/2] staging: slicoss: rewrite eeprom checksum code

2014-05-17 Thread Joe Perches
On Sat, 2014-05-17 at 21:00 -0700, David Matlack wrote: [] > diff --git a/drivers/staging/slicoss/slicoss.c > b/drivers/staging/slicoss/slicoss.c [] > +static inline u16 __reduce(u32 checksum) > +{ > + u16 lower_16 = checksum & 0x; > + u16 upper_16 = (checksum >> 16) & 0x; > + > +

[PATCH 1/2] staging: slicoss: rewrite eeprom checksum code

2014-05-17 Thread David Matlack
Rewrite slic_eeprom_cksum() to fix bugs and make readable. The original implementation had the following issues: 1. 2 of the 3 unrolled loops had the following bug: while ((len -= 32) >= 0) { [...] sum += w[15]; w = (u16 *)((ulong) w + 16);