platform/kernel/linux-starfive.git
6 years agostaging: fsl-mc: Remove unnecessary dependency
Ioana Radulescu [Tue, 16 Jan 2018 13:19:07 +0000 (15:19 +0200)]
staging: fsl-mc: Remove unnecessary dependency

The function that enables fsl-mc msi interrupts doesn't need
to be explicitly called from the fsl-mc bus driver initialization
routine.

Mark it to be independently called at system init; this is in line
with how things are handled by other GICv3 irqchip users.

Due to this change we now have an unused cleanup function, so
remove it.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc: Remove dead code
Ioana Radulescu [Tue, 16 Jan 2018 13:19:06 +0000 (15:19 +0200)]
staging: fsl-mc: Remove dead code

Remove one unused function from irq-gic-v3-its-fsl-mc-msi.c

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc: Consolidate bus core header files
Bogdan Purcareata [Tue, 16 Jan 2018 13:19:04 +0000 (15:19 +0200)]
staging: fsl-mc: Consolidate bus core header files

The DPAA2 objects involved (DPMNG, DPMCP, DPRC) are used by the fsl-mc
bus infrastructure only, so group the APIs and structs into
fsl-mc-private.h.

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc: Cleanup dprc and dpmcp header files
Bogdan Purcareata [Tue, 16 Jan 2018 13:19:03 +0000 (15:19 +0200)]
staging: fsl-mc: Cleanup dprc and dpmcp header files

A lot of API and associated structures are not used by current code, so
remove them.

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: avoid uninitialized return value
Arnd Bergmann [Tue, 16 Jan 2018 09:34:25 +0000 (10:34 +0100)]
staging: lustre: lnet: avoid uninitialized return value

gcc warns that the latest workqueue change leads to returning an
uninitialized variable:

drivers/staging/lustre/lnet/selftest/module.c: In function 'lnet_selftest_init':
drivers/staging/lustre/lnet/selftest/module.c:98:10: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]

A failure from alloc_ordered_workqueue() tends to indicate an
out-of-memory condition, so return -ENOMEM in both cases.
The second error path was a preexisting bug, where we always
returned zero after a kvmalloc_array() failure.

Fixes: 6106c0f82481 ("staging: lustre: lnet: convert selftest to use workqueues")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: xgifb: vb_setmode: brace style fixes
Kenny Ballou [Mon, 15 Jan 2018 18:34:26 +0000 (11:34 -0700)]
staging: xgifb: vb_setmode: brace style fixes

Add braces to certain "multiline" conditions where "multiline" means
including comments.

Signed-off-by: Kenny Ballou <kballou@devnulllabs.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: xgifb: vb_setmode: fix long line warnings
Kenny Ballou [Mon, 15 Jan 2018 18:34:25 +0000 (11:34 -0700)]
staging: xgifb: vb_setmode: fix long line warnings

Fix a number of checkpatch warnings in xgfib/vb_setmode.c about line
length being over 80 characters.

Signed-off-by: Kenny Ballou <kballou@devnulllabs.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: fix build warning in module.c
Greg Kroah-Hartman [Tue, 16 Jan 2018 08:24:46 +0000 (09:24 +0100)]
staging: lustre: lnet: fix build warning in module.c

With the latest patches from Neil, we are now getting a build warning:

drivers/staging/lustre/lnet/selftest/module.c: In function ‘lnet_selftest_init’:
drivers/staging/lustre/lnet/selftest/module.c:98:10: warning: ‘rc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   return rc;
          ^~

So fix this up by giving a default error value to rc.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: dgnc: remove duplicated tty defines
Greg Kroah-Hartman [Thu, 11 Jan 2018 16:50:22 +0000 (17:50 +0100)]
staging: dgnc: remove duplicated tty defines

The dgnc driver defined numerous TTY defines that the core kernel
already defines.  So just remove this duplication.

Cc: Lidza Louina <lidza.louina@gmail.com>
Cc: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: dgnc: make dgnc_poll_tick static
Greg Kroah-Hartman [Thu, 11 Jan 2018 16:50:21 +0000 (17:50 +0100)]
staging: dgnc: make dgnc_poll_tick static

No one needs to see this global variable, so make it static.

Cc: Lidza Louina <lidza.louina@gmail.com>
Cc: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: dgnc: remove some global variables
Greg Kroah-Hartman [Thu, 11 Jan 2018 16:50:20 +0000 (17:50 +0100)]
staging: dgnc: remove some global variables

There were some global variables not being used at all, so just delete
them.

Cc: Lidza Louina <lidza.louina@gmail.com>
Cc: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: dgnc: make dgnc_poll_lock static
Greg Kroah-Hartman [Thu, 11 Jan 2018 16:50:19 +0000 (17:50 +0100)]
staging: dgnc: make dgnc_poll_lock static

There's no need for this spinlock to be global, so make it a static
variable.

Cc: Lidza Louina <lidza.louina@gmail.com>
Cc: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: dgnc: make dgnc_num_boards static
Greg Kroah-Hartman [Thu, 11 Jan 2018 16:50:18 +0000 (17:50 +0100)]
staging: dgnc: make dgnc_num_boards static

