Re: [PATCH 2/2] staging: slicoss: remove slic_reg_params struct

2014-05-19 Thread David Matlack
On Mon, May 19, 2014 at 2:21 AM, Dan Carpenter dan.carpen...@oracle.com wrote: Looking at the patch, this looks like a bugfix but the changelog doesn't give any clues. Yeah this isn't a bug fix. The only member of struct slic_reg_params that was in use was fail_on_bad_eeprom (implicitly set

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 dan.carpen...@oracle.com 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

Re: [PATCH 2/2] staging: slicoss: remove slic_reg_params struct

2014-05-19 Thread David Matlack
On Mon, May 19, 2014 at 12:52 PM, Dan Carpenter dan.carpen...@oracle.com wrote: You have to understand that I review a lot of staging patches every day. Most patches try to remove struct members but the code should still work exactly as it did before (a clean up). Some patches remove struct

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

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 matlackda...@gmail.com wrote: On Sat, May 17, 2014 at 9:12 PM, Joe Perches j...@perches.com 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

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) >> +{

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

2014-05-17 Thread David Matlack
ery often Tested on Mojave card. Also tested against the old implementation (with the above bug fix applied) with test data. Signed-off-by: David Matlack --- drivers/staging/slicoss/slicoss.c | 137 +- 1 file changed, 46 insertions(+), 91 deleti

[PATCH 2/2] staging: slicoss: remove slic_reg_params struct

2014-05-17 Thread David Matlack
Remove uninitialized struct that is only used to regulate whether incorrect eeprom checksums are ignored. Signed-off-by: David Matlack --- drivers/staging/slicoss/slic.h| 7 --- drivers/staging/slicoss/slicoss.c | 3 +-- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git

[PATCH 0/2] staging: slicoss: cleanup checksum computation

2014-05-17 Thread David Matlack
This patchset fixes a broken checksum function and removes a struct that was being used to ignore bad checksum values. David Matlack (2): staging: slicoss: rewrite eeprom checksum code staging: slicoss: remove slic_reg_params struct drivers/staging/slicoss/slic.h| 7 -- drivers

[PATCH 0/2] staging: slicoss: cleanup checksum computation

2014-05-17 Thread David Matlack
This patchset fixes a broken checksum function and removes a struct that was being used to ignore bad checksum values. David Matlack (2): staging: slicoss: rewrite eeprom checksum code staging: slicoss: remove slic_reg_params struct drivers/staging/slicoss/slic.h| 7 -- drivers

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

2014-05-17 Thread David Matlack
often Tested on Mojave card. Also tested against the old implementation (with the above bug fix applied) with test data. Signed-off-by: David Matlack matlackda...@gmail.com --- drivers/staging/slicoss/slicoss.c | 137 +- 1 file changed, 46 insertions

[PATCH 2/2] staging: slicoss: remove slic_reg_params struct

2014-05-17 Thread David Matlack
Remove uninitialized struct that is only used to regulate whether incorrect eeprom checksums are ignored. Signed-off-by: David Matlack matlackda...@gmail.com --- drivers/staging/slicoss/slic.h| 7 --- drivers/staging/slicoss/slicoss.c | 3 +-- 2 files changed, 1 insertion(+), 9 deletions

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 j...@perches.com 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

[PATCH 1/7] staging: slicoss: fix use-after-free in slic_entry_probe

2014-05-05 Thread David Matlack
This patch fixes a use-after-free bug that can cause a kernel oops. If slic_card_init fails then slic_entry_probe (the pci probe() function for this device) will return error without cleaning up memory. Signed-off-by: David Matlack --- drivers/staging/slicoss/slicoss.c | 16 +--- 1

[PATCH 3/7] staging: slicoss: remove unused members of struct adapter

2014-05-05 Thread David Matlack
Signed-off-by: David Matlack --- drivers/staging/slicoss/slic.h| 2 -- drivers/staging/slicoss/slicoss.c | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h index 702902c..379c4f7 100644 --- a/drivers/stagi

[PATCH 6/7] staging: slicoss: fix 64-bit isr address bug

2014-05-05 Thread David Matlack
This patch fixes a bug that only manifests when the physical address of the interrupt status register is >4GB. Specifically, the driver was only telling the device about the lower 32 bits of the ISR. This patch adds the upper 32 bits. Signed-off-by: David Matlack --- drivers/staging/slic

[PATCH 5/7] staging: slicoss: fix dma memory leak

2014-05-05 Thread David Matlack
This patch fixes a memory leak in slic_card_init. If the driver fails to poll for an interrupt after requesting config data from the device the dma memory is never freed. Signed-off-by: David Matlack --- drivers/staging/slicoss/slicoss.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 2/7] staging: slicoss: fix multiple free-after-free in slic_entry_remove

