Commit Graph

182 Commits

Author SHA1 Message Date
Al Viro bae301d346 staging: single_open() leaks
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-05 00:15:43 -04:00
Linus Torvalds 20b4fb4852 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS updates from Al Viro,

Misc cleanups all over the place, mainly wrt /proc interfaces (switch
create_proc_entry to proc_create(), get rid of the deprecated
create_proc_read_entry() in favor of using proc_create_data() and
seq_file etc).

7kloc removed.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
  don't bother with deferred freeing of fdtables
  proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
  proc: Make the PROC_I() and PDE() macros internal to procfs
  proc: Supply a function to remove a proc entry by PDE
  take cgroup_open() and cpuset_open() to fs/proc/base.c
  ppc: Clean up scanlog
  ppc: Clean up rtas_flash driver somewhat
  hostap: proc: Use remove_proc_subtree()
  drm: proc: Use remove_proc_subtree()
  drm: proc: Use minor->index to label things, not PDE->name
  drm: Constify drm_proc_list[]
  zoran: Don't print proc_dir_entry data in debug
  reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
  proc: Supply an accessor for getting the data from a PDE's parent
  airo: Use remove_proc_subtree()
  rtl8192u: Don't need to save device proc dir PDE
  rtl8187se: Use a dir under /proc/net/r8180/
  proc: Add proc_mkdir_data()
  proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
  proc: Move PDE_NET() to fs/proc/proc_net.c
  ...
2013-05-01 17:51:54 -07:00
David Howells 294a08e4b0 csr: Don't use create_proc_read_entry()
Don't use create_proc_read_entry() as that is deprecated, but rather use
proc_create_data() and seq_file instead.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: Randy Dunlap <rdunlap@xenotime.net>
cc: Priit Laes <plaes@plaes.org>
cc: devel@driverdev.osuosl.org
cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
cc: Riku Mettälä <riku.mettala@bluegiga.com>
cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-29 15:41:52 -04:00
Al Viro 75ef9de126 constify a bunch of struct file_operations instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09 14:16:20 -04:00
Masanari Iida 4445d254cd staging:csr: Fix typo in staging/csr driver
Correct spelling typo in comment within staging/csr

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-08 10:22:50 -07:00
Dan Carpenter 69c1440e86 staging: csr: info leak in unifi_cfg_get_info()
"cfg_ap_config" has a number of fields which are not cleared before we
copy them to the user.  I've added a memset() at the beginning to set
everything to zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:17:00 -07:00
Masanari Iida 10f035a010 staging:csr: Fix typos in comment and printk
Correct spelling typo in comments and printks.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:25:43 -07:00
Masanari Iida 58af42a447 staging: csr: Fix typos in csr
Correct spelling typos in comment witin csr.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:17:34 -07:00
Devendra Naga d4a67bb2e2 staging: csr: fix compilation warning in unifi_siwscan
got the warnings

drivers/staging/csr/sme_wext.c: In function ‘unifi_siwscan’:
drivers/staging/csr/sme_wext.c:1276:9: warning: variable ‘scantype’ set but not used [-Wunused-but-set-variable]

fixed by removing the variable

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-14 13:40:58 -07:00
Zhang Yanfei f4309c0f14 driver: staging: csr: remove cast for kmalloc return value
remove cast for kmalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-12 09:09:08 -07:00
SeongJae Park b6dd012efc staging: csr: csr_time.c: Fix coding style
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11 09:51:08 -07:00
Linus Torvalds b5c78e04dd Staging tree update for 3.9-rc1
Here's the big staging tree merge for 3.9-rc1
 
 Lots of cleanups and updates for drivers all through the staging tree.
 We are pretty much "code neutral" here, adding just about as many lines
 as we removed.
 
 All of these have been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEUEABECAAYFAlEmW7QACgkQMUfUDdst+ymlIACXT5mv8Y5A/KJa+QLTNNsofI8u
 aACgq9hNZxJzX6VQMLXUV8+2SILOqYo=
 =5wIj
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging tree update from Greg Kroah-Hartman:
 "Here's the big staging tree merge for 3.9-rc1

  Lots of cleanups and updates for drivers all through the staging tree.
  We are pretty much "code neutral" here, adding just about as many
  lines as we removed.

  All of these have been in linux-next for a while."