There's no need for the world to know the number of dgnc boards in the
system, so just make it a static variable.

Cc: Lidza Louina <lidza.louina@gmail.com>
Cc: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: dgnc: remove crazy "management" device node
Greg Kroah-Hartman [Thu, 11 Jan 2018 16:50:17 +0000 (17:50 +0100)]
staging: dgnc: remove crazy "management" device node

There's no need for a special character device just to get some random
information out of a single serial port driver.  So remove the
dgnc_mgmt.c file, and some structures and ioctl definitions that only it
was using.

Cc: Lidza Louina <lidza.louina@gmail.com>
Cc: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: dgnc: delete dgnc_utils.c
Greg Kroah-Hartman [Thu, 11 Jan 2018 16:50:16 +0000 (17:50 +0100)]
staging: dgnc: delete dgnc_utils.c

There was just one function in it, and it duplicated what
msleep_interruptable() was doing, which is pointless, so delete it and
fix up the one calling site.

Cc: Lidza Louina <lidza.louina@gmail.com>
Cc: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fbtft: remove redundant license text
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:55 +0000 (11:08 +0100)]
staging: fbtft: remove redundant license text

Now that the SPDX tag is in all fbtft files, that identifies the license
in a specific and legally-defined manner.  So the extra GPL text wording
can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fbtft: add SPDX identifiers
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:54 +0000 (11:08 +0100)]
staging: fbtft: add SPDX identifiers

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the all of the staging fbtft drivers to have a proper SPDX
identifier, based on the license text in the file itself.  The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: emxx_udc: remove redundant license text
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:53 +0000 (11:08 +0100)]
staging: emxx_udc: remove redundant license text

Now that the SPDX tag is in the emxx_udc driver files, that identifies
the license in a specific and legally-defined manner.  So the extra GPL
text wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: emxx_udc: add SPDX identifier.
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:52 +0000 (11:08 +0100)]
staging: emxx_udc: add SPDX identifier.

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the staging emxx_udc driver to have a proper SPDX identifier,
based on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: clocking-wizard: remove redundant license text
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:51 +0000 (11:08 +0100)]
staging: clocking-wizard: remove redundant license text

Now that the SPDX tag is in the clocking-wizard driver files, that
identifies the license in a specific and legally-defined manner.  So the
extra GPL text wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: clocking-wizard: add SPDX identifier.
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:50 +0000 (11:08 +0100)]
staging: clocking-wizard: add SPDX identifier.

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the staging clocking-wizard driver to have a proper SPDX
identifier, based on the license text in the file itself.  The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: dgnc: remove redundant license text
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:49 +0000 (11:08 +0100)]
staging: dgnc: remove redundant license text

Now that the SPDX tag is in all drivers/staging/dgnc files, that
identifies the license in a specific and legally-defined manner.  So the
extra GPL text wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Lidza Louina <lidza.louina@gmail.com>
Cc: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: dgnc: add SPDX identifier.
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:48 +0000 (11:08 +0100)]
staging: dgnc: add SPDX identifier.

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the staging dgnc driver to have a proper SPDX identifier, based
on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Lidza Louina <lidza.louina@gmail.com>
Cc: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fwserial: remove redundant license text
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:47 +0000 (11:08 +0100)]
staging: fwserial: remove redundant license text

Now that the SPDX tag is in all drivers/staging/fwserial/ files, that
identifies the license in a specific and legally-defined manner.  So the
extra GPL text wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fwserial: add SPDX identifier.
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:46 +0000 (11:08 +0100)]
staging: fwserial: add SPDX identifier.

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the staging fwserial driver to have a proper SPDX identifier,
based on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: octeon: remove redundant license text
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:45 +0000 (11:08 +0100)]
staging: octeon: remove redundant license text

Now that the SPDX tag is in all drivers/staging/octeon/ files, that
identifies the license in a specific and legally-defined manner.  So the
extra GPL text wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: octeon: add SPDX identifiers.
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:44 +0000 (11:08 +0100)]
staging: octeon: add SPDX identifiers.

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the staging octeon driver to have a proper SPDX identifier, based
on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: nvec: remove redundant license text
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:43 +0000 (11:08 +0100)]
staging: nvec: remove redundant license text

Now that the SPDX tag is in all drivers/staging/nvec/ files, that
identifies the license in a specific and legally-defined manner.  So the
extra GPL text wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: nvec: add SPDX identifier.
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:42 +0000 (11:08 +0100)]
staging: nvec: add SPDX identifier.

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the staging nvec driver to have a proper SPDX identifiers, based
on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: speakup: remove redundant license text
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:41 +0000 (11:08 +0100)]
staging: speakup: remove redundant license text

Now that the SPDX tag is in all drivers/staging/speakup/ files, that
identifies the license in a specific and legally-defined manner.  So the
extra GPL text wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Chris Brannon <chris@the-brannons.com>
Cc: Kirk Reiser <kirk@reisers.ca>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: speakup: add SPDX identifier.
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:40 +0000 (11:08 +0100)]
staging: speakup: add SPDX identifier.

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the remaining staging speakup files to have a proper SPDX
identifier, based on the license text in the file itself.  The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Chris Brannon <chris@the-brannons.com>
Cc: Kirk Reiser <kirk@reisers.ca>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: bcm2835-camera: remove redundant license text
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:39 +0000 (11:08 +0100)]
staging: vc04_services: bcm2835-camera: remove redundant license text

