dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

54 Commits

Author SHA1 Message Date
Kevin McKinney 8c7d51a3e8 Staging: bcm: Remove typedef for _S_MIBS_EXTSERVICEFLOW_PARAMETERS and call directly.
This patch removes typedef for _S_MIBS_EXTSERVICEFLOW_PARAMETERS,
and changes the name of the struct to bcm_mibs_parameters. In
addition, any calls to typedef S_MIBS_EXTSERVICEFLOW_PARAMETERS
are changed to call the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26 16:07:57 -08:00
Kevin McKinney d6861cfef2 Staging: bcm: Remove typedef for _S_INTERFACE_ADAPTER and call directly.
This patch removes typedef for
_S_INTERFACE_ADAPTER, changes the
name of the struct to bcm_interface_adapter.
In addition, any calls to typedefs
S_INTERFACE_ADAPTER, or *PS_INTERFACE_ADAPTER
are changed to call the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-02 11:36:46 -07:00
Kevin McKinney 7fac0c47ed Staging: bcm: Remove typedef for stLocalSFAddIndicationAlt and call directly.
This patch removes typedef for
stLocalSFAddIndicationAlt, changes the
name of the struct to bcm_add_indication_alt,
and removes a comment. In addition, any
calls to typedef stLocalSFAddIndicationAlt
are changed to call the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-30 19:44:48 -07:00
Kevin McKinney b64c846285 Staging: bcm: Reverse condition in if statement in Misc.c
This patch reverses the condition in two if
statements in CopyBufferToControlPacket to
place Adapter->bShutStatus and
Adapter->idleMode to the left of the equal
"==" sign, and TRUE to the right of
the equal "==" sign. This was done for
readability purposes.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:43:26 -07:00
Kevin McKinney 895b1fb81c Staging: bcm: Clean up function CopyBufferToControlPacket in Misc.c
This patch cleans up the code in function
CopyBufferToControlPacket. Several things are
being done here: (1) remove the null
initialization from variable cntrl_buff, (2)
reverse the if statement to check if cntrl_buff
is null; if so, then write debug statement and
return -ENOMEM error code, and (3) indent the
code properly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:43:26 -07:00
Kevin McKinney 7af1413446 Staging: bcm: Rename INT to "int" in Misc.c
This patch renames uppercase INT to
"int" in Misc.c, and removes one
white space issue.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:43:26 -07:00
Kevin McKinney 9ef0760fce Staging: bcm: Rename UINT to "unsigned int" in Misc.c
This patch renames uppercase UINT to
"unsigned int" in Misc.c.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:43:25 -07:00
Kevin McKinney 7052208bf5 Staging: bcm: Rename B_UINT32 to "unsigned int" in Misc.c
This patch renames uppercase B_UINT32 to
"unsigned int" in Misc.c.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:43:25 -07:00
Kevin McKinney 4216faf7cb Staging: bcm: Rename B_UINT8 to "unsigned char" in Misc.c
This patch renames uppercase B_UINT8 to
"unsigned char" in Misc.c.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:43:25 -07:00
Kevin McKinney b23f7f6f57 Staging: bcm: Rename PUINT to "unsigned int *" in Misc.c
This patch renames uppercase PUINT to
"unsigned int *" in Misc.c.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:43:25 -07:00
Kevin McKinney 7a15b79bdb Staging: bcm: Rename VOID to void in Misc.c
This patch renames uppercase VOID to
void in Misc.c.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:43:25 -07:00
Kevin McKinney fe671fefeb Staging: bcm: Rename PVOID to "void *" in Misc.c
This patch renames uppercase PVOID to
"void *" in Misc.c.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-19 13:43:24 -07:00
Andy Shevchenko bcb6ef660f staging: bcm: print small buffers with %*ph
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:23:19 -07:00
Linus Torvalds a0e881b7c1 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull second vfs pile from Al Viro:
 "The stuff in there: fsfreeze deadlock fixes by Jan (essentially, the
  deadlock reproduced by xfstests 068), symlink and hardlink restriction
  patches, plus assorted cleanups and fixes.

  Note that another fsfreeze deadlock (emergency thaw one) is *not*
  dealt with - the series by Fernando conflicts a lot with Jan's, breaks
  userland ABI (FIFREEZE semantics gets changed) and trades the deadlock
  for massive vfsmount leak; this is going to be handled next cycle.
  There probably will be another pull request, but that stuff won't be
  in it."

Fix up trivial conflicts due to unrelated changes next to each other in
drivers/{staging/gdm72xx/usb_boot.c, usb/gadget/storage_common.c}

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (54 commits)
  delousing target_core_file a bit
  Documentation: Correct s_umount state for freeze_fs/unfreeze_fs
  fs: Remove old freezing mechanism
  ext2: Implement freezing
  btrfs: Convert to new freezing mechanism
  nilfs2: Convert to new freezing mechanism
  ntfs: Convert to new freezing mechanism
  fuse: Convert to new freezing mechanism
  gfs2: Convert to new freezing mechanism
  ocfs2: Convert to new freezing mechanism
  xfs: Convert to new freezing code
  ext4: Convert to new freezing mechanism
  fs: Protect write paths by sb_start_write - sb_end_write
  fs: Skip atime update on frozen filesystem
  fs: Add freezing handling to mnt_want_write() / mnt_drop_write()
  fs: Improve filesystem freezing handling
  switch the protection of percpu_counter list to spinlock
  nfsd: Push mnt_want_write() outside of i_mutex
  btrfs: Push mnt_want_write() outside of i_mutex
  fat: Push mnt_want_write() outside of i_mutex
  ...
