Re: [PATCH] staging:slicoss:slicoss.h remove volatile variables

2015-06-26 Thread David Matlack
Hi Vikul, welcome! See my comment below... On Fri, Jun 26, 2015 at 12:57 PM, Vikul Gupta wrote: > I am a high school student trying to become familiar with the opensource > process and linux kernel. This is my first submission to the mailing list. > > I fixed the slicoss sub-system. The TODO file

[PATCH] staging: slicoss: remove slic_spinlock wrapper

2015-05-11 Thread David Matlack
As per TODO. This commit introduces no functional changes. Signed-off-by: David Matlack --- drivers/staging/slicoss/TODO | 1 - drivers/staging/slicoss/slic.h| 19 +++--- drivers/staging/slicoss/slicoss.c | 125 ++ 3 files changed, 65 insertions

Re: [PATCH] staging: slicoss: slicoss: Removed variables that is never used

2015-02-11 Thread David Matlack
On Sat, Jan 31, 2015 at 7:13 AM, Rickard Strandqvist wrote: > Variable was assigned a value that was never used. > I have also removed all the code that thereby serves no purpose. > > This was found using a static code analysis program called cppcheck > > Signed-off-by: Rickard Strandqvist > ---

[PATCH RESEND] staging: slicoss: clean up use of dev_err

2014-05-23 Thread David Matlack
First, don't print pci device information or driver prefixes, this is already printed by dev_err. Next, don't report error messages via dev_err when the failing function already reports all errors via dev_err. Signed-off-by: David Matlack --- drivers/staging/slicoss/slic

[PATCH RESEND] staging: slicoss: remove private netdev list

2014-05-23 Thread David Matlack
Remove the private linked list of netdev structs. This list isn't being used anyway. This patch has no noticable effect. Signed-off-by: David Matlack --- drivers/staging/slicoss/slic.h| 1 - drivers/staging/slicoss/slicoss.c | 4 2 files changed, 5 deletions(-) diff --git a/dr

Re: [PATCH] staging: slicoss: clean up use of dev_err

2014-05-23 Thread David Matlack
Greg, this is the other patch (of two) that got dropped. Thanks. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: slicoss: remove private netdev list

2014-05-23 Thread David Matlack
Greg, this is one of the two patches that got dropped. It should apply cleanly in any order with respect to all my other patches. Thanks. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverd

Re: [PATCH] staging: slicoss: fix use-after-free in slic_entry_probe

2014-05-23 Thread David Matlack
On Fri, May 23, 2014 at 4:14 AM, Greg KH wrote: > I think I've already applied all of these, if not, please let me know. > > Also, you forgot to number these patches to let me know what order to > apply them in :( > > thanks, > > greg k-h Thanks Greg. Sorry for the confusion. I resent these patch

[PATCH 2/2] staging: slicoss: handle errors from slic_config_get

2014-05-22 Thread David Matlack
slic_config_get() can fail. Change the return type from void to int and handle the error in slic_card_init(). So now, instead of silently failing (and then timing out waiting for the config data), the driver will fail loudly at request time. Signed-off-by: David Matlack --- drivers/staging

[PATCH 1/2] staging: slicoss: fix dma memory leak

2014-05-22 Thread David Matlack
Fix 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 --- This patch was originally sent here https://lkml.org/lkml/2014/5/6/7 with my google.com email address. But

[PATCH 0/2] fix two bugs in slic_card_init

2014-05-22 Thread David Matlack
This patchset fixes two bugs in slic_card_init(). They are grouped in a series because the second patch depends on the first (for a merge without conflicts). In content, they are completely separate changes. They just touch a few of the same lines. David Matlack (2): staging: slicoss: fix dma

[PATCH] staging: slicoss: remove private netdev list

2014-05-22 Thread David Matlack
Remove the private linked list of netdev structs. This list isn't being used anyway. This patch has no noticable effect. Signed-off-by: David Matlack --- drivers/staging/slicoss/slic.h| 1 - drivers/staging/slicoss/slicoss.c | 4 2 files changed, 5 deletions(-) diff --git a/dr

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

2014-05-22 Thread David Matlack
Fix 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 (including the registered netdev struct). Signed-off-by: David Matlack --- This patch was originally sent

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

2014-05-22 Thread David Matlack
ll change a lot of the driver. So for the time being, this patch will at least let the driver run correctly on 64-bit machines with >4GB of physical memory. Signed-off-by: David Matlack --- This patch was originally sent here https://lkml.org/lkml/2014/5/6/6 with my google.com email addre

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

2014-05-22 Thread David Matlack
oticable effect. Signed-off-by: David Matlack --- This patch was originally sent here https://lkml.org/lkml/2014/5/6/9 with my google.com email address. But due to Google's recent change in DMARC policies, that patchset was silently dropped for at least some users (including my personal gm

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

2014-05-22 Thread David Matlack
(). Specifically, slic_unmap_mmio_space() frees adapter->slic_regs, but those registers are used in slic_entry_halt(). Signed-off-by: David Matlack --- This patch was originally sent here https://lkml.org/lkml/2014/5/6/5 with my google.com email address. But due to Google's recent change in DMARC

[PATCH] staging: slicoss: clean up use of dev_err

2014-05-22 Thread David Matlack
First, don't print pci device information or driver prefixes, this is already printed by dev_err. Next, don't report error messages via dev_err when the failing function already reports all errors via dev_err. Signed-off-by: David Matlack --- drivers/staging/slicoss/slic

[PATCH] staging: slicoss: fix free-after-free in slic_entry_remove

2014-05-22 Thread David Matlack
l release_mem_region() and pci_release_regions() on the same pci_dev struct. They both free pci memory regions. Signed-off-by: David Matlack --- This patch was originally sent here https://lkml.org/lkml/2014/5/6/3 with my google.com email address. But due to Google's recent change in DMARC policies, that pa

[PATCH] staging: slicoss: remove gratuitous debug infrastructure

2014-05-22 Thread David Matlack
module is unloaded. Touching these files quickly leads to an oops. The net effect of this patch is that the driver will no longer create files in debugfs. Signed-off-by: David Matlack --- This patch was originally sent here https://lkml.org/lkml/2014/5/6/4 with my google.com email address. But due

Re: [PATCH V2 2/2] staging: slicoss: fail on corrupt eeprom

2014-05-20 Thread David Matlack
Thanks for the reviews! ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH V2 0/2] staging: slicoss: fix checksum computation

2014-05-19 Thread David Matlack
detail in the changelog of each patch describing the effects on the user. David Matlack (2): staging: slicoss: fix eeprom checksum code staging: slicoss: fail on corrupt eeprom drivers/staging/slicoss/slic.h| 7 --- drivers/staging/slicoss/slicoss.c | 113

[PATCH V2 2/2] staging: slicoss: fail on corrupt eeprom

2014-05-19 Thread David Matlack
-by: David Matlack --- drivers/staging/slicoss/slic.h| 7 --- drivers/staging/slicoss/slicoss.c | 3 +-- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h index 0dc73d5..3a5aa88 100644 --- a/drivers/staging/slicoss

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

2014-05-19 Thread David Matlack
IZE), that's only 0x40 iterations - checksum is only computed during pci probe(), so not very often Tested on Mojave card Signed-off-by: David Matlack --- drivers/staging/slicoss/slicoss.c | 110 ++ 1 file changed, 15 insertions(+), 95 d

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 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 > members and the beha

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 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 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 to zero by alloc_etherd

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...

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
not very 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 d

[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 a

[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