1
0
Fork 0
Commit Graph

70 Commits (5766e9d25f41d79a0bb99e44a4408d00236dc3c7)

Author SHA1 Message Date
Gargi Sharma 3428e918e2 staging: emxx_udc: add braces to if-else block
add braces to if/else clause to fix the checkpatch issue braces {}
should be used on all arms of if/else block. Does not affect flow
because only single statement inside if/else block.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16 10:10:34 +02:00
Anchal Jain 190b95170d staging: emxx_udc: Fix unsigned int to bare use of unsigned
This is a patch to fixes up a
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
found by the checkpatch.pl tool

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16 10:10:34 +02:00
Rehas Sachdeva bb84f356ac staging: emxx_udc: Remove unnecessary blank line
This patch fixes the checkpatch.pl warning:
Blank lines aren't necessary before a close brace '}'

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 12:23:07 +02:00
Anson Jacob 8e02a3fd03 staging: emxx_udc: Fix checkpatch warning
Fix checkpatch.pl warning
Block comments use * on subsequent lines

Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-01 17:55:43 +02:00
Arnd Bergmann 0bf048abeb staging: emxx_udc: allow modular build
A change to the usb gadget core allowed certain API functions to be
part of a loadable module, which breaks having emxx_udc built-in:

drivers/staging/built-in.o: In function `nbu2ss_drv_probe':
(.text+0x2428): undefined reference to `usb_ep_set_maxpacket_limit'

The original patch already fixed tons of other cases that have the
added dependency but apparently missed this one that now appears
in an ARM allmodconfig build.