2014-05-05 Thread David Matlack
e same pci_dev struct. Signed-off-by: David Matlack --- drivers/staging/slicoss/slicoss.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 6113b90..452aa02 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/d

[PATCH 4/7] staging: slicoss: remove gratuitous debug infrastructure

2014-05-05 Thread David Matlack
module is unloaded. Touching these files quickly leads to an oops. Signed-off-by: David Matlack --- drivers/staging/slicoss/TODO | 1 - drivers/staging/slicoss/slic.h| 3 - drivers/staging/slicoss/slicoss.c | 450 +- 3 files changed, 3 insertions

[PATCH 7/7] staging: slicoss: fix use-after-free bug in slic_entry_remove

2014-05-05 Thread David Matlack
. Signed-off-by: David Matlack --- drivers/staging/slicoss/slicoss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 55afe0d..96b29ec 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging

[PATCH 0/7] staging: slicoss: bug fixes to stabilize driver

2014-05-05 Thread David Matlack
patches were tested on the "Mojave" (single port, PCI) card. David Matlack (7): staging: slicoss: fix use-after-free in slic_entry_probe staging: slicoss: fix multiple free-after-free in slic_entry_remove staging: slicoss: remove unused members of struct adapter staging: slico

[PATCH 7/7] staging: slicoss: fix use-after-free bug in slic_entry_remove

2014-05-05 Thread David Matlack
. Signed-off-by: David Matlack dmatl...@google.com --- drivers/staging/slicoss/slicoss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 55afe0d..96b29ec 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b

[PATCH 0/7] staging: slicoss: bug fixes to stabilize driver

2014-05-05 Thread David Matlack
patches were tested on the Mojave (single port, PCI) card. David Matlack (7): staging: slicoss: fix use-after-free in slic_entry_probe staging: slicoss: fix multiple free-after-free in slic_entry_remove staging: slicoss: remove unused members of struct adapter staging: slicoss: remove

[PATCH 4/7] staging: slicoss: remove gratuitous debug infrastructure

2014-05-05 Thread David Matlack
module is unloaded. Touching these files quickly leads to an oops. Signed-off-by: David Matlack dmatl...@google.com --- drivers/staging/slicoss/TODO | 1 - drivers/staging/slicoss/slic.h| 3 - drivers/staging/slicoss/slicoss.c | 450 +- 3 files changed

[PATCH 2/7] staging: slicoss: fix multiple free-after-free in slic_entry_remove

2014-05-05 Thread David Matlack
pci_dev struct. Signed-off-by: David Matlack dmatl...@google.com --- drivers/staging/slicoss/slicoss.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 6113b90..452aa02 100644 --- a/drivers/staging/slicoss

[PATCH 6/7] staging: slicoss: fix 64-bit isr address bug

2014-05-05 Thread David Matlack
This patch fixes a bug that only manifests when the physical address of the interrupt status register is 4GB. Specifically, the driver was only telling the device about the lower 32 bits of the ISR. This patch adds the upper 32 bits. Signed-off-by: David Matlack dmatl...@google.com --- drivers

[PATCH 5/7] staging: slicoss: fix dma memory leak

2014-05-05 Thread David Matlack
This patch fixes a memory leak in slic_card_init. If the driver fails to poll for an interrupt after requesting config data from the device the dma memory is never freed. Signed-off-by: David Matlack dmatl...@google.com --- drivers/staging/slicoss/slicoss.c | 3 +++ 1 file changed, 3 insertions

[PATCH 3/7] staging: slicoss: remove unused members of struct adapter

2014-05-05 Thread David Matlack
-by: David Matlack dmatl...@google.com --- drivers/staging/slicoss/slic.h| 2 -- drivers/staging/slicoss/slicoss.c | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h index 702902c..379c4f7 100644 --- a/drivers

[PATCH 1/7] staging: slicoss: fix use-after-free in slic_entry_probe

2014-05-05 Thread David Matlack
This patch fixes a use-after-free bug that can cause a kernel oops. If slic_card_init fails then slic_entry_probe (the pci probe() function for this device) will return error without cleaning up memory. Signed-off-by: David Matlack dmatl...@google.com --- drivers/staging/slicoss/slicoss.c | 16

<    1   2   3   4