summaryrefslogtreecommitdiff
path: root/drivers/staging/bcm
AgeCommit message (Collapse)Author
2011-10-23Staging: bcm: Fix three initialization errors in InterfaceDld.cKevin McKinney
This patch fixes three initialization errors. One is an incorrect initialization of a static variable. The other two are incorrect initializations in an if statement. These errors were found by checkpatch.pl. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-23Staging: bcm: Fix coding style issues in InterfaceDld.cKevin McKinney
This patch fixes multiple coding style issues in file, InterfaceDld.c, found by checkpatch.pl. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11Staging: bcm: Fix coding style issues in InterfaceMisc.cKevin McKinney
This patch cleans up several code style issues found in InterfaceMisc.c reported by checkpatch.pl. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11Staging: bcm: Remove assignment from if conditions reported by checkpatch.plKevin McKinney
This patch removes an assignment from three if conditions. In all three cases, the line of code was attempting to allocate memory, and check if the memory was allocated in the if statement. This issue was reported by checkpatch.pl. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11Staging: bcm: Fix coding style issues reported by checkpatch.plKevin McKinney
This patch cleans up several code style issues found in InterfaceInit.c reported by checkpatch.pl. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11Staging: bcm: Fix assignment issue in if statement reported by checkpatch.pl.Kevin McKinney
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-11Staging: bcm: Remove assignment in if condition reported by checkpatch.plKevin McKinney
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-11Staging: bcm: Replace dated variable __FUNCTION__ reported by checkpatch.plKevin McKinney
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-11Staging: bcm: Fix coding style issues reported by checkpatch.plKevin McKinney
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-09-30Staging: bcm: Alter LOC for readability/understandability purposesKevin McKinney
This patch alters a line of code to make it more readable and easier to understand. The purpose of the original line of code was to compute the amount of memory to request from kmalloc. This mulit-step algorithm was being done in one line of code, thus making it more difficult to understand. Therefore, I split this algorithm into three logical steps. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-30Staging: bcm: Add min/max restrictions for IOCTL_BCM_REGISTER_READ_PRIVATEKevin McKinney
This patch fixes two issues within bcm/Bcmchar.c. The first condition in the or statement checks if variable IoBuffer.OutputLength, defined from user space, is greater than the maximum value allowed for an unsigned short. IoBuffer.OutputLength is then used in a kmalloc call to return a pointer to memory. If this size is greater than an unsigned short, it becomes useless. The second condition in the or statement checks if the same variable, IoBuffer.OutputLength is equal to zero before invoking the kmalloc call. In this case, if a zero size is sent to kmalloc, a valid pointer to memory is returned instead of the expected NULL. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-27drivers/staging/bcm/InterfaceDld.c: Fix checkpatch warningsMarcos Paulo de Souza
In the source file there are a lot of warnings. I will send it in parts to be more easy to review. All the changes in this file its just alignment, and things like that. Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-19Staging: bcm: Add size maximum size restrictions for IOCTL_IDLE_REQKevin McKinney
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-19Staging: bcm: Add size minimum size restrictions for IOCTL_IDLE_REQKevin McKinney
If IoBuffer.InputLength is zero then this will cause an Oops when we dereference the ZERO_SIZE_PTR. Or if it's smaller than sizeof(struct link_request) then we would get memory corruption when we set ->PLength in CopyBufferToControlPacket(). Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23Staging: bcm: Macros: Fixed multiple coding style violations.Ben Wright
Fixed multiple indentation issues. Signed-off-by: Benjamin James Wright <bwright.au@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23drivers/staging/bcm/nvm.c: add missing kfreeJulia Lawall
Buff is only used as a temporary buffer within the function, so it should be freed before leaving the function in an error case. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @exists@ local idexpression x; statement S,S1; expression E; identifier fl; expression *ptr != NULL; @@ x = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...kfree(x)...+> } when any when != true x == NULL x->fl ...> ( if (x == NULL) S1 | if (...) { ... when != x when forall ( return \(0\|<+...x...+>\|ptr\); | * return ...; ) } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23Staging: bcm: Fix memory leak reported during compile.Kevin McKinney
This patch fixes a potential memory leak were temp_buff buffer is not being freed when a certain condition is true. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23Staging: bcm: Fix a coding style error reported by checkpatch.plKevin McKinney
Tool checkpatch.pl reported the following error: extern struct class *bcm_class;" declaration not allowed in .c files. Therefore, I move this declaration into the header "headers.h" file. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23staging: bcm: fix coding style warnings and errors reported by checkpatch.pl ↵Kevin McKinney
tool Staging: bcm: Fix coding style errors reported by checkpatch.pl Fix multiple warnings and errors reported by checkpatch.pl Signed-off-by: Kevin McKinney<klmckinney1@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-26Merge branch 'staging-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (741 commits) staging:iio:meter:ade7753 should be 16 bit read not 8 bit for mode register. staging:iio:kfifo_buf fix double initialization of the ring device structure. staging:iio:accel:lis3l02dq: fix incorrect pointer passed to spi_set_drvdata. staging:iio:imu fix missing register table index for some channels spectra: enable device before poking it staging: rts_pstor: Fix a miswriting staging/lirc_bt829: Return -ENODEV when no hardware is found. staging/lirc_parallel: remove pointless prototypes. staging/lirc_parallel: fix panic on rmmod staging:iio:adc:ad7476: Incorrect pointer into spi_set_drvdata. Staging: zram: Fix kunmapping order Revert "gma500: Fix dependencies" gma500: Add medfield header gma500: wire up the mrst i2c bus from chip_info gma500: Fix DPU build gma500: Clean up the DPU config and make it runtime gma500: resync with Medfield progress gma500: Use the mrst helpers and power control for mode commit gma500@ Fix backlight range error gma500: More Moorestown muddle meddling means MM maybe might modeset ... Fix up fairly trivial conflicts all over, mostly due to header file cleanup conflicts, but some deleted files and some just context changes: - Documentation/feature-removal-schedule.txt - drivers/staging/bcm/headers.h - drivers/staging/brcm80211/brcmfmac/dhd_linux.c - drivers/staging/brcm80211/brcmfmac/dhd_sdio.c - drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h - drivers/staging/brcm80211/brcmfmac/wl_iw.c - drivers/staging/et131x/et131x_netdev.c - drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c - drivers/staging/rtl8192e/r8192E.h - drivers/staging/usbip/userspace/src/utils.h
2011-07-06drivers: staging: bcm: sort: kill handrolled bubblesortChris Forbes
Replaced the handrolled bubblesort with the kernel's sort() function. Makes things considerably smaller & clearer. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05Remove unneeded version.h include from drivers/staging/bcm/headers.hJesper Juhl
It was pointed out by 'make versioncheck' that a include of linux/version.h is not needed in drivers/staging/bcm/headers.h . This patch removes it. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28staging: Fix recieve/receive typosJoe Perches
Just spelling fixes. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28staging: remove unnecessary codeGreg Dietsche
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-20treewide: remove duplicate includesVitaliy Ivanov
Many stupid corrections of duplicated includes based on the output of scripts/checkincludes.pl. Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-14staging: bcm: Remove NULL check before kfreeIlia Mirkin
This patch was generated by the following semantic patch: // <smpl> @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // </smpl> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-09staging: bcm: optimize kmalloc to kzallocAlexander Beregalov
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-09Staging: bcm: Bcmnet: fixed checkpatch script reported issuesVinay Sawal
Fixed all issues reported by checkpatch script on this file. Signed-off-by: Vinay Sawal <vinaysawal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-01drivers:staging:bcm:CmHost.c Remove one to many n's in a word.Justin P. Mattock
The Patch below removes one to many "n's" in a word.. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> CC: Greg Kroah-Hartman <gregkh@suse.de> CC: Stephen Hemminger <shemminger@vyatta.com> CC: devel@driverdev.osuosl.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18Staging: bcm: Bcmchar: Fix some checkpatch errorsJavier Martinez Canillas
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18Staging: bcm: Bcmchar: Fix style issues on bcm_char_read()Javier Martinez Canillas
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18Staging: bcm: Bcmchar: Fix style issues on bcm_char_release()Javier Martinez Canillas
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18Staging: bcm: Bcmchar: Fix style issues on bcm_char_open()Javier Martinez Canillas
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04Staging: bcm: Check correct user provided length and fix error code returnedJavier Martinez Canillas
bcm driver copies a buffer length provided by userpace without checking it. RxCntrlMsgBitMask is of type unsigned long so only makes sense to copy sizeof(unsigned long) bytes. Also, copy_from_user() returns the number of bytes that could not be copied. The driver is returning that value as error code instead of -EFAULT. This patch solves both issues. Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com> Cc: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-18staging: fix build failure in bcm driverAndres Salomon
While building latest Linus git, I hit the following: CC [M] drivers/staging/bcm/Qos.o drivers/staging/bcm/Qos.c: In function ‘PruneQueue’: drivers/staging/bcm/Qos.c:367: error: ‘struct netdev_queue’ has no member named ‘tx_dropped’ drivers/staging/bcm/Qos.c: In function ‘flush_all_queues’: drivers/staging/bcm/Qos.c:416: error: ‘struct netdev_queue’ has no member named ‘tx_dropped’ make[5]: *** [drivers/staging/bcm/Qos.o] Error 1 make[4]: *** [drivers/staging/bcm] Error 2 make[3]: *** [drivers/staging] Error 2 As well as: CC [M] drivers/staging/bcm/Transmit.o drivers/staging/bcm/Transmit.c: In function ‘SetupNextSend’: drivers/staging/bcm/Transmit.c:163: error: ‘struct netdev_queue’ has no member named ‘tx_bytes’ drivers/staging/bcm/Transmit.c:164: error: ‘struct netdev_queue’ has no member named ‘tx_packets’ make[2]: *** [drivers/staging/bcm/Transmit.o] Error 1 tx_dropped/tx_bytes_tx_packets were removed in commit 1ac9ad13. This patch converts bcm to use net_device_stats instead of netdev_queue. Acked-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-01-11Merge branch 'staging-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (510 commits) staging: speakup: fix failure handling staging: usbip: remove double giveback of URB Staging: batman-adv: Remove batman-adv from staging Staging: hv: Use only one txf buffer per channel and kmalloc/GFP_KERNEL on initialize staging: hv: remove unneeded osd_schedule_callback staging: hv: convert channel_mgmt.c to not call osd_schedule_callback staging: hv: convert vmbus_on_msg_dpc to not call osd_schedule_callback staging: brcm80211: Fix WL_<type> logging macros Staging: IIO: DDS: AD9833 / AD9834 driver Staging: IIO: dds.h convenience macros Staging: IIO: Direct digital synthesis abi documentation staging: brcm80211: Convert ETHER_TYPE_802_1X to ETH_P_PAE staging: brcm80211: Remove unused ETHER_TYPE_<foo> #defines staging: brcm80211: Remove ETHER_HDR_LEN, use ETH_HLEN staging: brcm80211: Convert ETHER_ADDR_LEN to ETH_ALEN staging: brcm80211: Convert ETHER_IS<FOO> to is_<foo>_ether_addr staging: brcm80211: Remove unused ether_<foo> #defines and struct staging: brcm80211: Convert ETHER_IS_MULTI to is_multicast_ether_addr staging: brcm80211: Remove unused #defines ETHER_<foo>_LOCALADDR Staging: comedi: Fix checkpatch.pl issues in file s526.c ... Fix up trivial conflict in drivers/video/udlfb.c
2010-12-16Merge branch 'usb-next' into musb-mergeGreg Kroah-Hartman
* usb-next: (132 commits) USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path USB: uas: Ensure we only bind to a UAS interface USB: uas: Rename sense pipe and sense urb to status pipe and status urb USB: uas: Use kzalloc instead of kmalloc USB: uas: Fix up the Sense IU usb: musb: core: kill unneeded #include's DA8xx: assign name to MUSB IRQ resource usb: gadget: g_ncm added usb: gadget: f_ncm.c added usb: gadget: u_ether: prepare for NCM usb: pch_udc: Fix setup transfers with data out usb: pch_udc: Fix compile error, warnings and checkpatch warnings usb: add ab8500 usb transceiver driver USB: gadget: Implement runtime PM for MSM bus glue driver USB: gadget: Implement runtime PM for ci13xxx gadget USB: gadget: Add USB controller driver for MSM SoC USB: gadget: Introduce ci13xxx_udc_driver struct USB: gadget: Initialize ci13xxx gadget device's coherent DMA mask USB: gadget: Fix "scheduling while atomic" bugs in ci13xxx_udc USB: gadget: Separate out PCI bus code from ci13xxx_udc ...
2010-12-07Staging: Beceem: more checkpatch.pl changes to InterfaceInit.cDan Carpenter
The only checkpatch.pl issues remaining still remaining are line length complaints. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-07Staging: Beceem: improve debug printk statementsDan Carpenter
These are just small changes. Some grammar and wording changes. I added new lines to the end of all the print statements. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-07Staging: Beceem: use after free in bcm_exit()Dan Carpenter
We can't call class_destroy() until after the driver has been deregistered. It leads to a NULL deref on module unload. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-07Staging: Beceem: remove old kernel compatibility codeDan Carpenter
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-07Staging: Beceem: white space changes to InterfaceInit.cDan Carpenter
This patch only changes: 1) spaces, tabs, and newline characters. 2) comment styles. The compiled object file is the same before and after except for line number changes. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-07Staging: Beceem: use lower case "int" instead of "INT"Dan Carpenter
This patch changes: INT => int ULONG => unsigned long VOID => void Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-07Staging: Beceem: add USB id for BCSM250 Mobile WiMAXDan Carpenter
Signed-off-by: Dan Carpenter <error27@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-17USB: fix leftover references to udev->autosuspend_delayAlan Stern
This patch (as1436) takes care of leftover references to udev->autosuspend_delay that didn't get removed during the earlier conversion to the runtime-PM autosuspend API. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16Staging: bcm: signedness bug in InitCardAndDownloadFirmware()Dan Carpenter
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-16Staging: bcm: signedness bug in StoreSFParam()Dan Carpenter
wrm() returns negative error codes so "ret" needs to be signed here. There was place where wrm() returned positive EACCES instead of negative -EACCES so I fixed that as well. Also a few checkpatch.pl issues. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16drivers/staging: Remove unnecessary semicolonsJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16Staging: Merge 2.6.37-rc2 into staging-nextGreg Kroah-Hartman
This was necessary in order to resolve some conflicts that happened between -rc1 and -rc2 with the following files: drivers/staging/bcm/Bcmchar.c drivers/staging/intel_sst/intel_sst_app_interface.c All should be resolved now. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>