This patch makes the symbol "tristate", which lets the Kconfig
dependency tracking handle it correctly. To make the module
actually usable, I also revert 0af61e66ee ("drivers/staging:
make emxx_udc.c explicitly non-modular"), which Paul Gortmaker
added after noticing that the Kconfig symbol was 'bool'.
Compared to the original version however, I leave out the
'__exit' annotation on the remove callback, as Paul pointed
out that this was incorrect.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 5a8d651a2b ("usb: gadget: move gadget API functions to udc-core")
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-07-26 08:47:08 -07:00
Shyam Saini ffc83a79b4 Staging: emxx_udc: emxx_udc: fixed coding style issue
fixed checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of
'unsigned'

Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-09 14:25:52 +02:00
Sandhya Bankar b6d3b4577e Staging: emxx_udc: emxx_udc: Add space around operator.
Add space around operator.This patch is found by checkpatch.pl script.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Dilek Uzulmez abe3417445 Staging: emxx_udc: Add space around '-'
Add space around operator '-'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '-' (ctx:VxV)

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Sandhya Bankar 5a20df724f Staging: emxx_udc: Return NULL instead of 0.
Return NULL instead of 0 from nbu2ss_ep_alloc_request(),if req pointer is NULL.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Amitoj Kaur Chawla 40a13d0815 staging: emxx_udc: Remove header file
Remove duplicate include file. Found using includecheck.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22 12:03:22 -08:00
Janani Ravichandran 599b878095 staging: emxx_udc: Remove parentheses around the right hand side of assignment
Remove parentheses around the right hand side of assignments as they are
not needed. Semantic patch used:

@@
expression a, b, c;
@@

(
  a = (b == c)
|
  a =
- (
  b
- )
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:05:35 -08:00
Anjali Menon c75955d1ee staging: emxx_udc: Alligned to match '('
Allignment matched to the open parenthesis to avoid the
check detected by the checkpatch.pl.

CHECK: Alignment should match open parenthesis

Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 20:17:18 -08:00
Geliang Tang e59ac74794 staging: emxx_udc: use list_first_entry_or_null()
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-21 18:32:52 -08:00
Arnd Bergmann e7cfb3907d staging/emxx_udc: fix 64-bit warnings
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-12-21 18:32:52 -08:00
Navya Sri Nizamkari ba57f5fadb Staging: emxx_udc: Add space around operator.
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-24 19:21:05 -07:00
Luis de Bethencourt 5a602ac4d6 staging: emxx_udc: Remove boolean comparisons
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-24 19:21:05 -07:00
Paul Gortmaker 0af61e66ee drivers/staging: make emxx_udc.c explicitly non-modular
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-10-12 21:12:17 -07:00
Cristina Moraru 2866914ce1 staging:emxx_udc: Fixed comparison style warnings
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-30 04:02:58 +02:00
Ravi Teja Darbha f2b29165c5 staging: emxx_udc: Remove unused parameter from function parameter list parameter list
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-12 18:24:52 -07:00
Ravi Teja Darbha c648a57ae5 staging: emxx_udc: Remove cleanup1 label
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-12 18:24:52 -07:00
Ravi Teja Darbha 706eb8cfb1 staging: emxx_udc: Fix NULL comparison style
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-12 18:24:52 -07:00
Ravi Teja Darbha b68ff8f61e staging: emxx_udc: Avoid using multiple blank lines
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-12 18:24:51 -07:00
Ravi Teja Darbha 446be1b553 staging: emxx_udc: Remove FSF mailing address
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-09-12 18:24:51 -07:00
Robert Baldyga 68b5c94751 staging: emxx_udc: add ep capabilities support
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-08-04 12:25:31 -05:00
Robert Baldyga cb009d6e0b staging: emxx_udc: add missing usb_ep_set_maxpacket_limit()
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-07-31 08:58:02 -05:00
Hari Prasath Gujulan Elango f194f4e9e5 staging: emxx_udc: remove commented code
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-15 21:56:37 -07:00
Madhusudhanan Ravindran f51cd2b7d1 staging: emxx_udc: remove commented code
removed the commented INFO lines.

Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:33:40 -07:00
Carlos E. Garcia 69e98df782 Staging: fixed multiple spelling errors.
Fixed multiple spelling errors.

Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:23:58 +02:00
Gujulan Elango, Hari Prasath (H.) 9436165544 staging: emxx_udc: Remove dead code
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-30 16:52:21 +02:00
Gujulan Elango, Hari Prasath (H.) 3e2bb64d1a staging: emxx_udc : remove stray semicolon
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-30 16:52:21 +02:00
Julia Lawall bd7de5cea2 staging: emxx_udc: test returned value
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-04-30 16:52:21 +02:00
Haneen Mohammed 93275c8068 Staging: emuxx_udc: replace pr_* with dev_*
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-16 16:28:31 +01:00
Somya Anand ca3d253eb9 Staging: emxx_udc: Iterate list using list_for_each_entry
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-16 16:23:43 +01:00
Haneen Mohammed f737ea50ba Staging: emxx_udc: Remove custom printk macro ERR
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-06 09:54:26 -08:00
Haneen Mohammed 886892798c Staging: emxx_udc: Replace custom printk macro ERR with dev_err or pr_err
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-06 09:54:26 -08:00
Haneen Mohammed d45c4c654d Staging: emxx_udc: Remove argument test from function
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-06 09:54:26 -08:00
Haneen Mohammed f6ef6c094e Staging: emxx_udc: Fix do not add new typedefs and remove volatile
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-03-06 09:54:26 -08:00
Aya Mahfouz 410c944eda staging: emxx_udc: rewrite the right hand side of an assignment
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-26 15:24:16 -08:00
Vatika Harlalka ce5aebd678 Staging: emxx_udc: Convert from __attribute__((aligned(size))) to __aligned(size)
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-24 15:28:35 -08:00
Tapasweni Pathak 4a0721bf84 staging: emxx_udc: Replace GFP_KERNEL with GFP_ATOMIC
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-24 15:28:35 -08:00
Linus Torvalds b11a278397 Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
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-19 10:36:45 -08:00
Linus Torvalds 46f7b63556 Staging drivers patches for 3.20-rc1
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.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlTgtVQACgkQMUfUDdst+yk4mACgshYZ1fOQDoPR+BXd+QD1HXfh
 GosAoICXkSjDQjwVo13W6QHIVMsUezY+
 =4jHr
 -----END PGP SIGNATURE-----

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

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-15 11:30:39 -08:00
Chris Rorvick 737fee1bf6 staging: emxx_udc: Remove nbu2ss_drv_set_dp_info()
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-07 17:15:43 +08:00
Peter Chen 1fa2df0c70 staging: emxx_udc: fix the build error
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 9239d88fc5
  # 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-02-04 11:16:47 -06:00
Peter Chen 9239d88fc5 staging: emxx_udc: use common is_selfpowered
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-29 10:32:48 -06:00
Christoph Jaeger 6341e62b21 kconfig: use bool instead of boolean for type definition attributes
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>
2015-01-07 13:08:04 +01:00
Linus Torvalds dab363f938 Staging patches for 3.19-rc1
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.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlSPICkACgkQMUfUDdst+yksdwCfSLE9VUy1o2sAPDRe+J3bQced
 EWEAoL3RtnejKbo5tHS2IT69pLrwiIDS
 =YXyM
 -----END PGP SIGNATURE-----

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

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-12-15 18:06:13 -08:00
Tapasweni Pathak 3f3efca9c5 staging: emxx_udc: use USB API functions rather than constants
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-30 13:20:42 -07:00
Tapasweni Pathak a5a89d7a84 staging: emxx_udc: Remove null check before kfree
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-23 13:43:46 +08:00
Wolfram Sang 9feba53fb1 staging: emxx_udc: drop owner assignment from platform_drivers
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-20 16:21:37 +02:00