Commit Graph

179 Commits

Author SHA1 Message Date
Clifton Barnes d37912dd29 staging: slicoss: fix missing blank line
fix checkpatch.pl warning about 'Missing a blank line after
declarations'

Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29 17:58:02 -07:00
Clifton Barnes f2fe1bc900 staging: slicoss: fix bare use of 'unsigned'
fix checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of
'unsigned''

Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29 17:58:02 -07:00
Amitoj Kaur Chawla 514dd88df7 staging: slicoss: Add error check for pci_map_single
Currently, DMA mapping failure is not detected, causing the hardware
to attempt a DMA from an invalid address.

This patch adds the corresponding error check for pci_map_single i.e.
pci_dma_mapping_error.

Problem found using the following Coccinelle semantic patch:
// <smpl>
@@
expression e1;
identifier x;
@@
 x=
(
*dma_map_single(...)
|
*dma_map_page(...)
)
... when != dma_mapping_error(e1,x)
@@
expression e1;
identifier x;
@@

 x =
(
*pci_map_single(...)
|
*pci_map_page(...)
)
 ... when != pci_dma_mapping_error(e1,x)
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Ben Marsh 2d5f6feca9 Staging: slicoss: changes comparisons to NULL in slicoss.c
This is a patch to slicoss.c to change the style of NULL comparisons in
order to remove checkpatch.pl warnings.

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Ben Marsh 98589c419d Staging: slicoss: removes unnecessary blank lines in slicoss.c
This is a patch to slicoss.c to remove unnecessary blank lines as found
by checkpatch.pl

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Ben Marsh 82554c2ffb Staging: slicoss: change memory allocation style in slicoss.c
This is a patch to slicoss.c to change the memory allocation style in
slicoss.c as found by checkpatch.pl

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Ben Marsh e4a34826d1 Staging: slicoss: changes the style of memory allocation in slicoss.c
This is a patch to slicoss.c to change the memory allocation style as
identified by checkpatch.pl

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Ben Marsh 5d7a3876ca Staging: slicoss: changes memory allocation style in slicoss.c
This is a patch to slicoss.c that changes the memory allocation style as
identified by checkpatch.pl

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Ben Marsh 4374849e1e Staging: slicoss: memory allocation style change in slicoss.c
This is a patch to slicoss.c to change the memory allocation style as
identified by checkpatch.pl

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Janani Ravichandran 3e0a66d016 staging: slicoss: Eliminate commented out code
Remove commented out code to reduce code clutter.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Janani Ravichandran 210ba93a18 staging: slicoss: Align #define constants
Aligning the constants in the macros improves code readability.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:50:11 -08:00
Kevin Wern c8e9b92d29 staging/slicoss: Use ethtool_ops instead of module_param.
ethtool_ops has attributes in sub struct ethtool_coalesce that
correspond to the parameters intagg_delay and dynamic_intagg. It is
preferable to set these properties with ethtool rather than
module_param, so create these attributes in adapter and set them using
ethtool_coalesce's rx_coalesce_usecs and rx_use_adaptive_coalesce.
(Outlined in TODO file)

Signed-off-by: Kevin Wern <kevin.m.wern@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-06 21:45:59 -08:00
Amarjargal Gundjalam f773a83479 staging: slicoss: Fixes block comment style
This patch fixes the checkpatch.pl warnings:

WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 14:43:31 +09:00
Amarjargal Gundjalam 0d45ffcd64 staging: slicoss: Adds space around operators
This patch fixes the checkpatch.pl check:

CHECK: spaces preferred around that ‘’

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 14:43:31 +09:00
Amarjargal Gundjalam 8610cbc574 staging: slicoss: Removes unnecessary space after a cast
This patch fixes the checkpatch.pl check:

CHECK: No space is necessary after a cast

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 14:43:31 +09:00
Amarjargal Gundjalam dfe459398f staging: slicoss: Removes multiple blank lines
This patch fixes the checkpatch.pl check:

CHECK: Please don't use multiple blank lines

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 14:43:31 +09:00
Shraddha Barke dd146d2194 Staging: slicoss: Remove unnecessary cast on void pointer
void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:51:48 -07:00
Sudip Mukherjee cbdc251d11 staging: slicoss: use status in isr
If we are not able to setup the LINK UP command then don't increment the
interrupt count.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-18 19:53:51 -07:00
Sudip Mukherjee 4b8645d643 staging: slicoss: use status in slic_ioctl
In the ioctl function if we are not able to UP the link after setting
the new parameters then return an error code to the userspace.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-18 19:53:51 -07:00
Sudip Mukherjee de4772aef3 staging: slicoss: use status in slic_if_init
While initializing the interface if we are not able to setup the command
to UP the link then we release everything and return the error code.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-18 19:53:51 -07:00
Sudip Mukherjee 78affe6522 staging: slicoss: return status of slic_link_event_handler
slic_link_event_handler() issues command READ_LINK_STATUS to be executed
asynchronously, which is followed by UP configuration write command. But
it can fail while setting up the command and in that case the link will
not be up. Lets check the status and return it.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-18 19:53:50 -07:00
Ciprian Manea 740d6c17c8 staging: slicoss: Add blank line after variable declarations.
This patch fixes the checkpatch.pl warning:

WARNING: Missing a blank line after declarations
+		unsigned long flags;
+		pshmem = (struct slic_shmem *)(unsigned long)

Signed-off-by: Ciprian Manea <ciprian.manea.cm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:14:53 -07:00
Hari Prasath Gujulan Elango b62b54378c staging: slicoss: remove unused macro
This patch removes a couple of ununsed MACRO's in this header file

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:30:40 -07:00
Dan Carpenter 46d74c38eb staging: slicoss: restore IRQs correctly after slic_cmdq_reset()
We can't save two different values in "flags" so it means that IRQs are
not enabled properly at the end of this function.  This isn't a problem
in the current code because it's always called with IRQs disabled so we
don't want to enable them at the end.

This bug is old but it's thanks to David Matlack's recent cleanups that
Smatch can detect it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: David Matlack <dmatlack@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 11:47:56 +09:00
David Matlack 36bf51acc8 staging: slicoss: fix occasionally writing out only half of a dma address
curaddrupper caches the last written upper 32-bits of a dma address
(the device has one register for the upper 32-bits of all dma
address registers). The problem is, not every dma address write
checks and sets curaddrupper. This causes the driver to occasionally
not write the upper 32-bits of a dma address to the device when it
really should.

I've seen this manifest particularly when the driver is trying to
read config data from the device (RCONFIG) in order to checksum the
device's eeprom. Since the device writes its config data to the
wrong DMA address the driver reads 0 as the eeprom size and the
eeprom checksum fails.

This patch fixes the issue by removing curaddrupper and always
writing the upper 32-bits of dma addresses.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-13 16:13:24 -07:00
David Matlack eafe600205 staging: slicoss: remove slic_spinlock wrapper
As per TODO. This commit introduces no functional changes.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-13 16:13:24 -07:00
Niranjan Dighe 3866a3c6e5 Staging: slicoss: Remove redundant and disabled code block
Removing code guarded by undefined macro SLIC_TRACE_DUMP_ENABLED

Signed-off-by: Niranjan Dighe <niranjan.dighe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:02:52 +01:00
Haneen Mohammed eb856202b9 Staging: slicoss: clean dev_err logging
This patch removes  __func__ from dev_err. dev_err includes information about:
(devcice, driver, specific instance of device, etc) in the log printout.
This was done using Coccinelle, with the following semantic patch:

@a@
expression E, R;
expression  msg;
@@

dev_err(E, msg, __func__, R);

@script:python b@
e << a.msg;
y;
@@

if(e.find("%s: ") == True):
	m = e.replace("%s: ", "", 1);
	coccinelle.y = m;
