Commit graph

520234 commits

Author SHA1 Message Date
Gujulan Elango, Hari Prasath (H.) 4bff39dfb7 staging: wlan-ng: check return value of kmalloc
check return value of kmalloc before accessing the memory pointer and
return -ENOMEM if allocation fails.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:01:51 +09:00
Arnd Bergmann 7f804436fb staging: lustre: remove unused variable warning
A recent patch to simplify the lustre large memory allocation
causes new warnings as an unintended side-effect:

lustre/lov/lov_request.c: In function 'lov_finish_set':
lustre/lov/lov_request.c:78:7: warning: unused variable 'len' [-Wunused-variable]
   int len = set->set_oabufs * sizeof(*set->set_pga);
       ^
lustre/obdclass/acl.c: In function 'lustre_ext_acl_xattr_reduce_space':
lustre/obdclass/acl.c:123:6: warning: unused variable 'old_size' [-Wunused-variable]
  int old_size = CFS_ACL_XATTR_SIZE(old_count, ext_acl_xattr);
      ^

The reason is that the 'size' argument to OBD_FREE_LARGE()
is never needed, which was previously hidden by the extra
abstractions.

This avoids the warnings by adding a cast to void, to tell
the compiler that the argument is intentionally unused.
A better fix is probably to remove the entire set of allocation
macros and open-code the normal kernel interface calls.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 99d56ff7c1 ("staging/lustre: Always try kmalloc first for OBD_ALLOC_LARGE")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:42:27 +09:00
Mike Shuey bdd84a6f4b staging: lustre: lnet: remove LNET_MUTEX_LOCK macro
LNET_MUTEX_LOCK and LNET_MUTEX_UNLOCK are verbose wrappers to mutex_lock and
mutex_unlock.  Get rid of these.

Signed-off-by: Mike Shuey <shuey@purdue.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:35:38 +09:00
Mike Shuey 74d6801162 staging: lustre: lnet: selftest: code cleanup - variable spacing, indentation
Unify spacing in variable declarations, and align indentation in headers.
General whitespace cleanups.

Signed-off-by: Mike Shuey <shuey@purdue.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:35:38 +09:00
Mike Shuey 97d10d0a40 staging: lustre: lnet: socklnd: code cleanup - align spacing
Unify variable declarations to use a single space.  Also include several
miscellaneous whitespace cleanups, particularly in socklnd.h.

Signed-off-by: Mike Shuey <shuey@purdue.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:35:38 +09:00
Mike Shuey ec3d17c0ed staging: lustre: lnet: o2iblnd: code cleanup - align whitespace
Unify variable declarations to use a single whitespace.  Also line up
declarations and comments in o2iblnd.h.

Signed-off-by: Mike Shuey <shuey@purdue.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:35:37 +09:00
Mike Shuey 92980ff946 staging: lustre: lnet: lnet: Module is LNet, not Portals
Fix the module version to match upstream development.

Signed-off-by: Mike Shuey <shuey@purdue.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:35:37 +09:00
Mike Shuey 7c285a1934 staging: lustre: lnet: dead code - remove LNetSetAsync
LNetSetAsync() returns 0, and is never called.  Doesn't exist in the Intel
tree, either.  Remove it.

Signed-off-by: Mike Shuey <shuey@purdue.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:35:37 +09:00
Mike Shuey 4de4e73625 staging: lustre: lnet: dead code - remove lnet_fini_locks
lnet_fini_locks() does nothing.  Remove.

Signed-off-by: Mike Shuey <shuey@purdue.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:35:37 +09:00
Mike Shuey 7e7ab095cf staging: lustre: lnet: lnet: code cleanups - variable declarations
Unify variable declarations to use a single space, and any other obvious
spacing flaws.

Signed-off-by: Mike Shuey <shuey@purdue.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:32:46 +09:00
Adrian Remonda 4f445e634c Staging: lustre: Fixed typo
In the explanation of the function the name of the function was incorrect

Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:32:46 +09:00
Oleg Drokin a612b00728 staging/lustre/llite: Fix wrong identing in ll_setxattr_common
smatch has highlighted wrong indenting that results from
commit 7fc1f831d8 ("staging/lustre/llite: extended attribute cache")

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:29:45 +09:00
Oleg Drokin 3959d0cb7e staging/lustre/ptlrpc: Fix potential NULL pointer dereference
In lov_unpackmd() there's this strange bit of code where we first try
to look inside of lmm striping pattern for it's type, and then
we check if the pattern is NULL which cannot be right.
Move the check under if (lmm) branch so that it's safe.