Now that the SPDX tag is in all
drivers/staging/vc04_services/bcm2835-camera/ files, that identifies the
license in a specific and legally-defined manner.  So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Eric Anholt <eric@anholt.net>
Cc: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: <bcm-kernel-feedback-list@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: bcm2835-camera: add SPDX identifiers
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:38 +0000 (11:08 +0100)]
staging: vc04_services: bcm2835-camera: add SPDX identifiers

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the bcm2835-camera driver to have a proper SPDX identifier, based
on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: <bcm-kernel-feedback-list@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: bcm2835-audio: remove redundant license text
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:37 +0000 (11:08 +0100)]
staging: vc04_services: bcm2835-audio: remove redundant license text

Now that the SPDX tag is in all
drivers/staging/vc04_services/bcm2835-audio/ files, that identifies the
license in a specific and legally-defined manner.  So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: <bcm-kernel-feedback-list@broadcom.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: bcm2835-audio: add SPDX identifiers
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:36 +0000 (11:08 +0100)]
staging: vc04_services: bcm2835-audio: add SPDX identifiers

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the bcm2835-audio driver to have a proper SPDX identifier, based
on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: <bcm-kernel-feedback-list@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: typec: remove redundant license text
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:35 +0000 (11:08 +0100)]
staging: typec: remove redundant license text

Now that the SPDX tag is in all drivers/staging/typec/ files, that
identifies the license in a specific and legally-defined manner.  So the
extra GPL text wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: typec: add SPDX identifier.
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:34 +0000 (11:08 +0100)]
staging: typec: add SPDX identifier.

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the drivers/staging/typec/ files to have a proper SPDX
identifier, based on the license text in the file itself.  The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vme: vme_user.c: remove redundant license text
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:33 +0000 (11:08 +0100)]
staging: vme: vme_user.c: remove redundant license text

Now that the SPDX tag is in all drivers/staging/vme/ files, that
identifies the license in a specific and legally-defined manner.  So the
extra GPL text wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Martyn Welch <martyn@welchs.me.uk>
Cc: Manohar Vanga <manohar.vanga@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vme: vme_user: add SPDX identifier.
Greg Kroah-Hartman [Thu, 11 Jan 2018 10:08:32 +0000 (11:08 +0100)]
staging: vme: vme_user: add SPDX identifier.

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the remaining staging vme driver to have a proper SPDX
identifier, based on the license text in the file itself.  The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Martyn Welch <martyn@welchs.me.uk>
Cc: Manohar Vanga <manohar.vanga@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: Align backslashes in multi-line macros
Fabian Huegel [Thu, 11 Jan 2018 17:17:02 +0000 (18:17 +0100)]
staging: lustre: Align backslashes in multi-line macros

This patch right aligns all backslashes in multi-line macros
in obd_class.h for better readability.

Signed-off-by: Fabian Huegel <fabian_huegel@web.de>
Signed-off-by: Christoph Volkert <linux@christoph-volkert.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: Fix overlong lines
Fabian Huegel [Thu, 11 Jan 2018 17:17:00 +0000 (18:17 +0100)]
staging: lustre: Fix overlong lines

Fixed four lines that went over the 80 character limit
to reduce checkpatch warnings.

Signed-off-by: Fabian Huegel <fabian_huegel@web.de>
Signed-off-by: Christoph Volkert <linux@christoph-volkert.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: Add identifier names to function declarations
Fabian Huegel [Thu, 11 Jan 2018 17:16:59 +0000 (18:16 +0100)]
staging: lustre: Add identifier names to function declarations

Checkpatch was complaining about missing identifier names in function
declarations. So we added the missing names according to the names in
the respective function implementation. *obd_import* was sometimes named
*import* and sometimes *imp* (in genops.c), so to avoid confusion we just
named it imp everywhere.

Signed-off-by: Fabian Huegel <fabian_huegel@web.de>
Signed-off-by: Christoph Volkert <linux@christoph-volkert.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: Remove DECLARE_LU_VARS macro
Fabian Huegel [Thu, 11 Jan 2018 17:16:57 +0000 (18:16 +0100)]
staging: lustre: Remove DECLARE_LU_VARS macro

This macro was only used in four places to declare two variables.
It saved one line of code, but in our opinion hurt readability.
So we removed the macro, substituting every occurrence with the
declaration of the two variables (like the preprocessor would have done).

Signed-off-by: Fabian Huegel <fabian_huegel@web.de>
Signed-off-by: Christoph Volkert <linux@christoph-volkert.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: Enclose complex macros in do-while loops
Fabian Huegel [Thu, 11 Jan 2018 17:16:56 +0000 (18:16 +0100)]
staging: lustre: Enclose complex macros in do-while loops

Some complex multi-line macros were not enclosed by a do-while(0),
so we fixed that.