elif(e.find("%s ") == True):
	m = e.replace("%s ", "", 1);
	coccinelle.y = m;
elif(e.find("%s:") == True):
	m = e.replace("%s:", "", 1);
	coccinelle.y = m;
else:
	m = e.replace("%s", "",1);
	coccinelle.y = m;

@c@
expression a.E, a.msg, a.R;
identifier  b.y;
@@

- dev_err(E, msg, __func__, R);
+ dev_err(E, y, R);

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 15:55:36 -08:00
Aya Mahfouz 6e28c2a24a staging: slicoss: remove extra parentheses around left bit shift operations
Removes extra parentheses around bitwise left shift operations.
The case handled is when resultant value is assigned to a variable.
The issue was detected and resolved using the following
coccinelle script:

@@
expression e, e1;
constant c;
@@

e =
-(e1
+e1
<<
-c);
+c;

@@
identifier i;
constant c;
type t;
expression e;
@@

t i =
-(e
+e
<<
-c);
+c;

@@
expression e, e1;
identifier f;
constant c;
@@

e1 = f(...,
-(e
+e
<<
-c)
+c
,...);

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 15:24:23 -08:00
Aya Mahfouz a659b3e807 staging: slicoss: remove extra parentheses around right bit shift operations
Removes extra parentheses around bitwise right shift operations.
The cases handled here are when resultant values are assigned to
variables. The issue was detected and resolved using the following
coccinelle script:

@@
expression e, e1;
constant c;
@@

e =
-(e1
+e1
>>
-c);
+c;

@@
identifier i;
constant c;
type t;
expression e;
@@

t i =
-(e
+e
>>
-c);
+c;

@@
expression e, e1;
identifier f;
constant c;
@@

e1 = f(...,
-(e
+e
>>
-c)
+c
,...);

Some coding style issues were handled manually to avoid
checkpatch warnings and errors.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 15:22:43 -08:00
Navya Sri Nizamkari 0b5c85e0f4 staging: Remove <linux/moduleparam.h> header.
This patch drops #include <linux/moduleparam.h> in all the staging
driver files that also include #include <linux/module.h> as
module.h includes moduleparam.h already.

The following semantic patch is used to make these changes:

@ includesmodule @
@@
@ depends on includesmodule @
@@
- #include <linux/moduleparam.h>

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 17:09:52 -08:00
Ksenija Stanojevic 1cd0989e08 Staging: slicoss: Join split string.
This patch fixes warning issue by checkpatch.pl by joining the split string.
And also creates new warning that line exceeds 80 characters. In this case
this is more beneficial because of possibility to grep the string.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 15:18:36 -08:00
Aya Mahfouz 7d2b3cf7cf staging: slicloss: replace init_timer by setup_timer
This patch replaces init_timer and the 2 step initialization of function
and data by setup_timer to make the code more concise.

The issue was discovered using the following coccinelle script:

@@
expression ds, e1, e2;
@@

-init_timer (&ds);
+setup_timer (&ds, e1, e2);
...
(
-ds.function = e1;
...
-ds.data = e2;
|
-ds.data = e2;
...
-ds.function = e1;
)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 13:12:40 -08:00
Sean Cleator 17d2c6439b Staging: slicoss: Fix long line issues in slicoss.c
A patch to the slicoss.c file to fix some of the long line issues found by the
 checkpath.pl tool
 Signed-off-by: Sean Cleator <seancleator@hotmail.co.uk>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02 16:54:43 -08:00
Tina Johnson db9c930570 Staging: slicoss: Removed unnecessary parentheses
Unnecessary parentheses around the right hand side of an assignment
is removed using the following semantic patch:

@@
identifier x,f;
constant C;
@@
(
-x = (f / C );
+x = f / C ;
|
-x = (f % C );
+x = f % C ;
)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 15:58:17 +08:00
Ebru Akagunduz 438c582602 staging: slicoss: Use inplace convert with __be32 *
This patch fixes "cast to restricted __be32"
sparse warning.

