aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/emxx_udc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-12-21staging: emxx_udc: use list_first_entry_or_null()Geliang Tang1-25/+5
Simplify the code with list_first_entry_or_null(). Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21staging/emxx_udc: fix 64-bit warningsArnd Bergmann1-5/+5
ARCH_SHMOBILE is coming to arm64, which creates new warnings in allmodconfig: drivers/staging/emxx_udc/emxx_udc.c: In function '_nbu2ss_out_dma': drivers/staging/emxx_udc/emxx_udc.c:843:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] _nbu2ss_writel(&preg->EP_DCR[num].EP_TADR, (u32)pBuffer); This is clearly a mistake from confusing a dma_addr_t with a pointer, so the fix is to use the correct types in two places. The third warning of this kind is a check for an unaligned pointer, which should be done by casting the pointer to uintptr_t, not int. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24Staging: emxx_udc: Add space around operator.Navya Sri Nizamkari1-1/+1
Add a space around '>>' operator. Problem found using checkpatch. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Reviewed-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: emxx_udc: Remove boolean comparisonsLuis de Bethencourt1-5/+5
Boolean tests do not need explicit comparison to true or false. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12drivers/staging: make emxx_udc.c explicitly non-modularPaul Gortmaker1-33/+4
The Kconfig currently controlling compilation of this code is: drivers/staging/emxx_udc/Kconfig:config USB_EMXX drivers/staging/emxx_udc/Kconfig: bool "EMXX USB Function Device Controller" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. The .remove function was declared __exit, so it wouldn't have been available for a sysfs bind/unbind anyway, so lets be explicit here and use ".suppress_bind_attrs = true" to prevent root from doing something silly. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Vincenzo Scotti <vinc94@gmail.com> Cc: Haneen Mohammed <hamohammed.sa@gmail.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Roberta Dobrescu <roberta.dobrescu@gmail.com> Cc: Tapasweni Pathak <tapaswenipathak@gmail.com> Cc: Peter Chen <peter.chen@freescale.com> Cc: Robert Baldyga <r.baldyga@samsung.com> Cc: Chris Rorvick <chris@rorvick.com> Cc: "Gujulan Elango, Hari Prasath (H.)" <hgujulan@visteon.com> Cc: devel@driverdev.osuosl.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30staging:emxx_udc: Fixed comparison style warningsCristina Moraru1-19/+19
Fixed 'Comparisons should place the constant on the right side of the test' Warnings Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: emxx_udc: Remove unused parameter from function parameter list parameter listRavi Teja Darbha1-7/+5
struct nbu2ss_ep *ep parameter in functions _nbu2ss_ep0_in_transfer() and _nbu2ss_ep0_out_transfer() is not used anywhere inside. Hence, removed. Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: emxx_udc: Remove cleanup1 labelRavi Teja Darbha1-6/+3
The cleanup1 label does nothing but return. Better way is to return immediately instead of using goto. Hence, removed. Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: emxx_udc: Fix NULL comparison styleRavi Teja Darbha1-31/+31
Fixed NULL comparison style as suggested by checkpatch.pl Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: emxx_udc: Avoid using multiple blank linesRavi Teja Darbha2-35/+0
Fixed multiple blank lines warning by checkpatch.pl Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: emxx_udc: Remove FSF mailing addressRavi Teja Darbha2-8/+0
FSF mailing address is no longer required to be specified. Hence removed. Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-04staging: emxx_udc: add ep capabilities supportRobert Baldyga1-31/+42
Convert endpoint configuration to new capabilities model. Fixed typo in "epc-nulk" to "epc-bulk". Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-07-31staging: emxx_udc: add missing usb_ep_set_maxpacket_limit()Robert Baldyga1-1/+2
Since maxpacket_limit was introduced all UDC drivers should use usb_ep_set_maxpacket_limit() function instead of setting maxpacket value manually. ep.maxpacket_limit contains actual maximum maxpacket value supported by hardware which is needed by epautoconf. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-06-15staging: emxx_udc: remove commented codeHari Prasath Gujulan Elango1-10/+0
This patch removes commented code warned by checkpatch.pl Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08staging: emxx_udc: remove commented codeMadhusudhanan Ravindran1-26/+0
removed the commented INFO lines. Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08Staging: fixed multiple spelling errors.Carlos E. Garcia1-1/+1
Fixed multiple spelling errors. Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-30staging: emxx_udc: Remove dead codeGujulan Elango, Hari Prasath (H.)1-33/+0
This patch removes few lines of commented code. Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-30staging: emxx_udc : remove stray semicolonGujulan Elango, Hari Prasath (H.)1-1/+1
This patch removes a stray semicolon around closing brace of an if code block. Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-30staging: emxx_udc: test returned valueJulia Lawall1-1/+1
Put NULL test on the result of the previous call instead on one of its arguments. A simplified version of the semantic match that finds this problem is as follows (http://coccinelle.lip6.fr/): // <smpl> r@ expression *e1; expression *e2; identifier f; statement S1,S2; @@ e1 = f(...,e2,...); ( if (e1 == NULL || ...) S1 else S2 | *if (e2 == NULL || ...) S1 else S2 ) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: emuxx_udc: replace pr_* with dev_*Haneen Mohammed1-7/+7
dev_* is prefered over pr_* when appropriate dev structure is present. This patch replace pr_info and pr_warn with its dev_ counterpart. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: emxx_udc: Iterate list using list_for_each_entrySomya Anand1-2/+1
Code using doubly linked list is iterated generally using list_empty and list_entry functions, but it can be better written using list_for_each_entry macro. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry and list_for_each_entry_safe. list_for_each_entry is a macro which is used to iterate over a list of given type. So while loop used to iterate over a list can be replaced with list_for_each_entry macro. However, if list_del is used in the loop, then list_for_each_entry_safe is a better choice. This transformation is done by using the following coccinelle script. @ rule1 @ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry; @@ - while (list_empty(&E1) == 0) + list_for_each_entry (I1, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ...when != list_del(...); when != list_del_init(...); } @ rule2 @ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06Staging: emxx_udc: Remove custom printk macro ERRHaneen Mohammed1-1/+0
This patch removes custom printk macro ERR. All the calls to this macro were replaced by de_err and pr_err. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06Staging: emxx_udc: Replace custom printk macro ERR with dev_err or pr_errHaneen Mohammed1-39/+41
This patch removes the use of custom printk macros ERR and replace it with dev_err, or pr_err in the following cases: - if no appropriate struct device *dev field where found for dev_err. - or dev could be null eg. "dev_err(udc->dev" not possible inside "if (udc == null)" Issue addressed by checkpatch.pl. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06Staging: emxx_udc: Remove argument test from functionHaneen Mohammed1-5/+0
This patch removes the test statement for an argument to _nbu2ss_pullup function, for it can't be null due to previous derefrences. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06Staging: emxx_udc: Fix do not add new typedefs and remove volatileHaneen Mohammed2-44/+43
This patch fixes the following checkpatch.pl warnings:"do not add new typedefs" and "Use of volatile is usually wrong". Remove typedefs keyword and rename identifiers appropriately. Remove volatile from union usb_regs_access Update related files. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26staging: emxx_udc: rewrite the right hand side of an assignmentAya Mahfouz1-2/+2
This patch rewrites the right hand side of an assignment for expressions of the form: a = (a <op> b); to be: a <op>= b; where <op> = << | >>. This issue was detected and resolved using the following coccinelle script: @@ identifier i; expression e; @@ -i = (i >> e); +i >>= e; @@ identifier i; expression e; @@ -i = (i << e); +i <<= e; Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-24Staging: emxx_udc: Convert from __attribute__((aligned(size))) to __aligned(size)Vatika Harlalka1-1/+1
This patch addresses the checkpatch.pl warning WARNING: __aligned(size) is preferred over __attribute__((aligned(size))) aligned(x) is a macro : #define __aligned(x) __attribute__((aligned(x))) Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-24staging: emxx_udc: Replace GFP_KERNEL with GFP_ATOMICTapasweni Pathak1-1/+1
To avoid deadlock, do not call blocking functions with spinlocks held. Replace GFP_KERNEL with GFP_ATOMIC, as the latter will fail if the pile doesn't have enough free pages but will not sleep and hence deadlock can be avoided. Found by Coccinelle. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-19Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuildLinus Torvalds1-1/+1
Pull kconfig updates from Michal Marek: "Yann E Morin was supposed to take over kconfig maintainership, but this hasn't happened. So I'm sending a few kconfig patches that I collected: - Fix for missing va_end in kconfig - merge_config.sh displays used if given too few arguments - s/boolean/bool/ in Kconfig files for consistency, with the plan to only support bool in the future" * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kconfig: use va_end to match corresponding va_start merge_config.sh: Display usage if given too few arguments kconfig: use bool instead of boolean for type definition attributes
2015-02-15Merge tag 'staging-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds1-38/+14
Pull staging drivers patches from Greg KH: "Here's the big staging driver tree update for 3.20-rc1. Lots of little things in here, adding up to lots of overall cleanups. The IIO driver updates are also in here as they cross the staging tree boundry a lot. I2O has moved into staging as well, as a plan to drop it from the tree eventually as that's a dead subsystem. All of this has been in linux-next with no reported issues for a while" * tag 'staging-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (740 commits) staging: lustre: lustre: libcfs: define symbols as static staging: rtl8712: Do coding style cleanup staging: lustre: make obd_updatemax_lock static staging: rtl8188eu: core: switch with redundant cases staging: rtl8188eu: odm: conditional setting with no effect staging: rtl8188eu: odm: condition with no effect staging: ft1000: fix braces warning staging: sm7xxfb: fix remaining CamelCase staging: sm7xxfb: fix CamelCase staging: rtl8723au: multiple condition with no effect - if identical to else staging: sm7xxfb: make smtc_scr_info static staging/lustre/mdc: Initialize req in mdc_enqueue for !it case staging/lustre/clio: Do not allow group locks with gid 0 staging/lustre/llite: don't add to page cache upon failure staging/lustre/llite: Add exception entry check after radix_tree staging/lustre/libcfs: protect kkuc_groups from write access staging/lustre/fld: refer to MDT0 for fld lookup in some cases staging/lustre/llite: Solve a race to access lli_has_smd in read case staging/lustre/ptlrpc: hold rq_lock when modify rq_flags staging/lustre/lnet: portal spreading rotor should be unsigned ...
2015-02-07staging: emxx_udc: Remove nbu2ss_drv_set_dp_info()Chris Rorvick1-38/+14
This function is an awkward helper for nbu2ss_drv_ep_init(). Most of its logic is devoted to determining if the current endpoint is ep0, something the caller can easily do in a single line. And there is not a lot going on beyond that. Move this logic up into nbu2ss_drv_ep_init(). The result is much easier to understand and the resulting function is still viewable within a single screen. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-04staging: emxx_udc: fix the build errorPeter Chen1-0/+3
Fix below build error: reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 9239d88fc5e58a2a72bc949362f999aac9bffb29 # save the attached .config to linux build tree make.cross ARCH=arm All error/warnings: In file included from include/linux/seqlock.h:35:0, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/staging/emxx_udc/emxx_udc.c:22: drivers/staging/emxx_udc/emxx_udc.c: In function 'nbu2ss_gad_set_selfpowered': >> drivers/staging/emxx_udc/emxx_udc.c:3129:21: error: 'udc' undeclared (first use in this function) spin_lock_irqsave(&udc->lock, flags); ^ include/linux/spinlock.h:215:34: note: in definition of macro 'raw_spin_lock_irqsave' flags = _raw_spin_lock_irqsave(lock); \ ^ >> drivers/staging/emxx_udc/emxx_udc.c:3129:2: note: in expansion of macro 'spin_lock_irqsave' spin_lock_irqsave(&udc->lock, flags); ^ drivers/staging/emxx_udc/emxx_udc.c:3129:21: note: each undeclared identifier is reported only once for each function it appears in spin_lock_irqsave(&udc->lock, flags); ^ include/linux/spinlock.h:215:34: note: in definition of macro 'raw_spin_lock_irqsave' flags = _raw_spin_lock_irqsave(lock); \ ^ >> drivers/staging/emxx_udc/emxx_udc.c:3129:2: note: in expansion of macro 'spin_lock_irqsave' spin_lock_irqsave(&udc->lock, flags); ^ vim +/udc +3129 drivers/staging/emxx_udc/emxx_udc.c 33aa8d45 Magnus Damm 2014-06-06 3123 33aa8d45 Magnus Damm 2014-06-06 3124 if (pgadget == NULL) { 33aa8d45 Magnus Damm 2014-06-06 3125 ERR("%s, bad param\n", __func__); 33aa8d45 Magnus Damm 2014-06-06 3126 return -EINVAL; 33aa8d45 Magnus Damm 2014-06-06 3127 } 33aa8d45 Magnus Damm 2014-06-06 3128 33aa8d45 Magnus Damm 2014-06-06 @3129 spin_lock_irqsave(&udc->lock, flags); 9239d88f Peter Chen 2015-01-28 3130 pgadget->is_selfpowered = (is_selfpowered != 0); 33aa8d45 Magnus Damm 2014-06-06 3131 spin_unlock_irqrestore(&udc->lock, flags); 33aa8d45 Magnus Damm 2014-06-06 3132 Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29staging: emxx_udc: use common is_selfpoweredPeter Chen2-7/+3
Delete private selfpowered variable, and use common one. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-07kconfig: use bool instead of boolean for type definition attributesChristoph Jaeger1-1/+1
Support for keyword 'boolean' will be dropped later on. No functional change. Reference: http://lkml.kernel.org/r/cover.1418003065.git.cj@linux.com Signed-off-by: Christoph Jaeger <cj@linux.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-12-15Merge tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds1-4/+3
Pull staging driver updates from Greg KH: "Here's the big staging tree pull request for 3.19-rc1. We continued to delete more lines than were added, always a good thing, but not at a huge rate this release, only about 70k lines removed overall mostly from removing the horrid bcm driver. Lots of normal staging driver cleanups and fixes all over the place, well over a thousand of them, the shortlog shows all the horrid details. The "contentious" thing here is the movement of the Android binder code out of staging into the "real" part of the kernel. This is code that has been stable for a few years now and is working as-is in the tens of millions of devices with no issues. Yes, the code is horrid, and the userspace api leaves a lot to be desired, but it's not going to change due to legacy issues that we have no control over. Because so many devices and companies rely on this, and the code is stable, might as well promote it out of staging. This was all discussed at the Linux Plumbers conference, and everyone participating agreed that this was the best way forward. There is work happening to replace the binder code with something new that is happening right now, but I don't expect to see the results of that work for another year at the earliest. If that ever happens, and Android switches over to it, I'll gladly remove this version. As for maintainers, I'll be glad to maintain this code, I've been doing it for the past few years with no problems. I'll send a MAINTAINERS entry for it before 3.19-final is out, still need to talk to the Google developers about if they are willing to help with it or not, last I checked they were, which was good. All of these patches have been in linux-next for a while with no reported issues" * tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1382 commits) Staging: slicoss: Fix long line issues in slicoss.c staging: rtl8712: remove unnecessary else after return staging: comedi: change some printk calls to pr_err staging: rtl8723au: hal: Removed the extra semicolon lustre: Deletion of unnecessary checks before three function calls staging: lustre: fix sparse warnings: static function declaration staging: lustre: fixed sparse warnings related to static declarations staging: unisys: remove duplicate header staging: unisys: remove unneeded structure staging: ft1000 : replace __attribute ((__packed__) with __packed drivers: staging: rtl8192e: Include "asm/unaligned.h" instead of "access_ok.h" in "rtl819x_BAProc.c" Drivers:staging:rtl8192e: Fixed checkpatch warning Drivers:staging:clocking-wizard: Added a newline staging: clocking-wizard: check for a valid clk_name pointer staging: rtl8723au: Hal_InitPGData() avoid unnecessary typecasts staging: rtl8723au: _DisableAnalog(): Avoid zero-init variables unnecessarily staging: rtl8723au: Remove unnecessary wrapper _ResetDigitalProcedure1() staging: rtl8723au: _ResetDigitalProcedure1_92C() reduce code obfuscation staging: rtl8723au: Remove unnecessary wrapper _DisableRFAFEAndResetBB() staging: rtl8723au: _DisableRFAFEAndResetBB8192C(): Reduce code obfuscation ...
2014-10-30staging: emxx_udc: use USB API functions rather than constantsTapasweni Pathak1-2/+2
This patch introduces the use of the functions usb_endpoint_type and usb_endpoint_num. The Coccinelle semantic patch that makes these changes is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bEndpointAddress & \(USB_ENDPOINT_NUMBER_MASK\|0x0f\)) + usb_endpoint_num(epd) @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Build Tested it. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23staging: emxx_udc: Remove null check before kfreeTapasweni Pathak1-2/+1
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: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: emxx_udc: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-02staging: emxx_udc: Use min_t instead of minEbru Akagunduz1-3/+3
Use min_t instead of min function in emxx_udc.c Fix checkpatch.pl warnings: WARNING: min() should probably be min_t(u32, iBufSize, ep->ep.maxpacket) WARNING: min() should probably be min_t(u32, data_size, ep->ep.maxpacket) WARNING: min() should probably be min_t(u16, udc->ctrl.wLength, sizeof(status_data)) Changes in v2: - Fixed min function call as min_t Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: emxx_udc: Fix replace printk(KERN_DEBUG ..) with dev_dbgEbru Akagunduz1-5/+5
This patch fixes "Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG" checkpatch.pl warning in emxx_udc.c Changes in v2: - Fixed dev_debug function call as dev_dbg Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28staging: emxx_udc: Fixed else is not usefull warning.Gulsah Kose1-2/+1
This patch fixes "else is not generally useful after a break or return" checkpatch.pl warning in emxx_udc.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23staging: emxx_udc: Do not assign bool to 0/1Roberta Dobrescu1-6/+6
This fixes the following coccinelle warning: WARNING: Assignment of bool to 0/1 Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23staging: emxx_udc: Do not use comparisons on bool testsRoberta Dobrescu1-4/+2
This fixes the following coccinelle warning: WARNING: Comparison of bool to 0/1 Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19staging: emxx_udc: Replace __constant_cpu_to_le16 with cpu_to_le16Roberta Dobrescu1-3/+3
This fixes the following checkpatch.pl warning: WARNING: __constant_cpu_to_le16 should be cpu_to_le16 Additionally, it removes the space between function name and (. Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19staging: emxx_udc: fix compile warnings: discarding const qualifierVincenzo Scotti1-2/+2
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19staging: exxx_udc: Convert pr_warning to pr_warnMasanari Iida1-3/+3
This patch Convert pr_warning to pr_warn. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11staging: emxx_udc: fix style warnings: const strings should be const charVincenzo Scotti1-14/+14
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11staging: emxx_udc: fix style warnings: return in void functionsVincenzo Scotti1-14/+0
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11staging: emxx_udc: fix style warnings: blank line after declarationsVincenzo Scotti1-0/+2
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-08staging: emxx_udc: remove check for CONFIG_MACH_EMGRPaul Bolle1-4/+0
There's a check for CONFIG_MACH_EMGR. But the Kconfig symbol MACH_EMGR doesn't exist. Remove that check and the single #define it hides. Note that this macro isn't used by this driver anyway. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>