* tag 'staging-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (804 commits)
  staging: comedi: vmk80xx: wait for URBs to complete
  staging: comedi: drivers: addi-data: hwdrv_apci3200.c: Add a missing semicolon
  staging: et131x: Update TODO list
  staging: et131x: Remove assignment of skb->dev
  staging: wlan-ng: hfa384x.h: fix for error reported by smatch
  staging/zache checkpatch ERROR: spaces prohibited around that
  staging/ozwpan: Mark read only parameters and structs as const
  staging/ozwpan: Remove empty and unused function oz_cdev_heartbeat
  staging/ozwpan: Mark local functions as static (fix sparse warnings)
  staging/ozwpan: Add missing header includes
  staging/usbip: Mark local functions as static (fix sparse warnings)
  staging/xgifb: Remove duplicated code in loops.
  staging/xgifb: Consolidate return paths
  staging/xgifb: Remove code without effect
  staging/xgifb: Remove unnecessary casts
  staging/xgifb: Consolidate if/else if with identical code branches
  staging: vt6656: replaced custom TRUE definition with true
  staging: vt6656: replaced custom FALSE definition with false
  staging: vt6656: replace custom BOOL definition with bool
  staging/rtl8187se: Mark functions as static to silence sparse
  ...
2013-02-21 12:11:44 -08:00
Clark Williams 8bd75c77b7 sched/rt: Move rt specific bits into new header file
Move rt scheduler definitions out of include/linux/sched.h into
new file include/linux/sched/rt.h

Signed-off-by: Clark Williams <williams@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20130207094707.7b9f825f@riff.lan
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-02-07 20:51:08 +01:00
Peter Huewe 2643c47fa4 staging/csr: Use kmemdup rather than duplicating its implementation
Found with coccicheck.
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29 23:22:16 -05:00
Peter Huewe 94b84e4510 staging/csr: Fix dereference before check
Smatch complains about some pointers that are dereferenced before being
checked:

drivers/staging/csr/sme_sys.c:285
CsrWifiRouterCtrlHipReqHandler() warn: variable dereferenced before
check 'priv' (see line 283)
drivers/staging/csr/sme_sys.c:1503
CsrWifiRouterMaPacketReqHandler() warn: variable dereferenced before
check 'priv' (see line 1501)
drivers/staging/csr/sme_sys.c:2062
CsrWifiRouterCtrlPeerDelReqHandler() warn: variable dereferenced before
check 'priv' (see line 2059)
drivers/staging/csr/sme_sys.c:2477
CsrWifiRouterCtrlPeerAddReqHandler() warn: variable dereferenced before
check 'priv' (see line 2474)
drivers/staging/csr/sme_sys.c:3045
CsrWifiRouterCtrlWapiRxPktReqHandler() warn: variable dereferenced
before check 'priv' (see line 3039)

We put the check before the dereferencing and prevent an oops and fix
the warning.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 14:56:04 -08:00
Cyril Roelandt 78855c7a7c staging: csr: remove unneeded call to memset().
In uf_send_pkt_to_encrypt(), the memory area zeroed by this call to memset() is
overwritten by a call to memcpy() a few instructions later, so it is not needed.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 14:03:32 -08:00
Bill Pemberton 941906647a staging: csr: remove CONFIG_HOTPLUG ifdefs
Remove conditional code based on CONFIG_HOTPLUG being false.  It's
always on now in preparation of it going away as an option.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 15:04:58 -08:00
Hojung Youn fb7d2ebd21 staging: csr: csr_wifi_hip_unifi_signal_names: Fix pointer position
Fixed pointers' positions in the csr_wifi_hip_unifi_signal_names.c file
that were identifed by checkpatch.pl tool.