Signed-off-by: Fabian Huegel <fabian_huegel@web.de>
Signed-off-by: Christoph Volkert <linux@christoph-volkert.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: xgifb: vb_table: fix whitespacing issues
Kenny Ballou [Fri, 12 Jan 2018 22:34:43 +0000 (15:34 -0700)]
staging: xgifb: vb_table: fix whitespacing issues

Correct minor checkpatch issues.

Signed-off-by: Kenny Ballou <kballou@devnulllabs.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: removed enum typedef BUS_RELEASE_T
Ajay Singh [Thu, 11 Jan 2018 14:12:19 +0000 (19:42 +0530)]
staging: wilc1000: removed enum typedef BUS_RELEASE_T

This patch removes enum typedef BUS_RELEASE_T and define
"enum bus_release" to use instead of typedef.

checkpatch.pl not to add new typedef warning is fixed with this patch.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: removed enum typedef BUS_ACQUIRE_T
Ajay Singh [Thu, 11 Jan 2018 14:12:18 +0000 (19:42 +0530)]
staging: wilc1000: removed enum typedef BUS_ACQUIRE_T

This patch removes enum typedef BUS_ACQUIRE_T and define
enum bus_acquire to use instead of typedef.

checkpatch.pl not to add new typedef warning is fixed with this patch.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: removed enum typedef CHIP_PS_STATE_T
Ajay Singh [Thu, 11 Jan 2018 14:12:17 +0000 (19:42 +0530)]
staging: wilc1000: removed enum typedef CHIP_PS_STATE_T

This patch removes enum typedef CHIP_PS_STATE_T and introduce
enum chip_ps_states to use instead of typedef.

checkpatch.pl not to add new typedef warning is fixed with this patch.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: removed enums typedef for BEACON_IE & TX_RATE_T
Ajay Singh [Thu, 11 Jan 2018 14:12:16 +0000 (19:42 +0530)]
staging: wilc1000: removed enums typedef for BEACON_IE & TX_RATE_T

This patch removed the unnecessary enum typedef for BEACON_IE &
TX_RATE_T
It fix "WARNING: do not add new typedefs" reported by checkpatch.pl

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove unnecessary typedef enum G_OPERATING_MODE_T
Ajay Singh [Thu, 11 Jan 2018 14:12:15 +0000 (19:42 +0530)]
staging: wilc1000: remove unnecessary typedef enum G_OPERATING_MODE_T

This patch has removed G_OPERATING_MODE_T typedef enum.
Now, its used as anonymous-enums for constants.
checkpatch.pl warning to avoid new typedef is fixes with this patch.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: removed typedef from enum BSSTYPE_T
Ajay Singh [Thu, 11 Jan 2018 14:12:14 +0000 (19:42 +0530)]
staging: wilc1000: removed typedef from enum BSSTYPE_T

This patch removes typedef from enum BSSTYPE_T and
rename it to bss_types.

It fixes "WARNING: do not add new typdefs" warning
reported by checkpatch.pl.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: fix memory leaks in cc_ivgen_init
Colin Ian King [Fri, 12 Jan 2018 16:10:18 +0000 (16:10 +0000)]
staging: ccree: fix memory leaks in cc_ivgen_init

The current error exit path in function cc_ivgen_init via label
'out' free's resources from the drvdata->ivgen_handle context.
However, drvdata->ivgen_handle has not been assigned to the
context ivgen_ctx at this point, so the resources are not freed.
Fix this by setting drvdata->ivgen_handle to ivgen_ctx as early
as possible so that the clean up error exit return path can free
the resources.

Detected by CoveritScan, CID#1463795 ("Resource leak")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: remove redundant dev_err call in init_cc_resources()
Wei Yongjun [Thu, 11 Jan 2018 11:14:57 +0000 (11:14 +0000)]
staging: ccree: remove redundant dev_err call in init_cc_resources()

There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: don't break lines unnecessarily
Dan Carpenter [Thu, 11 Jan 2018 10:10:11 +0000 (13:10 +0300)]
staging: ccree: don't break lines unnecessarily

These lines are less than 80 characters so we don't need to break them
up into chunks.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: libcfs: remove workitem code.
NeilBrown [Thu, 11 Jan 2018 04:06:40 +0000 (15:06 +1100)]
staging: lustre: libcfs: remove workitem code.

There are now no users.  workqueues are doing the job
that this used to do.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: convert selftest to use workqueues
NeilBrown [Thu, 11 Jan 2018 04:06:40 +0000 (15:06 +1100)]
staging: lustre: lnet: convert selftest to use workqueues

Instead of the cfs workitem library, use workqueues.

As lnet wants to provide a cpu mask of allowed cpus, it
needs to be a WQ_UNBOUND work queue so that tasks can
run on cpus other than where they were submitted.

This patch also exported apply_workqueue_attrs() which is
a documented part of the workqueue API, that isn't currently
exported.  lustre needs it to allow workqueue thread to be limited
to a subset of CPUs.

Acked-by: Tejun Heo <tj@kernel.org> (for export of apply_workqueue_attrs)
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: Cleanup codestyle, indent statements after case labels
Michael Panzlaff [Tue, 9 Jan 2018 16:20:58 +0000 (17:20 +0100)]
staging: pi433: Cleanup codestyle, indent statements after case labels