2012-08-01 10:26:23 -07:00
Al Viro 32aecdd365 slightly reduce idiocy in drivers/staging/bcm/Misc.c
a) vfs_llseek() does *not* access userland pointers of any kind
b) neither does filp_close(), for that matter
c) ... nor filp_open()
d) vfs_read() does, but we do have a wrapper for that (kernel_read()),
so there's no need to reinvent it.
e) passing current->files to filp_close() on something that never
had been in descriptor table is pointless.

ISAGN: voodoo dolls to be used on voodoo programmers...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-07-29 21:24:20 +04:00
Marcos Paulo de Souza 3a53ecbd5f staging: bcm: Misc.c: Remove unused macros
These macros were reported by forgotten-macros tool
(https://github.com/marcosps/forgotten_macros).

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-11 17:04:42 -07:00
Marcos Paulo de Souza 9f433eac0b staging: bcm: Remove code that will never execute
This patch removes all references of "if 0" blocks in the bcm drivers.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-11 17:04:42 -07:00
Kevin McKinney 2979460d7a Staging: bcm: Remove typedef for _MINI_ADAPTER and call directly.
This patch removes typedef for _MINI_ADAPTER, changes the
name of the struct from _MINI_ADAPTER to bcm_mini_adapter.
In addition, any calls to the following typedefs
"MINI_ADAPTER, *PMINI_ADAPTER" are changed to call
the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-04 21:09:22 -07:00
Kevin McKinney ff352042eb Staging: bcm: Remove typedef for _LEADER and call directly.
This patch removes typedef for _LEADER, changes the
name of the struct from _LEADER to bcm_leader.
In addition, any calls to the following typedefs
"LEADER, *PLEADER" are changed to call
the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-04 21:09:22 -07:00
Kevin McKinney 2610c7a889 Staging: bcm: Remove typedef for link_request and call directly.
This patch removes typedef for link_request, changes the
name of the struct from link_request to bcm_link_request.
In addition, any calls to the following typedefs
"LINK_REQUEST, *PLINK_REQUEST, *CONTROL_MESSAGE"
are changed to call the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-04 21:09:21 -07:00
Kevin McKinney 92562aeec4 Staging: bcm: Remove typedef for _S_CLASSIFIER_RULE and call directly.
This patch removes typedef for _S_CLASSIFIER_RULE,
changes the name of the struct from
_S_CLASSIFIER_RULE to bcm_classifier_rule.
In addition, any calls to the following typedefs
"S_CLASSIFIER_RULE" are changed to call the
struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-04 21:08:10 -07:00
Kevin McKinney 7f22485def Staging: bcm: Remove typedef for _S_FRAGMENTED_PACKET_INFO and call directly.
This patch removes typedef for _S_FRAGMENTED_PACKET_INFO,
changes the name of the struct from
_S_FRAGMENTED_PACKET_INFO to bcm_fragmented_packet_info.
In addition, any calls to the following typedefs
"S_FRAGMENTED_PACKET_INFO, *PS_FRAGMENTED_PACKET_INFO"
are changed to call the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-04 21:08:10 -07:00
Masanari Iida 73e2918990 staging: Fix typo in multiple files
Collect spelling typo in multiple files within staging directory.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:31:01 -07:00
Kevin McKinney 41c7b7c0fa Staging: bcm: Fix information leak in ioctl: IOCTL_BCM_REGISTER_READ_PRIVATE, IOCTL_BCM_EEPROM_REGISTER_READ
This patch fixes an information leak in ioctl
IOCTL_BCM_REGISTER_READ_PRIVATE and
IOCTL_BCM_EEPROM_REGISTER_READ when determining
the number of bytes to copy to user space.  Function,
usb_control_msg, returns the correct number of
bytes from the hardware.  Instead of using
this value, we were using a value derived from
user space. In this case, this value could be more
than the hardware allocated.  Therefore, this
patch copies the proper number of bytes from
the hardware, and uses this value as the maximum
number of bytes for user space.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:11:58 -08:00
Kevin McKinney d491061b98 Staging: bcm: Fix assignment issue in if statement reported by checkpatch.pl.
This patch fixes an error where an assignment "="
was being used in an if statement to determine if
Firmware was downloaded. This patch removes that
assignment, and places it above the if statement.
The if statement then evaluates the status to
verify if "0" successful, or != 0 failure.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:21 -06:00
Kevin McKinney 9d4f1d0c9d Staging: bcm: Remove assignment in if condition reported by checkpatch.pl
There is a case where an assignment was being done
in an if condition. This patch removes the assignment
from the if condition and places the assignment above
the if statement; thereby improving the readability of
the code.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:21 -06:00
Kevin McKinney a8a1cdd6d4 Staging: bcm: Replace dated variable __FUNCTION__ reported by checkpatch.pl
This patch replaces the obsolete variable, __FUNCTION__, that
holds the name of the current function with variable, __func__.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:21 -06:00
Kevin McKinney 6a4ef5f9b3 Staging: bcm: Fix coding style issues reported by checkpatch.pl
This patch cleans up several hundred code style issues found
in Misc.c reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:20 -06:00
Kevin McKinney e228b7426e Staging: bcm: Add size maximum size restrictions for IOCTL_IDLE_REQ
In the first alteration, the MAX_CNTL_PKT_SIZE is the
maximum size of the control packet in ->Adapter->txctlpacket[]
which is defined in InitAdapter(). This caps the size of
kmalloc memory allocation. In the second change, this max
cap fixes a potential memory corruption bug when subsequent
memset and memcpy calls are invoked.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-19 10:46:17 -07:00
Greg Dietsche c5274ab097 staging: remove unnecessary code
Compile tested.
remove unnecessary code that matches this coccinelle pattern
	if (...)
		return ret;
	return ret;

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Acked-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28 13:13:42 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Alexander Beregalov f4a0e6b135 staging: bcm: optimize kmalloc to kzalloc
Use kzalloc rather than kmalloc followed by memset with 0.
Found by coccinelle.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-09 15:54:31 -08:00
Dan Carpenter cd0b0ebfbe Staging: Beceem: remove old kernel compatibility code
This drops compatability for everything from 2.4 to 2.6.35.  Now it only
works on the latest kernel.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-06 16:09:45 -08:00
Dan Carpenter 2e31613901 Staging: bcm: signedness bug in InitCardAndDownloadFirmware()
status is used to store negative error codes throughout.  The only place
where this is a runtime bug is if create_worker_threads() fails.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:31:50 -08:00
Joe Perches 859171ca92 drivers/staging: Remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:06:47 -08:00
Jesper Juhl 3701befc44 Staging, bcm: Remove unnecessary casts of void ptr returning alloc function return values
Here's a patch against a copy of linux-next that I just cloned.

Don't pointlessly cast pointers returned by allocation functions that
return void pointers which are implicitly converted.
For drivers/staging/bcm/

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-10 16:28:31 -08:00
Stephen Hemminger 4ea4f7a0d3 beceem: change startup messages
Change the regsister/unregister routines to generate better
messages, and control arrival of new frames when USB device is
unplugged.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 14:06:24 -04:00
Stephen Hemminger cacd92222d beceem: statistics and transmit queue changes
Use standard network statistics variables and routines.
Transmit counters are per queue, and skb mapping is already in
skb and does not need to be recomputed. Move SearchVcId to only
place it is used.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 13:53:30 -04:00
Stephen Hemminger 9dd47ee7dd beceem: make local functions static
Use namespace tool from kernel scripts to identify dead code and
functions that should be static.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 12:37:05 -04:00
Stephen Hemminger 9ec4475bf1 beceem: debug message format changes
Add more debug messages and make them similar to other drivers

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 12:18:36 -04:00
Stephen Hemminger 2d08748ae5 beceem: module initialization
Get rid of boot messages and put in correct place.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 12:14:01 -04:00
Stephen Hemminger 4fd64dd0c1 beceem: add network device message level control
Provide standard interface to control verbosity of debug messages

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 12:12:31 -04:00
Stephen Hemminger e39e3be66e beceem: change format of debug message
Statistic point is now u32 (like it has to be).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 12:06:44 -04:00
Stephen Hemminger 3644c1a2f1 beceem: remove dead code
Remove commented out with '#if 0'

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 09:54:43 -04:00
Stephen Hemminger 20f48653fc beceem: get rid of unnecessary inline usage
Many routines were tagged with inline_ but GCC does a better
job of deciding this.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 09:54:35 -04:00
Stephen Hemminger 26a0e39ac8 beceem: fold unregister_netdevice into AdapterFree
The function unregister_netdevice only called unregister_netdev.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 09:54:31 -04:00
Stephen Hemminger e614e28eac beceem: remove indirection to Adapter structure
Allocate Adapter structure as part of network device.

Signed-off-by: Stephen Hemminber <shemminger@vyatta.com>
2010-11-01 09:52:14 -04:00
Stephen Hemminger de85f98589 beceem: name threads with device name
This is the convention used by Intel Wimax

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 09:42:56 -04:00
Stephen Hemminger 082e889b47 beceem: remove OS wrapper library
Use native kernel functions for kmalloc/kfree directly

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-11-01 09:35:21 -04:00
Stephen Hemminger 92bc60580e beceem: get rid of OS dependent data structure
The only part of this structure still used was the network
device stats, and in recent kernel these are available in
network device itself.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
2010-10-29 20:45:01 -07:00