Signed-off-by: Hojung Youn <amoc.yn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:32:17 +01:00
Hojung Youn 65dbeb195a staging: csr: csr_wifi_hip_unifi_signal_names: fix whitespaced paddings
Fixed whitespace paddings in the csr_wifi_hip_unifi_signal_names.c file
that were, though, not identified by checkpatch.pl tool.

Signed-off-by: Hojung Youn <amoc.yn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:32:17 +01:00
Hojung Youn a90770e0c3 staging: csr: csr_wifi_hip_unifi_signal_names: fix brackets
Fixed brackets' positions in the csr_wifi_hip_unifi_signal_names.c file
that were identified by checkpatch.pl tool.  Some brackets are removed
which are not needed by the rule of CodingStyle documentation.

Signed-off-by: Hojung Youn <amoc.yn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:32:17 +01:00
Hojung Youn 279dda68e2 staging: csr: csr_wifi_hip_unifi_signal_names: fix indent
Fixed indent style  in the csr_wifi_hip_unifi_signal_names.c
file that were identified by checkpatch.pl tool. All whitespaced
indents are converted into tab characters,  except ones in the
topmost commentation.

Signed-off-by: Hojung Youn <amoc.yn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:32:17 +01:00
Devendra Naga 986842dd57 staging: csr: csr_wifi_nme_task.h: remove function prototypes
there are function definitions missing for these prototypes, so
remove all 3 function protos.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-01 08:48:56 -07:00
Devendra Naga 4a530183f5 staging: csr: csr_wifi_nme_ap_lib.h: remove the function prototypes
these function prototypes are missing the function definition,
remove them all.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-01 08:48:56 -07:00
Devendra Naga 1454201f2d staging: csr: csr_wifi_nme_lib.h: remove function prototypes
the function definitions are missing for these prototypes, so remove all
these.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-01 08:48:56 -07:00
Devendra Naga a6de05d87a staging: csr: sme_blocking.c: add missing check for return of sme_wait_for_reply
sme_ap_config misses a check of the return of the sme_wait_for_reply
as all other functions do here, for the return of sme_wait_for_reply
add the check and fail if it returns other than 0.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-01 08:48:56 -07:00
Devendra Naga 6d700d72c9 staging: csr: sme_blocking.c: remove braces around single statement blocks
remove the braces around single statement if blocks

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-01 08:48:55 -07:00
Devendra Naga 3b7ffa6fc0 staging: csr: sme_blocking.c: replace spaces with the tabs in sme_mgt_tspec
replace spaces at start of line with tabs in sme_mgt_tspec

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-01 08:48:55 -07:00
Devendra Naga dc958bbad3 staging: csr: sme_blocking.c: replace spaces with tabs
replace spaces at the beginning of the line with tabs in sme_mgt_packet_filter_set

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-01 08:48:55 -07:00
Devendra Naga 79caaba624 staging: csr: inet.c: replaces spaces with tabs
replace spaces with tabs at the start of line

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-01 08:48:55 -07:00
Devendra Naga d05b25b97c staging: csr: inet.c: single statement if blocks doesn't need braces
remove braces to single statement if blocks

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-01 08:48:55 -07:00
Devendra Naga d0eb3ddb44 staging: csr: csr_log_configure.h: remove a bunch of function protos
all protos that are removed does not have a function definition
so remove all of them together

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-30 12:45:39 -07:00
Devendra Naga 32a126966f staging: csr: remove csr_lib.h
remove this header file as no struct or no function is
defined else where in csr.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-30 12:45:39 -07:00
Devendra Naga 4933d3935c staging: csr: os.c: remove braces around single statement blocks
remove all braces around single statement if blocks

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-30 12:45:38 -07:00
Devendra Naga 958bcf5b36 staging: csr: os.c: remove col variable
theres no point in checking the col variable,
its always zero, and wont print a new line, actually
its better to have a new line after a set of characters
printed, instead of confusing with the concatenated
characters when called multiple times at a time.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-30 12:45:38 -07:00
Devendra Naga ffe6d91cdb staging: csr: drv.c: replace spaces with tabs in uf_destroy_device_nodes
replace spaces at the start of line with tabs

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-30 12:45:38 -07:00
Devendra Naga a319cefe32 staging: csr: drv.c: replace spaces with tabs
replace spaces at the start of the line with tabs

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-30 12:45:38 -07:00
Devendra Naga f145b4f4dd staging: csr: io.c: replace spaces with tabs
replace the spaces with the tabs at the start of line

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-30 12:45:38 -07:00
SeongJae Park e07384adc6 staging: csr: Remove struct CsrEvent
Nobody use struct CsrEvent. So, remove it.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-30 10:39:15 -07:00
Masanari Iida 28c4ff6435 staging : csr: Fix typo in csr/netdev.c
Correct spelling typos in csr/netdev.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-29 14:58:30 -07:00
Devendra Naga 1f5466b0a6 staging: csr: remove func_exit_r macro
this macro is used for debugging purposes,