This patch changes the indentation of the statements after case labels.
The linux coding guidelines do not explicitly mentiond this but pretty
much all existing code doesn't put any statements into the same line of
their belonging case labels. Therefore this adapts to the more usual style.

Please note that there is still a lot of > 80 character lines which will
cause checkpatch warnings. This patch does not intent to fix this
already existing issue.

Signed-off-by: Michael Panzlaff <michael.panzlaff@fau.de>
Signed-off-by: Tillmann Zipperer <tillmann.zipperer@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: Fix trailing semicolon
Luis de Bethencourt [Wed, 10 Jan 2018 16:51:29 +0000 (16:51 +0000)]
staging: rtl8723bs: Fix trailing semicolon

The trailing semicolon is an empty statement that does nothing.
Removing it since it has no purpose.

Signed-off-by: Luis de Bethencourt <luisbg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: Fix trailing semicolon
Luis de Bethencourt [Wed, 10 Jan 2018 16:51:28 +0000 (16:51 +0000)]
staging: rtl8723bs: Fix trailing semicolon

The trailing semicolon is an empty statement that does no operation.
Removing it since it doesn't do anything.

Signed-off-by: Luis de Bethencourt <luisbg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fbtft: Fix indentation
Luis Gerhorst [Wed, 10 Jan 2018 17:30:35 +0000 (18:30 +0100)]
staging: fbtft: Fix indentation