Found by Coverity version 6.6.1

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-on: http://review.whamcloud.com/7827
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4049
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Signed-off: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:29:45 +09:00
Oleg Drokin 38bbb63d94 staging/lustre/ptlrpc: Fix wrong indenting in plain_authorize()
smatch highlighted a wrongly indented bit of code that almost
hides the extra assignment.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:29:45 +09:00
Oleg Drokin 65609bd672 staging/lustre: Only set INTERRUPTIBLE state before calling schedule
In __l_wait_event the condition could be a complicated function that does
allocations and other potentialy blocking activities, so it sohuld
not be called in a task state other than RUNNABLE

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:29:44 +09:00
Luca Ceresoli e630eb48ff staging: rtl8723au: remove useless comment
"step 2" does mean much as there is no "step 1" stated anywhere...

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:22:45 +09:00
Luca Ceresoli b2f23a2d71 staging: rtl8723au: remove useless return value
The loadparam() function cannot fail, it's called only once and its return
value is ignored there.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:22:44 +09:00
Juston Li 711c9b3ce4 staging: rtl8723au: fix sparse warning
change cast to __le16 to fix the following warning:
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1488:20: warning: cast to restricted __le16

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:22:44 +09:00
Gujulan Elango, Hari Prasath (H.) 77198552a4 staging: rtl8723au: remove redundant initialization
The variable pHalData is initialized twice in this same function with
same value.So removing one of them.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:22:44 +09:00
Pekka Enberg 322489d9d5 staging/lustre: Use roundup_pow_of_two() in LNetEQAlloc()
Use roundup_pow_of_two() and drop the private cfs_power2_roundup()
implementation.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:19:37 +09:00
Pekka Enberg 36fc244869 staging/lustre: Remove duplicate helpers from libcfs.h
Remove bunch of duplicate helpers from libcfs.h that are guaranteed to
be present.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:19:37 +09:00
Pekka Enberg e3bf98f71d staging/lustre: Remove __attribute__ definition from libcfs.h
Linux requires a GNU C compatible compiler so drop a pointless define.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:19:37 +09:00
Gujulan Elango, Hari Prasath (H.) db562e8154 staging: lustre: check kzalloc return value
check the return value of kzalloc before accessing the memory pointer

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:19:37 +09:00
Gunasundar, Balamanikandan (B.) 58973deb5b Staging: lustre: Replace kzalloc and memcpy by kmemdup
This patch was generated by 'make coccicheck'

Signed-off-by: Balamanikandan Gunasundar <bgunasun@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:19:36 +09:00
Ankit Garg 109a1624e3 staging: lustre: lclient: lcommon_cl.c fixing coding style issues
This patch fixes the checkpatch.pl warning:

WARNING: else is not generally useful after a break or return
+                       return result;
+               } else {

Signed-off-by: Ankit Garg <kerneldvlper@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:19:36 +09:00
Al Viro 907b8a0012 lustre: kill unused helper
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:11:47 +09:00
Al Viro 24b44e0c0b lustre: kill unused macro (LOOKUP_CONTINUE)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:11:47 +09:00
Sasha Levin adf1b358a9 staging: wilc1000: off by one in wilc_wfi_cfg80211_mgmt_types
NL80211_IFTYPE_MAX represents the largest interface type number defined,
so declaring the array with that size will actually leave out the last
interface.

This causes invalid memory access whenever this array is used, which starts
happening at boot.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 09:00:15 +09:00
Arnd Bergmann 691f1a2f03 staging: wilc1000: remove __DRIVER_VERSION__ macro
The driver version is meaningless, and in particular does not
have to be passed from the Makefile. This removes the macros,
but leaves the behavior of printing the 10.2 version untouched
for the moment.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:57 +09:00
Arnd Bergmann 1999bd5251 staging: wilc1000: remove thread wrapper
The wilc_thread code is a very thin wrapper around kthread,
so just remove it and use kthread directly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:57 +09:00
Arnd Bergmann 544c69dc83 staging: wilc1000: remove platform version checks
For code that is integrated into mainline Linux, checks for
the OS platform make no sense, because we know that we
are on Linux.

This removes all checks and the associated dead code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:56 +09:00
Arnd Bergmann e5af056149 staging: wilc1000: remove linux version checks
For code that is integrated into mainline Linux, checks for
the kernel version make no sense, because we know which version
we are compiling against.

This removes all checks and the associated dead code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 08:56:56 +09:00
Arnd Bergmann 9535ebc5e9 staging/wilc1000: fix Kconfig dependencies
The newly added wilc1000 driver lacks several Kconfig dependencies,
resulting in a multitude of randconfig build errors, e.g.:

drivers/built-in.o: In function `WILC_WFI_mgmt_tx_cancel_wait':
binder.c:(.text+0x12bd28): undefined reference to `cfg80211_remain_on_channel_expired'
drivers/built-in.o: In function `WILC_WFI_CfgSetChannel':
binder.c:(.text+0x12c9d8): undefined reference to `ieee80211_frequency_to_channel'
drivers/built-in.o: In function `WILC_WFI_CfgAlloc':
binder.c:(.text+0x132530): undefined reference to `wiphy_new_nm'
drivers/built-in.o: In function `wilc_netdev_init':
binder.c:(.text+0x1356d0): undefined reference to `register_inetaddr_notifier'
drivers/built-in.o: In function `linux_spi_init':
binder.c:(.text+0x210a68): undefined reference to `spi_register_driver'

This change ensures that we always have at least one of SPI or MMC
enabled, and are only able to pick an interface that works. It also
adds all the missing dependencies for networking infrastructure
(cfg80211, wext, and ipv4).

In order to make it readable, I also took the liberty of re-indenting
the Kconfig file to the normal conventions.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-28 09:06:45 -07:00
Guenter Roeck e3cb742c32 staging: wilc1000: Disable for S390
The wilc1000 driver uses definitions such as DEBUG_LEVEL, DEBUG,
and PRINT_INFO. This causes compile errors on S390 which has similar
definitions in its core code. Disable the driver for S390 instead
of giving the non-standard messaging code credit by trying to fix it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-27 21:47:16 -07:00
Guenter Roeck f1a9983002 staging: wilc1000: Include linux/gpio.h instead of asm/gpio.h
Fix:

drivers/staging/wilc1000/linux_wlan.c:18:22: fatal error:
	asm/gpio.h: No such file or directory

Not every architecture has asm/gpio.h. Include linux/gpio.h instead.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-27 16:23:38 -07:00
Johnny Kim a30baec189 staging: MAINTAINERS: add maintainer for wilc1000 device
Add myself as maintainer for atmel wilc1000

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Rachel Kim <rachel.kim@atmel.com>
Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Chris Park <chris.park@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:36:53 -07:00
Johnny Kim c5c77ba18e staging: wilc1000: Add SDIO/SPI 802.11 driver
This driver is for the wilc1000 which is a single chip IEEE 802.11
b/g/n device.
The driver works together with cfg80211, which is the kernel side of
configuration management for wireless devices because the wilc1000
chipset is fullmac where the MLME is managed in hardware.

The driver worked from kernel version 2.6.38 and being now ported
to several others since then.
A TODO file is included as well in this commit.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Rachel Kim <rachel.kim@atmel.com>
Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Chris Park <chris.park@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:36:53 -07:00
Sudip Mukherjee 7d98c63edc staging: panel: fix stackdump
if we load the module, unload and then again try to load the module, we
will get a stackdump. In the module_exit function we are unregistering
the device and releasing the parport. So when we reach the detach
function parport is already null and the unregister_reboot_notifier()
is never called. When we again try to load the module it again tries
register_reboot_notifier() and gives us a stackdump as its earlier
registration is still not removed. It was caused by the
commit bb046fef96 ('staging: panel: register reboot')
Fix this by moving all the unregistering and releasing in the detach
function, which should be the ideal case as the detach will be called if
we try to unregister the driver or if the parport is removed.

Fixes: bb046fef96 ('staging: panel: register reboot')
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:35:25 -07:00
Huacai Chen 288ef567ab staging: sm750: Fix lynxfb_ops_imageblit() if image->depth != 1
If image->depth != 1, lynxfb_ops_imageblit() should fallback to call
cfb_imageblit(), not return directly. Otherwise it can't display the
boot logo.

Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:34:49 -07:00
Luis R. Rodriguez 2e043a923e staging: sm750fb: use arch_phys_wc_add() and ioremap_wc()
The same area used for ioremap() is used for the MTRR area.
Convert the driver from using the x86 specific MTRR code to
the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
will avoid MTRR if write-combining is available, in order to
take advantage of that also ensure the ioremap'd area is requested
as write-combining.

There are a few motivations for this:

a) Take advantage of PAT when available

b) Help bury MTRR code away, MTRR is architecture specific and on
   x86 its replaced by PAT

c) Help with the goal of eventually using _PAGE_CACHE_UC over
   _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit
   de33c442e titled "x86 PAT: fix performance drop for glx,
   use UC minus for ioremap(), ioremap_nocache() and
   pci_mmap_page_range()")

The conversion done is expressed by the following Coccinelle
SmPL patch, it additionally required manual intervention to
address all the #ifdery and removal of redundant things which
arch_phys_wc_add() already addresses such as verbose message
about when MTRR fails and doing nothing when we didn't get
an MTRR.

@ mtrr_found @
expression index, base, size;
@@

-index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
+index = arch_phys_wc_add(base, size);