it actually defined as

if (unifi_debug >= 5) {
	printk("unifi: <= %s %d\n", __FUNCTION__, (int)rc);
}

which produces too many of those prints if the unifi_debug is >=5.
remove these calls and the macro itself altogether

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-29 14:54:34 -07:00
Devendra Naga 75254af890 staging: csr: remove func_exit macro
this macro is used for debugging purposes,

it actually defined as

if (unifi_debug >= 5) {
	printk("unifi: <= %s\n", __FUNCTION__);
}

which produces too many of those prints if the unifi_debug is >=5.
remove these calls and the macro itself altogether

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-29 14:54:34 -07:00
Devendra Naga 438d2d1329 staging: csr: remove func_enter macro
this macro is used for debugging purposes,

it actually defined as

if (unifi_debug >= 5) {
	printk("unifi => %s\n", __FUNCTION__);
}

which produces too many of those prints if the unifi_debug is >=5.
remove these calls and the macro itself altogether

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-29 14:54:34 -07:00
Greg Kroah-Hartman d9ff393417 Staging: csr: remove CSRMIN() macro
Use the in-kernel min_t() macro for the one place it was being used.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26 17:11:23 -07:00
Greg Kroah-Hartman 0160daf8ce Staging: csr: csr_macro.h: remove unused macros
Remove a bunch of unused #defines.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26 16:34:08 -07:00
Greg Kroah-Hartman 31370f7e57 Staging: csr: remove __cplusplus nonsense from the .h files
In the kernel, we use C.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26 16:29:09 -07:00
Devendra Naga 1481c5f108 staging: csr: remove unused macros and prototypes
this file includes prototypes that doesnt have a function for them,
and some macros which are never used, remove them instead

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26 15:52:10 -07:00
Devendra Naga 7a4cae7aab staging: csr: remove unused macros/ prototypes in csr_sched.h
there are macros and functions that are not used, or their
function is missing, so remove them.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26 15:52:10 -07:00
Devendra Naga ea50aab519 staging: csr: remove csrPanic and CSR_LOG_ASSERT and CSR_LOG_ASSERT_ENABLE
these are not called at anypoint or enabled at anyplace in the code,
remove them

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26 09:07:46 -07:00
Devendra Naga 7f7a252cd0 staging: csr: remove all prototypes of not defined functions
these prototypes doesn't have function definitions in any of the
c files

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26 09:06:59 -07:00
Devendra Naga 4c956106d4 staging: csr: remove CsrMutexCreate function
nobody are calling this function in here, so remove this

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26 09:06:59 -07:00