This fixes the checkpatch message:

    CHECK: Alignment should match open parenthesis
    #1380: FILE: drivers/staging/fbtft/fbtft-core.c:1380:
    + dev_warn(dev,
    + "no default functions for regwidth=%d and buswidth=%d\n",

Signed-off-by: Luis Gerhorst <linux-kernel@luisgerhorst.de>
Signed-off-by: Jonny Schaefer <schaefer.jonny@gmail.com>
Acked-by: Alexander Wuerstlein <arw@cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rts5208: sd: fix misspelled constant
Sumit Pundir [Wed, 10 Jan 2018 10:16:10 +0000 (15:46 +0530)]
staging: rts5208: sd: fix misspelled constant

Fixes the misspelled constant to 'SWITCH_NO_ERR'.
Issue reported by checkpatch.pl

Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoMAINTAINERS: Mark some staging directories as "Obsolete"
Joe Perches [Tue, 9 Jan 2018 19:33:56 +0000 (11:33 -0800)]
MAINTAINERS: Mark some staging directories as "Obsolete"

Several staging directories have TODO files that indicate a
subsystem will be removed in the future.

Using a status entry of "S: Obsolete" helps indicate the
subsystem files should not be modified unnecessarily.

checkpatch also tests this setting and emits a warning that
the matching subsystem files should not be modified.

This might help avoid receiving patches that will be dropped.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: Fix trailing semicolon
Luis de Bethencourt [Tue, 9 Jan 2018 16:51:03 +0000 (16:51 +0000)]
staging: rtl8723bs: Fix trailing semicolon

The trailing semicolon is an empty statement that does no operation.
Removing it since it doesn't do anything.

Signed-off-by: Luis de Bethencourt <luisbg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoncpfs: remove redundant cast of struct ncp_inode_info
Colin Ian King [Tue, 9 Jan 2018 17:06:40 +0000 (17:06 +0000)]
ncpfs: remove redundant cast of struct ncp_inode_info

Casting a value returned by memory an allocation function is
not required and can be removed. Also add in a newline after before
the first statement. Code clean up as suggested by coccinelle.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: align function parameters with open parenthesis
Valentin Vidic [Tue, 9 Jan 2018 14:39:17 +0000 (15:39 +0100)]
staging: pi433: align function parameters with open parenthesis

Fixes checkpatch warnings:

  CHECK: Alignment should match open parenthesis

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: dma mask is type u64
Gilad Ben-Yossef [Tue, 9 Jan 2018 10:24:33 +0000 (10:24 +0000)]
staging: ccree: dma mask is type u64

The dma mask var was defined as dma_addr_t but should be
u64. This showed as a sparse warning when building for 32 bit.
Fix it by changing type to u64 and drop the cast.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: make stub function static inline
Gilad Ben-Yossef [Tue, 9 Jan 2018 10:24:32 +0000 (10:24 +0000)]
staging: ccree: make stub function static inline

The debugfs interface defines stub function if debugfs is not
enabled, which were missing the 'static inline' qualifiers causing
sparse warnings.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: add missing include
Gilad Ben-Yossef [Tue, 9 Jan 2018 10:24:31 +0000 (10:24 +0000)]
staging: ccree: add missing include

Add the missing include of include file with function declarations.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: remove unneeded includes
Gilad Ben-Yossef [Tue, 9 Jan 2018 10:24:30 +0000 (10:24 +0000)]
staging: ccree: remove unneeded includes

Remove include files not needed for compilation.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: use a consistent file naming convention
Gilad Ben-Yossef [Tue, 9 Jan 2018 10:24:29 +0000 (10:24 +0000)]
staging: ccree: use a consistent file naming convention

The ccree driver source files were using an inconsistent
naming convention stemming from what the company was called
when they were added.

Move to a single consistent naming convention for better
code readability.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: remove LIBCFS_ALLOC, LIBCFS_FREE and related macros.
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: remove LIBCFS_ALLOC, LIBCFS_FREE and related macros.

LIBCFS_ALLOC
LIBCFS_ALLOC_ATOMIC
LIBCFS_ALLOC_POST
LIBCFS_CPT_ALLOC
LIBCFS_FREE

are no longer used, and so are removed.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: replace LIBCFS_CPT_ALLOC()
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: replace LIBCFS_CPT_ALLOC()

LIBCFS_APT_ALLOC() calls kvmalloc_node() with GFP_NOFS
which is not permitted.
Mostly, a kmalloc_node(GFP_NOFS) is appropriate, though occasionally
the allocation is large and GFP_KERNEL is acceptable, so
kvmalloc_node() can be used.

This patch introduces 4 alternatives to LIBCFS_CPT_ALLOC():
 kmalloc_cpt()
 kzalloc_cpt()
 kvmalloc_cpt()
 kvzalloc_cpt().

Each takes a size, gfp flags, and cpt number.

Almost every call to LIBCFS_CPT_ALLOC() passes lnet_cpt_table()
as the table.  This patch embeds that choice in the k*alloc_cpt()
macros, and opencode kzalloc_node(..., cfs_cpt_spread_node(..))
in the one case that lnet_cpt_table() isn't used.

When LIBCFS_CPT_ALLOC() is replaced, the matching LIBCFS_FREE()
is also replaced, with with kfree() or kvfree() as appropriate.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: opencode LIBCFS_ALLOC_ATOMIC calls.
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: opencode LIBCFS_ALLOC_ATOMIC calls.

Just call kzalloc(GFP_ATOMIC) directly.
We don't need the warning on failure.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: cfs_percpt_alloc: use kvmalloc(GFP_KERNEL)
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: cfs_percpt_alloc: use kvmalloc(GFP_KERNEL)

this allocation is called from several places, but all are
during initialization, so GFP_NOFS is not needed.
So use kvmalloc and GFP_KERNEL.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: use kmalloc for allocating ksock_tx
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: use kmalloc for allocating ksock_tx

The size of the data structure is primarily controlled
by the iovec size, which is limited to 256.
Entries in this vector are 12 bytes, so the whole
will always fit in a page.
So it is safe to use kmalloc (kvmalloc not needed).
So replace LIBCFS_ALLOC with kmalloc.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet-route: use kmalloc for small allocation
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: lnet-route: use kmalloc for small allocation

This allocation is reasonably small.
As the function is called "*_locked", it might not be safe
to perform a GFP_KERNEL allocation, so be safe and
use GFP_NOFS.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: more conversions to GFP_KERNEL allocations.
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: more conversions to GFP_KERNEL allocations.

These are not called from filesystem context, so use
GFP_KERNEL, not LIBCFS_ALLOC().

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: more LIBCFS_ALLOC conversions to GFP_KERNEL allocations.
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: more LIBCFS_ALLOC conversions to GFP_KERNEL allocations.

None of these need GFP_NOFS so allocate directly.
Change matching LIBCFS_FREE() to kfree() or kvfree().

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: Convert more LIBCFS_ALLOC allocation to direct GFP_KERNEL
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: Convert more LIBCFS_ALLOC allocation to direct GFP_KERNEL

None of these need to be GFP_NOFS, so use GFP_KERNEL explicitly
with kmalloc(), kvmalloc(), or kvmalloc_array().
Change matching LIBCFS_FREE() to kfree() or kvfree()

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: change some LIBCFS_ALLOC calls to k?alloc(GFP_KERNEL)
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: change some LIBCFS_ALLOC calls to k?alloc(GFP_KERNEL)

When an allocation happens from process context rather than
filesystem context, it is best to use GFP_KERNEL rather than
LIBCFS_ALLOC() which always uses GFP_NOFS.
This include initialization during, or prior to, mount,
and code run from separate worker threads.

So for some of these cases, switch to kmalloc, kvmalloc, or
kvmalloc_array() as appropriate.
In some cases we preserve __GFP_ZERO (via kzalloc/kvzalloc), but in
others it is clear that allocated memory is immediately initialized.

In each case, the matching LIBCFS_FREE() is converted to
kfree() or kvfree()

This is just a subset of locations that need changing.
As there are quite a lot, I've broken them up into several
ad-hoc sets to avoid review-fatigue.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: use kmalloc/kvmalloc in router_proc
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: lnet: use kmalloc/kvmalloc in router_proc

The buffers allocated in router_proc are to temporarily
hold strings created for procfs files.
So they do not need to be zeroed and are safe to use
GFP_KERNEL.
So use kmalloc() directly except in two cases where it
isn't trivial to confirm that the size is always small.
In those cases, use kvmalloc().

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: selftest: don't allocate small strings.
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: lnet: selftest: don't allocate small strings.

All of the "name" buffers here are at most LST_NAME_SIZE+1
bytes, so 33 bytes at most.
They are only used temporarily during the life of the function
that allocates them.
So it is much simpler to just allocate on the stack.
Worst case is lst_tet_add_ioct(), which allocates
3 for these which 99 bytes on the stack, instead of the 24 that would
have been allocated for 64-bit pointers.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: switch to cpumask_var_t
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: lnet: switch to cpumask_var_t

So that we can use the common cpumask allocation functions,
switch to cpumask_var_t.
We need to be careful not to free a cpumask_var_t until the
variable has been initialized, and it cannot be initialized
directly.
So we must be sure either that it is filled with zeros, or
that zalloc_cpumask_var() has been called on it.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.
NeilBrown [Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)]
staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