@ mtrr_rm depends on mtrr_found @
expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
@@

-mtrr_del(index, base, size);
+arch_phys_wc_del(index);

@ mtrr_rm_zero_arg depends on mtrr_found @
expression mtrr_found.index;
@@

-mtrr_del(index, 0, 0);
+arch_phys_wc_del(index);

@ mtrr_rm_fb_info depends on mtrr_found @
struct fb_info *info;
expression mtrr_found.index;
@@

-mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
+arch_phys_wc_del(index);

@ ioremap_replace_nocache depends on mtrr_found @
struct fb_info *info;
expression base, size;
@@

-info->screen_base = ioremap_nocache(base, size);
+info->screen_base = ioremap_wc(base, size);

@ ioremap_replace_default depends on mtrr_found @
struct fb_info *info;
expression base, size;
@@

-info->screen_base = ioremap(base, size);
+info->screen_base = ioremap_wc(base, size);

Generated-by: Coccinelle SmPL
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Suresh Siddha <sbsiddha@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Juergen Gross <jgross@suse.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: devel@driverdev.osuosl.org
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:34:26 -07:00
Valentin Rothberg f6abdb5029 staging: I2O cleanup
Remove the last reference on menuconfig I20 that has been removed by
commit 4a72a7af46 ("staging: remove i2o subsystem").

Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:33:43 -07:00
Valentin Rothberg b99464b1da staging: unisys: cleanup UNISYS_VISORUTIL
Commit 53490b545c ("staging: unisys: move periodic_work.c into the
visorbus directory") removed the Kconfig option UNISYS_VISORUTIL, but
left one reference in a Kconfig select.  Remove this last reference.

Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:32:15 -07:00
Don Zickus b4b598fdde staging: unisys: Convert device functions to pass dev_info pointer around
Most device functions pass bus_no and dev_no around and then do a lookup
inside each function to find the dev_info struct.  Instead just pass the
pointer.

This prepares us for a later conversion to using visor device.

No real technical changes.  Just function header changes and little
cleanups as a result.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:30:31 -07:00
Don Zickus 3032aeddd8 staging: unisys: Convert bus functions to pass bus_info pointer around
Most bus functions pass bus_no around and then do a lookup inside each
function to find the bus_info struct.  Instead just pass the pointer.

This prepares us for a later conversion to using visor_device.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:28:56 -07:00
Don Zickus 5ecbd5d46d staging: unisys: Convert the device attributes to visor_device
Convert the device attribute files to properly use visor_device.
This removes a whole bunch of checks and assumptions and simplifies
the code.  Everything is straightforward.

No testing down as I can't mimic channel info correctl.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:28:56 -07:00
Don Zickus 24c5a74e7d staging: unisys: Remove unused intr
The conversion to visor_device caused some compile issues.The main
problem was the new fields in 'struct visor_device' were not public.
Remove one that wasn't being used for now.

struct irq_info intr

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:28:56 -07:00
Don Zickus d5531f3701 staging: unisys: Add checks for creation
There was a bunch of channel creation checks before the
visorchannel_create function was called, moving some of those
checks inside.  This keeps the outside code cleaner and handles
the situation where a caller forgets to make these checks.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:28:56 -07:00
Don Zickus 4f6d8a9783 staging: unisys: Add a function to set the clientpartition
This patch is an attempt to help hide the channel info behind
accessory functions.  I was trying to keep visorchannel as private
as possible.

The only function missing that seemed to be needed for now was
the ability to set the clientpartition.  So I expose that here.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:28:56 -07:00
Don Zickus ab0592b9fb staging: unisys: Add visor device find routine
If we are going to remove the bus_info structs than we need a way
to find the devices when the *_create/destroy cmds are sent over
the vmchannel.

This function crudely impements what pci has.  It takes a bus_no
and dev_no and finds the matching 'struct visor_device'.

This function can/should be optimzed later once we get our heads
wrapped around its needs.  For now, I am using dev_no=0 to mean
the visorbus itself.

The function is limited to chipset.c only because it is only needed
to do the lookups upon receiving a vmchannel command.  Future patches
will make sure the resulting 'struct visor_device' is used every
where else.

Also allow visorbus_type to be more visible for use.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:28:55 -07:00
Don Zickus 1fb3016eab staging: unisys: Prep for removing 'info' structs
The visorbus driver has three _info structs lying around
(device, bus, channel) that store subsets of info from the
bigger structs.

Having these structs around make resource handling very difficult
and more complicated than it needs to be.  Use the device
infrastructure and instead pass 'struct visor_device' all
over the place.

In order to do that 'struct visor_device' needs to get smarter.
This patch adds the pieces to prep for it.  The new elements
will be used in later patches.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:28:55 -07:00