Nicolas Saenz Julienne
76dbbe7706
staging: vchiq: Move definitions only used by core into core header
...
vchiq_if.h is used by service consumers and only the exported API should
be present. Move the rest of definitions, which were not exported by the
way, to vchiq_core.h where they belong.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-40-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:07 +02:00
Nicolas Saenz Julienne
9f10ddbd6f
staging: vchiq: Make vchiq_add_service() local
...
The function is being exported although there is no use for it outside
of vchiq's core code. Keep it local then.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-39-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:07 +02:00
Nicolas Saenz Julienne
af948db021
staging: vchiq: Get rid of unnecessary definitions in vchiq_if.h
...
Those functions don't actually exist, nor have any use, nor the macros.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-38-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:07 +02:00
Nicolas Saenz Julienne
67a3f7df21
staging: vchi: Don't include vchiq_core.h
...
This file is internal to vchiq.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-37-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:07 +02:00
Nicolas Saenz Julienne
1a883994ef
staging: vchi: Get rid of struct vchiq_instance forward declaration
...
It's already forward declared in vchiq_if.h. So no need to insist
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-36-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:07 +02:00
Nicolas Saenz Julienne
b06eba5c52
staging: vchiq: Unify fourcc definition mechanisms
...
There is already enough duplication with regard to fourcc generation in
the kernel. Let's at least use the same macro all over the vchiq
ecosystem.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-35-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:06 +02:00
Nicolas Saenz Julienne
b1d362f408
staging: vchi: Rework vchi_msg_hold() to match vchiq_msg_hold()
...
The services have access to struct vchiq_header's internals, so we can
let them get the data pointer. This pretty much makes both functions
exactly the same, which will allow us to make a switch to
vchiq_msg_hold() further down the road.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-34-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:06 +02:00
Nicolas Saenz Julienne
7c018ed10c
staging: vchiq: Pass vchiq's message when holding a message
...
vchi created an opaque structure to be held by services while they
process callback messages. The contents of this opaque structure are the
service handle, which all services already maintain, and a pointer to
vchiq's message structure, struct vchiq_header.
Let's get rid of this opaque structure and directly pass struct
vchiq_header, which is what ultimately vchiq consumes when handling
callback messages.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-33-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:06 +02:00
Nicolas Saenz Julienne
3a8895a921
staging: vchi: Get rid of struct vchi_service
...
The structure only contains a single parameter, which is the underlying
vchiq handle. Get rid of the struct and directly pass the handle around.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-32-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:06 +02:00
Nicolas Saenz Julienne
65c7536672
staging: vchi: Use struct vchiq_service_params
...
For initialization, vchi has its own params structure, which is then
translated to vchiq's params structure. They are essentially the same,
so lets directly use vchiq's.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-31-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:06 +02:00
Nicolas Saenz Julienne
47cc5b16b0
staging: vchiq: Don't use a typedef for vchiq_callback
...
Linux coding style says to avoid typdefs.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-30-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:06 +02:00
Nicolas Saenz Julienne
3c5da06f99
staging: vchi: Get rid of vchiq_shim's message callback
...
As vchiq_shim's callback does nothing aside from pushing messages into
the service's queue, let's bypass it and jump directly to the service's
callbacks, letting them choose whether to use the message queue.
It turns out most services don't need to use the message queue, which
makes for simpler code in the end.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-29-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:06 +02:00
Nicolas Saenz Julienne
b79134e9de
staging: vchiq: Export vchiq_msg_queue_push
...
vchiq consumer drivers may need to use this function in order to get the
benefits of vchiq's per service message queueing mechanism.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-28-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:05 +02:00
Nicolas Saenz Julienne
31eeca20b7
staging: vchiq: Export vchiq_get_service_userdata()
...
This is for service's callbacks to get their private data.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-27-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:05 +02:00
Nicolas Saenz Julienne
823568cf17
staging: vchi: Expose struct vchi_service
...
This will make further changes easier. The struct will ultimately
disappear.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-26-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:05 +02:00
Nicolas Saenz Julienne
460165c677
staging: vchiq: Get rid of vchiq_util.h
...
The header file only provides other includes. Move the relevant includes
to their respective C files and delete it for good.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-25-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:05 +02:00
Nicolas Saenz Julienne
77b3f6c491
staging: vchiq: Move message queue into struct vchiq_service
...
This has historically been handled by vchi, but there is no reason why
this couldn't be handled directly in vchiq.
The patch tries to avoid altering any behavior, with the exception of
the msg_queue size, which is now fixed to VCHIQ_MAX_SLOTS (it was set to
VCHIQ_MAX_SLOTS / 2). This is done to match vchiq's user_service message
queue, which could be merged with this one in the future.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-24-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:05 +02:00
Nicolas Saenz Julienne
a8f7116b79
staging: vchiq: Introduce vchiq_validate_params()
...
When adding a new service validate the configuration parameters
provided, and remove unnecessary checks in vchi, now that we have
validated service's config.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-23-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:05 +02:00
Nicolas Saenz Julienne
6c53da0b2f
staging: vchi: Get rid of effect less expression
...
It was probably there to trick compilers into ignoring unused variables,
which isn't needed in Linux.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-22-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:05 +02:00
Nicolas Saenz Julienne
469fbb24ce
staging: vchi: Use vchiq's enum vchiq_reason
...
enum vchi_callback_reason maps 1:1 to enum vchiq_reason, in an effort to
simplify things, let's use the later, and get rid of the extra
indirection.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-21-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:05 +02:00
Nicolas Saenz Julienne
0abd7412e9
staging: vchi: Use enum vchiq_bulk_mode instead of vchi's transmission flags
...
vchi has a set of transfer flags which almost map 1:1 to vchiq's own
transfer modes. For the sake of simplicity let's use the later and
delete vchi's.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-20-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:04 +02:00
Nicolas Saenz Julienne
a24ac57ef8
staging: vchi: Get rid of flags argument in vchi_msg_hold()
...
All users are ignoring the flags argument. So for the sake of
simplicity delete it.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-19-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:04 +02:00
Nicolas Saenz Julienne
115588bf77
staging: vc04_services: Get rid of vchi_cfg.h
...
Nothing in it is being used.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-18-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:04 +02:00
Nicolas Saenz Julienne
7bfb15ccb3
staging: vchi: Get rid of unnecessary defines
...
Those defines aren't used by anyone. Get rid of them.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-17-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:04 +02:00
Nicolas Saenz Julienne
09c0f0fc3f
staging: vchi_common: Get rid of all unused definitions
...
There is a series of structures and enums defined but never used. Get
rid of them.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-16-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:04 +02:00
Nicolas Saenz Julienne
6cdd7b7953
staging: vchi: Get rid of vchi_msg_dequeue()
...
Nobody uses it. Get rid of it.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-15-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:04 +02:00
Nicolas Saenz Julienne
b74a8932df
staging: vc04_services: bcm2835-audio: Use vchi_msg_hold()
...
vchi_msg_dequeue() provides the same functionality as vchi_msg_hold()
except it copies the message data as opposed to the later which provides
the data in place.
The copying is done on a local variable, so there is no need to keep the
message out the function's bounds, so use vchi_msg_hold() instead.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-14-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:04 +02:00
Nicolas Saenz Julienne
5a8e22e3d3
staging: vchi: Unify struct shim_service and struct vchi_service_handle
...
The idea behind struct vchi_service_handle is to create an opaque handle
to struct shim_service. This can be achieved by doing a forward
declaration of struct shim_service, which will avoid unwarranted casts
and pointer play.
Ultimately as a rename is due all over the vchi user space, rename
struct shim_service into struvt vchi_service, which is more consistent
with the rest of the exposed API.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-13-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:04 +02:00
Nicolas Saenz Julienne
a7983fd946
staging: vchi: Get rid of struct vchi_instance_handle
...
The idea behind this was to create an opaque handle to struct
vchiq_instance. This can be achieved without creating a new type by
means of a forward declaration of struct vchiq_instance.
This saves us from a lot of useless casting and overall simplifies code.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-12-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:03 +02:00
Nicolas Saenz Julienne
b5f1547b6e
staging: vchi: Get rid of vchi_msg_peek()
...
There already is a function that covers most of the functionality
vchi_msg_peek() provides: vchi_msg_hold(). The main difference being
that the later removes the message from vchu's queue while the other
does it later on, while releasing the message.
There are no users of this function that can't be trivially converted to
vchi_msg_hold(). So, for the sake of removing duplicate code, get rid of
vchi_msg_peek().
Note that the opposite change could be performed as well. But
vchi_msg_peek()'s implementation was deemed less robust as messages have
to be released in order.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-11-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:03 +02:00
Nicolas Saenz Julienne
af22fd658a
staging: vchi: Get rid of all useless callback reasons
...
They are neither produced nor expected, so just delete them.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-10-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:03 +02:00
Phil Elwell
5d9272e28a
staging: vchiq_arm: Add a matching unregister call
...
All the registered children of vchiq have a corresponding call to
platform_device_unregister except bcm2835_audio. Fix that.
Fixes: 25c7597af2 ("staging: vchiq_arm: Register a platform device for audio")
Signed-off-by: Phil Elwell <phil@raspberrypi.com >
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org >
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-9-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:47:03 +02:00
Naushir Patuck
3dad90c532
staging: mmal-vchiq: Fix formatting errors in mmal_parameters.h
...
No functional changes in this commit.
- Remove erroneous whitespace.
- Remove _t postfix label on structs and enums.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com >
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org >
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-8-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:45:23 +02:00
Dave Stevenson
7c71d489bd
staging: mmal-vchiq: If the VPU returns an error, don't negate it
...
There is an enum for the errors that the VPU can return.
port_parameter_get was negating that value, but also using -EINVAL
from the Linux error codes.
Pass the VPU error code as positive values. Should the function
need to pass a Linux failure, then return that as negative.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org >
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org >
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-7-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:45:23 +02:00
Dave Stevenson
20e006b898
staging: mmal-vchiq: Always return the param size from param_get
...
mmal-vchiq is a reimplementation of the userland library for MMAL.
When getting a parameter, the client provides the storage and
the size of the storage. The VPU then returns the size of the
parameter that it wished to return, and as much as possible of
that parameter is returned to the client.
The implementation previously only returned the size provided
by the VPU should it exceed the buffer size. So for parameters
such as the supported encodings list the client had no idea
how much of the provided storage had been populated.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org >
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org >
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-6-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:45:23 +02:00
Dave Stevenson
22e64b486a
staging: mmal-vchiq: Fix client_component for 64 bit kernel
...
The MMAL client_component field is used with the event
mechanism to allow the client to identify the component for
which the event is generated.
The field is only 32bits in size, therefore we can't use a
pointer to the component in a 64 bit kernel.
Component handles are already held in an array per VCHI
instance, so use the array index as the client_component handle
to avoid having to create a new IDR for this purpose.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org >
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org >
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-5-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:45:22 +02:00
Dave Stevenson
4a38e55089
staging: mmal-vchiq: Fixup vchiq-mmal include ordering
...
There were dependencies on including the headers in the correct
order. Fix up the headers so that they include the other
headers that they depend on themselves.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org >
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org >
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-4-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:45:22 +02:00
Dave Stevenson
959fc47c53
staging: mmal-vchiq: Make a mmal_buf struct for passing parameters
...
The callback from vchi_mmal to the client was growing lots of extra
parameters. Consolidate them into a single struct instead of
growing the list further.
The struct is associated with the client buffer, therefore there
are various changes to setup various containers for the struct,
and pass the appropriate members.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org >
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org >
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-3-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:45:22 +02:00
Dave Stevenson
481e5397f5
staging: mmal-vchiq: Make timeout a defined parameter
...
The timeout period for VPU communications is a useful thing
to extend when debugging.
Set it via a define, rather than a magic number buried in the code.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org >
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org >
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de >
Link: https://lore.kernel.org/r/20200629150945.10720-2-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:45:22 +02:00
Souptick Joarder
95154990a7
staging: kpc2000: kpc_dma: Remove additional goto statements
...
As 3 goto level referring to same common code, those can be
accomodated with a single goto level and renameing it to
unpin_pages. Set the -ERRNO when returning partial mapped
pages in more appropriate place.
When dma_map_sg() failed, the previously allocated memory was
not freed properly. This is corrected now.
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com >
Cc: John Hubbard <jhubbard@nvidia.com >
Cc: Bharath Vedartham <linux.bhar@gmail.com >
Cc: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/1593584264-16982-5-git-send-email-jrdr.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:44:26 +02:00
Souptick Joarder
ab7abbcac0
staging: kpc2000: kpc_dma: Convert get_user_pages() --> pin_user_pages()
...
In 2019, we introduced pin_user_pages*() and now we are converting
get_user_pages*() to the new API as appropriate. [1] & [2] could
be referred for more information. This is case 2 as per document [1].
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com >
Cc: John Hubbard <jhubbard@nvidia.com >
Cc: Bharath Vedartham <linux.bhar@gmail.com >
Cc: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/1593584264-16982-4-git-send-email-jrdr.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:44:26 +02:00
Souptick Joarder
b6d13bd9f2
staging: kpc2000: kpc_dma: Convert set_page_dirty() --> set_page_dirty_lock()
...
First, convert set_page_dirty() to set_page_dirty_lock()
Second, there is an interval in there after set_page_dirty() and
before put_page(), in which the device could be running and setting
pages dirty. Moving set_page_dirty_lock() after dma_unmap_sg().
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com >
Suggested-by: John Hubbard <jhubbard@nvidia.com >
Cc: John Hubbard <jhubbard@nvidia.com >
Cc: Bharath Vedartham <linux.bhar@gmail.com >
Cc: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/1593584264-16982-3-git-send-email-jrdr.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:44:26 +02:00
Souptick Joarder
63ed1e0287
staging: kpc2000: kpc_dma: Unpin partial pinned pages
...
There is a bug, when get_user_pages() failed but partially pinned
pages are not unpinned and positive numbers are returned instead of
-ERRNO. Fixed it.
Also, int is more appropriate type for rv. Changed it.
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com >
Cc: John Hubbard <jhubbard@nvidia.com >
Cc: Dan Carpenter <dan.carpenter@oracle.com >
Cc: Bharath Vedartham <linux.bhar@gmail.com >
Link: https://lore.kernel.org/r/1593584264-16982-2-git-send-email-jrdr.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:44:26 +02:00
Diego Bienz
f9b468a3bd
staging: qlge: qlge.h: remove unnecessary spaces
...
Spaces aren't necessary before function pointer arguments.
Signed-off-by: Diego Bienz <diego.bienz@gmail.com >
Link: https://lore.kernel.org/r/20200630113324.GA10534@diegob-nb
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:43:47 +02:00
David Gow
0a0a66c984
clk: staging: Specify IOMEM dependency for Xilinx Clocking Wizard driver
...
The Xilinx Clocking Wizard driver uses the devm_ioremap_resource
function, but does not specify a dependency on IOMEM in Kconfig. This
causes a build failure on architectures without IOMEM, for example, UML
(notably with make allyesconfig).
Fix this by making CONFIG_COMMON_CLK_XLNX_CLKWZRD depend on CONFIG_IOMEM.
Signed-off-by: David Gow <davidgow@google.com >
Link: https://lore.kernel.org/r/20200630044518.1084468-1-davidgow@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:43:05 +02:00
Brooke Basile
c2532bebba
staging: rtl8188eu: Replace function name with __func__
...
Fix the following checkpatch warning:
WARNING: Prefer using '"%s...", __func__' to using 'rtw_get_bcn_info', this function's name, in a string
Signed-off-by: Brooke Basile <brookebasile@gmail.com >
Link: https://lore.kernel.org/r/20200629173711.5158-1-brookebasile@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:43:05 +02:00
Michael Straube
24fe731062
staging: rtl8712: remove some ieee80211 constants from wifi.h
...
The constants IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL and
IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA are not used in the driver
code and, if ever needed, available from 'include/linux/ieee80211.h'.
Remove them from wifi.h.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20200629171405.7711-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:43:05 +02:00
Michael Straube
07795b9afd
staging: rtl8723bs: remove some ieee80211 constants from wifi.h
...
The constants IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL and
IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA are not used in the driver
code and, if ever needed, available from 'include/linux/ieee80211.h'.
Remove them from wifi.h.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20200629171405.7711-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:43:04 +02:00
Michael Straube
8c97f42ca2
staging: rtl8188eu: remove some ieee80211 constants from wifi.h
...
The constants IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL and
IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA are not used in the driver
code and, if ever needed, available from 'include/linux/ieee80211.h'.
Remove them from wifi.h.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20200629171405.7711-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:43:04 +02:00
Michael Straube
ca00369825
staging: rtl8188eu: add spaces around operators
...
Add spaces around operators to improve readability and clear
checkpatch issues.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20200629161255.28371-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2020-07-01 15:43:04 +02:00