All usages of the form
  LIBCFS_ALLOC(variable, sizeof(variable))
or
  LIBCFS_ALLOC(variable, sizeof(variable's-type))

are changed to
  variable = kzalloc(sizeof(...), GFP_NOFS);

Similarly, all
   LIBCFS_FREE(variable, sizeof(variable))
become
   kfree(variable);

None of these need the vmalloc option, or any of the other minor
benefits of LIBCFS_ALLOC().

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: replace shifting with BIT macro
Valentin Vidic [Mon, 8 Jan 2018 17:38:31 +0000 (18:38 +0100)]
staging: pi433: replace shifting with BIT macro

Fixes checkpatch warnings:

  CHECK: Prefer using the BIT macro

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: greybus: camera: cleanup multiple checks for null pointers
Sumit Pundir [Mon, 8 Jan 2018 16:50:15 +0000 (22:20 +0530)]
Staging: greybus: camera: cleanup multiple checks for null pointers

Fixed coding style issue regarding null comparison at multiple lines.
Issue reported by checkpatch.pl

Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
Acked-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Switch from WARN to pr_warn
Laura Abbott [Fri, 5 Jan 2018 19:14:09 +0000 (11:14 -0800)]
staging: android: ion: Switch from WARN to pr_warn

Syzbot reported a warning with Ion:

WARNING: CPU: 0 PID: 3502 at drivers/staging/android/ion/ion-ioctl.c:73 ion_ioctl+0x2db/0x380 drivers/staging/android/ion/ion-ioctl.c:73
Kernel panic - not syncing: panic_on_warn set ...

This is a warning that validation of the ioctl fields failed. This was
deliberately added as a warning to make it very obvious to developers that
something needed to be fixed. In reality, this is overkill and disturbs
fuzzing. Switch to pr_warn for a message instead.

Reported-by: syzbot+fa2d5f63ee5904a0115a@syzkaller.appspotmail.com
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Add __GFP_NOWARN for system contig heap
Laura Abbott [Fri, 5 Jan 2018 19:14:08 +0000 (11:14 -0800)]
staging: android: ion: Add __GFP_NOWARN for system contig heap

syzbot reported a warning from Ion:

  WARNING: CPU: 1 PID: 3485 at mm/page_alloc.c:3926

  ...
   __alloc_pages_nodemask+0x9fb/0xd80 mm/page_alloc.c:4252
  alloc_pages_current+0xb6/0x1e0 mm/mempolicy.c:2036
  alloc_pages include/linux/gfp.h:492 [inline]
  ion_system_contig_heap_allocate+0x40/0x2c0
  drivers/staging/android/ion/ion_system_heap.c:374
  ion_buffer_create drivers/staging/android/ion/ion.c:93 [inline]
  ion_alloc+0x2c1/0x9e0 drivers/staging/android/ion/ion.c:420
  ion_ioctl+0x26d/0x380 drivers/staging/android/ion/ion-ioctl.c:84
  vfs_ioctl fs/ioctl.c:46 [inline]
  do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686
  SYSC_ioctl fs/ioctl.c:701 [inline]
  SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692

This is a warning about attempting to allocate order > MAX_ORDER. This
is coming from a userspace Ion allocation request. Since userspace is
free to request however much memory it wants (and the kernel is free to
deny its allocation), silence the allocation attempt with __GFP_NOWARN
in case it fails.

Reported-by: syzbot+76e7efc4748495855a4d@syzkaller.appspotmail.com
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: gs_fpgaboot: remove FSF's mailing address from io.h
Shubham Kumaram [Sun, 7 Jan 2018 21:11:33 +0000 (02:41 +0530)]
Staging: gs_fpgaboot: remove FSF's mailing address from io.h

This patch removes FSF's mailing address issue from io.h found by
checkpatch.pl tool.

Signed-off-by: Shubham Kumaram <shubhamkumaram@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: sm750fb: Remove multiple blank lines
Marcelo Guzmán Lamperti [Mon, 8 Jan 2018 01:03:32 +0000 (22:03 -0300)]
staging: sm750fb: Remove multiple blank lines

Remove multiple blank lines. Issue found by checkpatch.

Signed-off-by: Marcelo Guzmán Lamperti <marcelo.guzman.lamperti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-dpaa2/eth: Use affine DPIO services
Ioana Radulescu [Fri, 5 Jan 2018 11:04:32 +0000 (05:04 -0600)]
staging: fsl-dpaa2/eth: Use affine DPIO services

Use the newly added DPIO service API to map cpu-affine DPIO services
to channels.

The DPAA2 Ethernet driver already had mappings of frame queues and
channels to cpus, but had no control over the DPIOs used. We can
now ensure full affinity of hotpath hardware resources to cores,
which improves performance and almost eliminates some resource
contentions (e.g. enqueue/dequeue busy counters should be close to
zero from now on).

Making the pull channel operation core affine brings the most
significant benefits. This ensures the same DPIO service will be
used for all dequeue commands issued for a certain frame queue,
which is in line with the way hardware is optimized.

Additionally, we also use affine DPIOs for the frame enqueue and
buffer release operations in order to avoid resource contention.
dpaa2_io_service_register() and dpaa2_io_service_rearm()
functions receive an affine DPIO as argument mostly for uniformity,
but this doesn't change the previous functionality.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc/dpio: Add dpaa2_io_service_select() API
Ioana Radulescu [Fri, 5 Jan 2018 11:04:31 +0000 (05:04 -0600)]
staging: fsl-mc/dpio: Add dpaa2_io_service_select() API

All DPIO service API functions receive a dpaa2_io service pointer
as parameter (NULL meaning any service will do) which indicates
the hardware resource to be used to execute the specified command.

There isn't however any available API for obtaining such a service
reference that could be used further, effectively forcing the users
to always request a random service for DPIO operations.
(The DPIO driver holds internally an array mapping services to cpus,
and affine services can be indirectly requested by a couple of API
functions: dpaa2_io_service_register and dpaa2_io_service_rearm
use the cpu id provided by the user to select the corresponding
service)

This patch adds a function for selecting a DPIO service based on
the specified cpu id. If the user provides a "don't care" value
for the cpu, we revert to the default behavior and return the next
DPIO, taken in a round-robin fashion from a list of available
services.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Acked-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: vt6656: Fix unnecessary 'out of memory' message
Sumit Pundir [Mon, 25 Dec 2017 05:31:14 +0000 (11:01 +0530)]
Staging: vt6656: Fix unnecessary 'out of memory' message

This patch fixes one of the warnings as noted by checkpatch.pl related
to unnecessary 'out of memory' message.

This patch fixes the following checkpatch.pl error:

WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
6 years agostaging: rtl8192u: Replace mdelay with msleep in rtl8192_usb_probe
Jia-Ju Bai [Sun, 24 Dec 2017 10:16:55 +0000 (18:16 +0800)]
staging: rtl8192u: Replace mdelay with msleep in rtl8192_usb_probe

rtl8192_usb_probe is not called in an interrupt handler
nor holding a spinlock.
The function mdelay in it can be replaced with msleep,
to avoid busy wait.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
6 years agostaging: comedi: adv_pci1760: fix typo in comments
Richard Sudaryono [Sun, 24 Dec 2017 08:47:45 +0000 (16:47 +0800)]
staging: comedi: adv_pci1760: fix typo in comments

Changed 'firware' to 'firmware'

Signed-off-by: Richard Sudaryono <richardsudaryono@gmail.com>
6 years agoStaging: rtlwifi: Remove unused variable and the code
Shreeya Patel [Thu, 21 Dec 2017 22:28:21 +0000 (03:58 +0530)]
Staging: rtlwifi: Remove unused variable and the code

Remove unused variable and also remove unused code
associated with initializing the unused variable.

Unused variable was detected using the following
semantic patch by coccinelle.

@@
type T;
identifier i;
constant C;
@@

(
extern T i;
|
- T i;
  <+... when != i
- i = C;
  ...+>
)

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
6 years agostaging: vc05_services: fix checkpatch.pl errors
Sidong Yang [Mon, 25 Dec 2017 16:37:45 +0000 (16:37 +0000)]
staging: vc05_services: fix checkpatch.pl errors

Fix some errors for wrong brace position reported by checkpatch.

Signed-off-by: Sidong Yang <realwakka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Prefer WARN_ON_ONCE instead of if condition followed by BUG.
Kishore KP [Sun, 24 Dec 2017 14:03:54 +0000 (19:33 +0530)]
staging: vc04_services: Prefer WARN_ON_ONCE instead of if condition followed by BUG.

Coccinelle suggested to use BUG_ON instead of if condition followed by BUG
but BUG_ON should be used in situations where integrity of the system is no
longer guaranteed. In this case, as suggested by Stefan Wahren, vchiq isn't
critical.
Since it is not critical, BUG_ON should be avoided.
Replaced if condition followed by BUG with WARN_ON_ONCE.

Signed-off-by: Kishore KP <kishore.p@techveda.org>
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Fix platform_no_drv_owner.cocci warnings.
Kishore KP [Sat, 23 Dec 2017 14:46:59 +0000 (20:16 +0530)]
staging: vc04_services: Fix platform_no_drv_owner.cocci warnings.

Removed .owner field initialization, platform core does it automatically.
Pointed out by Coccinelle.

Signed-off-by: Kishore KP <kishore.p@techveda.org>
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: wlan-ng: hfa384x_usb: fixed two line limit coding style issues
Andy Pusch [Sat, 23 Dec 2017 15:37:56 +0000 (16:37 +0100)]
Staging: wlan-ng: hfa384x_usb: fixed two line limit coding style issues

Fixed two coding style issues.

Signed-off-by: Andy Pusch <drag@black-pixel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>