remove  temporary value assignment and use inplace
__be32 conversion for ntohl function which is can
get big endian format

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:05 +08:00
Dilek Uzulmez f999ac00c7 staging: slicoss: Fix warning of prefer ether_addr_copy().
This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)" in file slicoss.c
Pahole shows that the addresses are aligned.

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:19 +08:00
Dilek Uzulmez 8ec2f8f0b9 staging: slicoss: Fix void function return statements style warning
This fixes "void function return statements are not generally useful"
checkpatch.pl warning slicoss.c

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:36:24 -04:00
Quentin Lambert 0d0e9d9e77 staging: slicoss: fix a blank line coding style issue
Add 2 missing blank lines after declaration.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:13 -07:00
Joe Perches 8b983be54b staging: use pci_zalloc_consistent
Remove the now unnecessary memset too.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Lior Dotan <liodot@gmail.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:30 -07:00
Vincent Heuken 351e836fa6 Staging: slicoss: fixed frivolous else statement warnings in slicoss.c
This is a patch for the slicoss.c file that fixes four instances
of the following warning:
WARNING: else is not generally useful after a break or return

Signed-off-by: Vincent Heuken <me@vincentheuken.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 21:00:49 -04:00
David Matlack 811e843ddf staging: slicoss: clean up use of dev_err
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 <matlackdavid@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-25 10:59:53 -07:00
David Matlack 17dd4338f3 staging: slicoss: remove private netdev list
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 <matlackdavid@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-25 10:59:53 -07:00
David Matlack 47a401a8ae staging: slicoss: handle errors from slic_config_get
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 <matlackdavid@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 20:16:40 +09:00
David Matlack 28277a55fd staging: slicoss: fail on corrupt eeprom
Remove fail_on_bad_eeprom, which was always 0 and thus being used
to ignore incorrect checksumming. This means devices with corrupt
eeprom will now cause the driver to fail.

Since fail_on_bad_eeprom was the last member in use of struct
slic_reg_params, remove that struct altogether.

Signed-off-by: David Matlack <matlackdavid@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 20:13:13 +09:00
David Matlack 55b62cdfe9 staging: slicoss: fix eeprom checksum code
Rewrite slic_eeprom_cksum() to fix bugs and make readable. This patch
technically has no effect on the user as failed eeprom checksums are
ignored anyway.

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);    /* verify */
       }

     This processes 32-bytes of data but only increments the word
     pointer by 16 bytes. Fixing both of these bugs seems to fix
     slic_eeprom_cksum().

  2. Non-descriptive variable names, use of unions, and macros that
     change local state make the code difficult to read.

  3. The checksum loop is unrolled which makes the code harder to
     reason about while providing small performance improvement:
      - max eeprom length is 0x80 bytes (MAX_EECODE_SIZE), 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 <matlackdavid@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 20:13:12 +09:00
David Matlack dedabbbcb5 staging: slicoss: fix use-after-free bug in slic_entry_remove
This patch fixes a use-after-free bug that causes a null pointer
dereference in slic_entry_halt.

Since unregister_netdev() will ultimately call slic_entry_halt (the
net_device ndo_stop() virtual function for this device), we should
call it before freeing the memory used by slic_entry_halt.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 20:08:34 +09:00
David Matlack 0783c636d1 staging: slicoss: fix 64-bit isr address bug
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 <dmatlack@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 20:08:34 +09:00
David Matlack 9bc97445a3 staging: slicoss: fix dma memory leak
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 <dmatlack@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 20:08:34 +09:00
David Matlack 04cc3c8a80 staging: slicoss: remove gratuitous debug infrastructure
As per the TODO file, this patch removes the gratuitous debug
infrastructure. As an extra incentive for removing this code,
the debugfs files are not cleaned up properly. For example, if
register_netdev() fails in slic_entry_probe() then all debugfs
files get left behind, even after the driver module is unloaded.
Touching these files quickly leads to an oops.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 20:08:33 +09:00