RE: [Xen-devel] [PATCH 29/29] drivers, xen: convert grant_map.users from atomic_t to refcount_t

2017-03-08 Thread Reshetova, Elena
> On 03/08/2017 08:49 AM, Reshetova, Elena wrote: > >> On 03/06/2017 09:21 AM, Elena Reshetova wrote: > >>> refcount_t type and corresponding API should be > >>> used instead of atomic_t when the variable is used as > >>> a reference counter. This allows to avoid accidental > >>> refcounter overfl

RE: [PATCH 22/29] drivers, scsi: convert iscsi_task.refcount from atomic_t to refcount_t

2017-03-08 Thread Reshetova, Elena
> On Mon, Mar 06, 2017 at 04:21:09PM +0200, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to use-after-free > > si

[PATCH 1/2] staging: bcm2835_camera: Convert control_service field of mmal_msg_header to u32

2017-03-08 Thread Michael Zoran
The camera driver passes messages back and forth between the firmware with requests and replies. One of the fields of the message header called control_service is a pointer so the size changes between 32 bit and 64 bit. Luckly, the field is not interperated by the driver, so it can be changed to

[PATCH 0/2] staging: bcm2835_camera: Fix pointer dependency of mmal_msg_header

2017-03-08 Thread Michael Zoran
This is part 1 of what I believe will be a 2 series fix to make the camera driver work for arm64(64 bit). The mmal_msg_header structure has two fields which are pointer dependent(control_service and context). control_service isn't use by the kernel, so it's safe to change to u32. The conte

[PATCH 2/2] staging: bcm2835_camera: Use a mapping table for context field of mmal_msg_header

2017-03-08 Thread Michael Zoran
The camera driver passes messages back and forth between the firmware with requests and replies. One of the fields of the message header called context is a pointer so the size changes between 32 bit and 64 bit. The context field is used to pair reply messages from the firmware with request messa

[PATCH v2 12/12] staging: ks7010: fix checkpatch line over 80

2017-03-08 Thread Tobin C. Harding
Checkpatch emits WARNING: line over 80 characters. Modify the comment without loss of meaning to reduce the length of the line. Clear two warnings with single change. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH v2 07/12] staging: ks7010: reduce level of indentation

2017-03-08 Thread Tobin C. Harding
Indentation may be reduced by inverting if statement conditional and returning. Invert conditional. Return if new conditional evaluates to true. Do not alter program logic. Reduce by one the level of indentation in subsequent code. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_h

[PATCH v2 10/12] staging: ks7010: add variables key, key_index

2017-03-08 Thread Tobin C. Harding
'auth_type - 1' is used as an index into a key table. Adding a variable appropriately named simplifies the code and adds meaning when reading. Adding a pointer variable of type struct *kpa_key_t adds to readability by removing the table access each time the key is used. The key index is used to cr

[PATCH v2 11/12] staging: ks7010: refactor, improve code layout

2017-03-08 Thread Tobin C. Harding
Function hostif_data_indication_wpa() has various sites that can be improved with whitespace refactoring. In particular checkpatch emits WARNING: Avoid multiple line dereference. Also how long lines are broken up may be modified to enhance readability. Checkpatch also emits logical line continuatio

[PATCH v2 09/12] staging: ks7010: add meaningful buffer names

2017-03-08 Thread Tobin C. Harding
Function contains a buffer named 'buf' and another named RecvMIC. Checkpatch emits WARNING: Avoid CamelCase on the symbol name RecvMIC. Since there are two buffers and we need to rename one of them let's give both of them new names in order to add meaning to code and simplify reading. Rename buffe

[PATCH v2 08/12] staging: ks7010: fix spelling of Michael MIC

2017-03-08 Thread Tobin C. Harding
Various symbols are named 'michel*'. The keyed hash function name is spelled 'Michael'. Rename symbols michel -> michael. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 16 drivers/staging/ks7010/michael_mic.c | 8 drivers/staging/ks7010/mi

[PATCH v2 06/12] staging: ks7010: factor out WPA code

2017-03-08 Thread Tobin C. Harding
Function hostif_data_indication() is approx 200 lines long. Function has many local variables. WPA code is contained and may be factored out into a separate function. This will reduce the length and complexity of hostif_data_indication(). At times within the WPA code errors result in the function r

[PATCH v2 05/12] staging: ks7010: remove unnecessary parenthesis

2017-03-08 Thread Tobin C. Harding
Checkpatch emits CHECK: Unnecessary parentheses. Remove unnecessary parentheses. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/st

[PATCH v2 04/12] staging: ks7010: fix spelling mistake

2017-03-08 Thread Tobin C. Harding
Comment contains misspelled work 'Adress'. Correct spelling: Adress -> Address Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.

[PATCH v2 03/12] staging: ks7010: replace C types with kernel types

2017-03-08 Thread Tobin C. Harding
Checkpatch emits CHECK prefer kernel type. Source and header file use C standard types uintN_t. Replace C standard types with kernel types. uintN_t -> uN Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 250 +++--- drivers/staging/ks7010/ks_hostif

[PATCH v2 02/12] staging: ks7010: fix checkpatch CONSTANT_COMPARISON

2017-03-08 Thread Tobin C. Harding
Checkpatch emits WARNING: Comparisons should place the constant on the right side of the test. Move comparison constant to the right side of the test. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d

[PATCH v2 01/12] staging: ks7010: fix checkpatch whitespace warnings

2017-03-08 Thread Tobin C. Harding
Checkpatch emits various warnings/errors pointing to misplaced spaces. - trailing whitespace - please, no spaces at the start of a line - please, no space before tabs - Unnecessary space before function pointer arguments - unnecessary whitespace before a quoted newline - code indent should use tab

[PATCH v2 00/12] refactor hostif_data_indication()

2017-03-08 Thread Tobin C. Harding
Checkpatch emits a bunch of checkpatch warnings, errors and checks when parsing ks_hostif.c and ks_hostif.h. We can remove a number of these by refactoring hostif_data_indication(). Function contains a chunk of code for handling WPA, this is a good target for refactoring. The First five patches of

[PATCH] net: hyperv: use new api ethtool_{get|set}_link_ksettings

2017-03-08 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/hyperv/netvsc_drv.c | 39 +---

[v6 1/8] bus: fsl-mc: dpio: add DPIO driver overview document

2017-03-08 Thread Roy Pledge
From: Stuart Yoder add document describing the dpio driver and it's role, components and major interfaces Signed-off-by: Stuart Yoder --- drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt | 135 +++ 1 file changed, 135 insertions(+) create mode 100644 drivers/staging/fsl-mc

[v6 3/8] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs

2017-03-08 Thread Roy Pledge
From: Roy Pledge Add global definitions for DPAA2 frame descriptors and scatter gather entries. Signed-off-by: Roy Pledge Signed-off-by: Stuart Yoder --- drivers/staging/fsl-mc/include/dpaa2-fd.h | 448 + 1 file changed, 448 insertions(+) create mode 100644 drive

[v6 6/8] bus: fsl-mc: dpio: add the DPAA2 DPIO service interface

2017-03-08 Thread Roy Pledge
From: Roy Pledge The DPIO service interface handles initialization of DPIO objects and exports APIs to be used by other DPAA2 object drivers to perform queuing and buffer management related operations. The service allows registration of callbacks when frames or notifications are received. Signe

[v6 5/8] bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2

2017-03-08 Thread Roy Pledge
From: Roy Pledge Add QBman APIs for frame queue and buffer pool operations. Signed-off-by: Roy Pledge Signed-off-by: Haiying Wang Signed-off-by: Stuart Yoder --- drivers/staging/fsl-mc/bus/dpio/Makefile |2 +- drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 1033 ++

[v6 8/8] bus: fsl-mc: dpio: add maintainer for DPIO

2017-03-08 Thread Roy Pledge
From: Roy Pledge add Roy Pledge as maintainer of DPIO Signed-off-by: Roy Pledge Signed-off-by: Stuart Yoder --- MAINTAINERS |6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6e06cf4..9c85028 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4040,6 +4040

[v6 2/8] bus: fsl-mc: dpio: add APIs for DPIO objects

2017-03-08 Thread Roy Pledge
From: Ioana Radulescu Add the command build/parse APIs for operating on DPIO objects through the DPAA2 Management Complex. Signed-off-by: Ioana Radulescu Signed-off-by: Roy Pledge Signed-off-by: Stuart Yoder --- drivers/staging/fsl-mc/bus/Kconfig | 10 ++ drivers/staging/fsl-mc/bus

[v6 7/8] bus: fsl-mc: dpio: add the DPAA2 DPIO object driver

2017-03-08 Thread Roy Pledge
The DPIO driver registers with the fsl-mc bus to handle bus-related events for DPIO objects. Key responsibility is mapping I/O regions, setting up interrupt handlers, and calling the DPIO service initialization during probe. Signed-off-by: Roy Pledge Signed-off-by: Haiying Wang Signed-off-by: S

[v6 4/8] bus: fsl-mc: dpio: add global dpaa2 definitions

2017-03-08 Thread Roy Pledge
From: Roy Pledge Create header for global dpaa2 definitions. Add definitions for dequeue results. Signed-off-by: Roy Pledge Signed-off-by: Stuart Yoder --- drivers/staging/fsl-mc/include/dpaa2-global.h | 202 + 1 file changed, 202 insertions(+) create mode 100644 dr

[v6 0/8] staging: fsl-mc: add dpio driver

2017-03-08 Thread Roy Pledge
This patch series adds the driver for the DPIO object which is a step to addressing the final item in the staging TODO list-- adding a functional driver on top of the bus driver. The DPIO driver is a dependency for other functional drivers such as Ethernet. An overview of the DPIO object and d

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-08 Thread Tobin C. Harding
On Wed, Mar 08, 2017 at 02:32:53PM +0300, Dan Carpenter wrote: > On Wed, Mar 08, 2017 at 08:39:28PM +1100, Tobin C. Harding wrote: > > Hope that is not an amazing amount of nit picking for no good reason. > > > > It basically is. ;) rofl, just call me Pedantic T thanks, Tobin _

[PATCH] Staging: fbtft: fbtft-bus.c: checkpatch error

2017-03-08 Thread Manoj Sawai
Fixes a checkpatch error. "ERROR: space prohibited before that close parenthesis ')'" Signed-off-by: Manoj Sawai --- drivers/staging/fbtft/fbtft-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c i

[PATCH 2/2] Staging: xgifb: XGI_main_26.c: non-standard C

2017-03-08 Thread Manoj Sawai
Fixed a checkpatch warning about use of %Lx instead of %llx. Signed-off-by: Manoj Sawai --- drivers/staging/xgifb/XGI_main_26.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 7a181ed88094..5

[PATCH 1/2] Staging: xgifb: XGI_main_26.c: non-standard C

2017-03-08 Thread Manoj Sawai
Fixed a checkpatch warning about use of %Lx instead of %llx. Signed-off-by: Manoj Sawai --- drivers/staging/xgifb/XGI_main_26.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 69ed137337ce..7a181

[PATCH 2/2] Staging: xgifb: XGI_main_26.c: non-standard C

2017-03-08 Thread Manoj Sawai
Fixed a checkpatch warning about use of %Lx instead of %llx. Signed-off-by: Manoj Sawai --- drivers/staging/xgifb/XGI_main_26.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 7a181ed88094..5

[PATCH 1/2] Staging: xgifb: XGI_main_26.c: non-standard C

2017-03-08 Thread Manoj Sawai
Fixed a checkpatch warning about use of %Lx instead of %llx. Signed-off-by: Manoj Sawai --- drivers/staging/xgifb/XGI_main_26.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 69ed137337ce..7a181

Re: [PATCH 22/29] drivers, scsi: convert iscsi_task.refcount from atomic_t to refcount_t

2017-03-08 Thread Chris Leech
On Mon, Mar 06, 2017 at 04:21:09PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. >

[PATCH 09/11] staging: comedi: jr3_pci: check PCI BAR 0 size

2017-03-08 Thread Ian Abbott
The various supported boards have different numbers of subdevices from 1 to 4. Each subdevice needs a block of registers in PCI BAR 0. Check the region is large enough for the required number of subdevices. Return an error from `jr3_pci_auto_attach()` if it is too small. Signed-off-by: Ian Abbot

[PATCH 08/11] staging: comedi: jr3_pci: check sizes at compile time

2017-03-08 Thread Ian Abbott
The driver currently checks the size of `struct jr3_sensor` is correct when a device is attached, returning an error if it is wrong. Replace that with a compile-time check. We don't care too much about the size of `struct jr3_sensor` as it is embedded in the larger `struct jr3_block` and is follo

[PATCH 07/11] staging: comedi: jr3_pci: omit pointless debug info

2017-03-08 Thread Ian Abbott
`jr3_pci_open()` outputs several debug log messages containing serial numbers of the sensors (one per subdevice) along with a pointer to the subdevice private data structure. The latter is of no use, so reformat the debug log to omit it. `jr3_pci_alloc_spriv()` outputs a debug log message contain

[PATCH 10/11] staging: comedi: jr3_pci: fix initial range[8] max value

2017-03-08 Thread Ian Abbott
`jr3_pci_alloc_spriv()` initializes `spriv->range[8]` to use a maximum value of 65536, but that will be overwritten with 65535 at a later time by `jr3_pci_poll_subdevice()` once the "set full scales" command is complete. The initial setting looks like a mistake. This range is only associated with

[PATCH 11/11] staging: comedi: jr3_pci: change module description

2017-03-08 Thread Ian Abbott
Change the MODULE_DESCRIPTION string from the generic "Comedi low-level driver" to the more specific "Comedi driver for JR3/PCI force sensor board". Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/jr3_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/

[PATCH 02/11] staging: comedi: jr3_pci: rename channel to sensor

2017-03-08 Thread Ian Abbott
The driver overloads the term "channel" a lot. To help reduce confusion, rename the `channel` member of `struct jr3_pci_subdev_private` to `sensor` as it points to a `struct jr3_sensor`. Also rename the various function parameters and local variables called `channel` that point to a `struct jr3_s

[PATCH 06/11] staging: comedi: jr3_pci: use struct jr3_block instead of jr3_t

2017-03-08 Thread Ian Abbott
`struct jr3_t` contains a single array member `block` of member type `struct jr3_block`. Rather than using pointers to `struct jr3_t`, just use pointers to `struct jr3_block` instead and treat it as an array. Replace the local variables `struct jr3_t __iomem *iobase` with `struct jr3_block __iomem

[PATCH 04/11] staging: comedi: jr3_pci: rename 'channel' to 'block'

2017-03-08 Thread Ian Abbott
The term "channel" is overloaded in this driver. Rename the `channel` member of `struct jr3_t` to `block` to reduce confusion. `block` is an array of an anonymous `struct` type, with each element covering the registers for one subdevice. Signed-off-by: Ian Abbott --- drivers/staging/comedi/dri

[PATCH 03/11] staging: comedi: jr3_pci: rename data to sensor

2017-03-08 Thread Ian Abbott
Rename the `channel[x].data` member of `struct jr3_t` to `channel[x].sensor` to match its type `struct jr3_sensor`. Also rename local variable `ch0data` in `jr3_pci_show_copyright()` to `sensor0` for consistency. It points to the `struct jr3_sensor` embedded in the registers for "channel" 0. Sig

[PATCH 05/11] staging: comedi: jr3_pci: separate out block type

2017-03-08 Thread Ian Abbott
`struct jr3_t` contains a single array member `block` of a tag-less `struct` type. Rename the tag-less `struct` type to `struct jr3_block` and move its definition outside of `struct jr3_t`. This will allow us to use pointers of this type. Signed-off-by: Ian Abbott --- drivers/staging/comedi/dr

[PATCH 01/11] staging: comedi: jr3_pci: rename struct jr3_channel to jr3_sensor

2017-03-08 Thread Ian Abbott
The driver overloads the term "channel" a lot. To help reduce confusion, rename `struct jr3_channel` to `struct jr3_sensor`. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/jr3_pci.c | 28 ++-- drivers/staging/comedi/drivers/jr3_pci.h | 4 ++-- 2 files chan

[PATCH 00/11] staging: comedi: jr3_pci: more tidy-ups and stuff

2017-03-08 Thread Ian Abbott
Another series of patches for the "jr3_pci" driver. Patches 01 to 06 reorganize and rename various types, parameters, and variables to avoid overloading the term "channel" (reserving it to refer to a Comedi channel), and to simplify the code slightly. Patch 07 changes some debug logs to reduce cl

[PATCH 2/2] staging: comedi: ni_atmio: make device_ids const

2017-03-08 Thread Ian Abbott
The `device_ids[]` passed to `MODULE_DEVICE_TABLE()` should be `const`. When the "ni_atmio" driver is built-in, gcc warns about `device_ids` being defined but ununsed. Make it `const`. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_atmio.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH 1/2] staging: comedi: allow it to be built-in

2017-03-08 Thread Ian Abbott
There is no particular reason why comedi has to be built as kernel modules. Remove the `depends on m` from the Kconfig file to allow it to be built-in. Signed-off-by: Ian Abbott --- drivers/staging/comedi/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/comedi/Kconfig

[PATCH 0/2] staging: comedi: support building into kernel

2017-03-08 Thread Ian Abbott
Allow Comedi modules to be built into the kernel because why not? Patch 2 fixes a (mostly?) harmless compiler warning in the "ni_atmio" driver that occurs when it is built-in. 1) staging: comedi: allow it to be built-in 2) staging: comedi: ni_atmio: make device_ids const drivers/staging/comedi/

Re: [Xen-devel] [PATCH 29/29] drivers, xen: convert grant_map.users from atomic_t to refcount_t

2017-03-08 Thread Boris Ostrovsky
On 03/08/2017 08:49 AM, Reshetova, Elena wrote: >> On 03/06/2017 09:21 AM, Elena Reshetova wrote: >>> refcount_t type and corresponding API should be >>> used instead of atomic_t when the variable is used as >>> a reference counter. This allows to avoid accidental >>> refcounter overflows that migh

Re: [PATCH v2 2/2] Staging: comedi: comedi_fops: Fix "out of minor numbers for board device files"

2017-03-08 Thread Cheah Kok Cheong
Dear Ian, Thanks for taking the time to reply. On Wed, Mar 08, 2017 at 12:36:41PM +, Ian Abbott wrote: > On 07/03/17 18:13, Cheah Kok Cheong wrote: > >If comedi module is loaded with the following max allowed parameter > >[comedi_num_legacy_minors=48], subsequent loading of an auto-configure

Re: [PATCH 2/2] Staging: comedi: comedi_fops: Fix "out of minor numbers for board device files"

2017-03-08 Thread Cheah Kok Cheong
Dear Ian, Thanks for taking the trouble to reply. On Wed, Mar 08, 2017 at 11:13:49AM +, Ian Abbott wrote: > On 08/03/17 10:08, Cheah Kok Cheong wrote: > >Dear Dan, > > Thanks for reviewing this patch. > > > >On Wed, Mar 08, 2017 at 08:54:47AM +0300, Dan Carpenter wrote: > >>On Sun, Mar 05,

Re: [RFC PATCH v2 02/32] x86: Secure Encrypted Virtualization (SEV) support

2017-03-08 Thread Borislav Petkov
On Thu, Mar 02, 2017 at 10:12:20AM -0500, Brijesh Singh wrote: > From: Tom Lendacky > > Provide support for Secure Encyrpted Virtualization (SEV). This initial > support defines a flag that is used by the kernel to determine if it is > running with SEV active. > > Signed-off-by: Tom Lendacky >

Re: [PATCH 2/2] Staging: comedi: comedi_fops: Fix "out of minor numbers for board device files"

2017-03-08 Thread Ian Abbott
On 08/03/17 10:08, Cheah Kok Cheong wrote: Dear Dan, Thanks for reviewing this patch. On Wed, Mar 08, 2017 at 08:54:47AM +0300, Dan Carpenter wrote: On Sun, Mar 05, 2017 at 03:22:33AM +0800, Cheah Kok Cheong wrote: If comedi module is loaded with the following max allowed parameter [comedi_n

Re: [PATCH] staging: bcm2835-camera: Remove explicit cache flush operations

2017-03-08 Thread Dave Stevenson
On 8 March 2017 at 13:46, Michael Zoran wrote: > On Wed, 2017-03-08 at 13:19 +, Dave Stevenson wrote: > > Hi Michael. > > The original issue was on Pi1 with H264 or MJPEG streams. Buffer sizes were > small enough to fit in the L1 cache and the relevant sections weren't being > flushed. The res

Re: [PATCH 21/29] drivers, s390: convert fc_fcp_pkt.ref_cnt from atomic_t to refcount_t

2017-03-08 Thread Johannes Thumshirn
On 03/08/2017 02:48 PM, Reshetova, Elena wrote: On 03/06/2017 03:21 PM, Elena Reshetova wrote: refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-af

RE: [Xen-devel] [PATCH 29/29] drivers, xen: convert grant_map.users from atomic_t to refcount_t

2017-03-08 Thread Reshetova, Elena
> On 03/06/2017 09:21 AM, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to use-after-free > > situations. > > > >

RE: [PATCH 21/29] drivers, s390: convert fc_fcp_pkt.ref_cnt from atomic_t to refcount_t

2017-03-08 Thread Reshetova, Elena
> On 03/06/2017 03:21 PM, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to use-after-free > > situations. > > The

Re: [PATCH 6/6] staging: comedi: Using macro DIV_ROUND_UP

2017-03-08 Thread Ian Abbott
On 21/02/17 18:28, simran singhal wrote: The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This occurence was detected using the coccinelle script: @@ expression e1; expression e2; @@ ( - ((e1) + e2 - 1) / (e2) + DIV_ROUND_UP(e1,e2) |

Re: [PATCH] staging: nvec: Remove unnecessary cast on void pointer

2017-03-08 Thread Thierry Reding
On Fri, Mar 03, 2017 at 01:45:11AM +0530, simran singhal wrote: > The following Coccinelle script was used to detect this: > > @r@ > expression x; > void* e; > type T; > identifier f; > @@ > ( > *((T *)e) > | > ((T *)x)[...] > | > ((T*)x)->f > | > - (T*) > e > ) > > Signed-off-by: simran

Re: [Outreachy kernel] [PATCH] staging: nvec: cleanup USLEEP_RANGEcheckpatch checks

2017-03-08 Thread Thierry Reding
On Thu, Mar 02, 2017 at 03:57:01PM +0100, Marc Dietrich wrote: > Hi Simran, > > Am Donnerstag, 2. März 2017, 15:48:13 CET schrieb SIMRAN SINGHAL: > > On Thursday, March 2, 2017 at 8:06:40 PM UTC+5:30, Julia Lawall wrote: > > > On Thu, 2 Mar 2017, simran singhal wrote: > > > > Resolve strict checkp

Re: [PATCH v2 2/2] Staging: comedi: comedi_fops: Fix "out of minor numbers for board device files"

2017-03-08 Thread Ian Abbott
On 07/03/17 18:13, Cheah Kok Cheong wrote: If comedi module is loaded with the following max allowed parameter [comedi_num_legacy_minors=48], subsequent loading of an auto-configured device will fail at auto-configuration. If there's no fall back in place then module loading will fail. In this c

[PATCH] staging: bcm2835-camera: Remove explicit cache flush operations

2017-03-08 Thread Michael Zoran
The camera code has an explicit cache flush operation which is not portable. Now that vc04_services is using portable DMA APIs that already do the cache flushing, explicit flushes should no longer be needed. The one call to __cpuc_flush_dcache_area has been removed. Testing: The offical

Re: [PATCH v2 1/2] Staging: comedi: comedi_fops: Change comedi_num_legacy_minors type

2017-03-08 Thread Ian Abbott
On 07/03/17 18:13, Cheah Kok Cheong wrote: Change to unsigned to allow removal of negative value check in init section. Use smaller data type since the max possible value currently is 48. Signed-off-by: Cheah Kok Cheong --- V2: -No changes. drivers/staging/comedi/comedi_fops.c | 7 +++ 1

Re: [PATCH 08/12] staging: ks7010: fix spelling of Michael MIC

2017-03-08 Thread Dan Carpenter
On Wed, Mar 08, 2017 at 07:44:41PM +1100, Tobin C. Harding wrote: > On Wed, Mar 08, 2017 at 08:54:39AM +0300, Dan Carpenter wrote: > > On Wed, Mar 08, 2017 at 02:36:53PM +1100, Tobin C. Harding wrote: > > > Various symbols are named 'michel*'. The keyed hash function name is > > > spelled 'Michael'

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-08 Thread Dan Carpenter
On Wed, Mar 08, 2017 at 08:39:28PM +1100, Tobin C. Harding wrote: > Hope that is not an amazing amount of nit picking for no good reason. > It basically is. ;) regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverde

Re: [RFC PATCH v2 10/32] x86: DMA support for SEV memory encryption

2017-03-08 Thread Borislav Petkov
On Thu, Mar 02, 2017 at 10:14:25AM -0500, Brijesh Singh wrote: > From: Tom Lendacky > > DMA access to memory mapped as encrypted while SEV is active can not be > encrypted during device write or decrypted during device read. In order > for DMA to properly work when SEV is active, the swiotlb boun

Re: [PATCH v1 3/3] staging: comedi: Replace "is is" with "is"

2017-03-08 Thread Ian Abbott
On 04/03/17 17:41, simran singhal wrote: This patch replace "is is " with "is". The replacement couldn't be automated because sometimes the first "is" was meant to be another word. Signed-off-by: simran singhal Acked-by: Julia Lawall --- drivers/staging/comedi/drivers/ni_usb6501.c | 2 +- 1 f

Re: [Outreachy kernel] [PATCH 1/3] staging: rtl8192u: Replace "is is" with "is"

2017-03-08 Thread Ian Abbott
On 04/03/17 16:18, Julia Lawall wrote: On Sat, 4 Mar 2017, simran singhal wrote: This patch replace "is is " with "is". The replacement couldn't be automated because sometimes the first "is" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/rtl8192u/r819xU_cmd

Re: [PATCH 08/29] drivers, md: convert mddev.active from atomic_t to refcount_t

2017-03-08 Thread gre...@linuxfoundation.org
On Wed, Mar 08, 2017 at 09:42:09AM +, Reshetova, Elena wrote: > > On Mon, Mar 06, 2017 at 04:20:55PM +0200, Elena Reshetova wrote: > > > refcount_t type and corresponding API should be > > > used instead of atomic_t when the variable is used as > > > a reference counter. This allows to avoid ac

[PATCH] staging: android: ashmem: lseek failed due to no FMODE_LSEEK.

2017-03-08 Thread zhangshuxiaomi
From: zhangshuxiao vfs_llseek will check whether the file mode has FMODE_LSEEK, no return failure. But ashmem can be lseek, so add FMODE_LSEEK to ashmem file. Signed-off-by: zhangshuxiao --- drivers/staging/android/ashmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/an

Re: [PATCH 1/2] Staging: comedi: comedi_fops: Change comedi_num_legacy_minors type

2017-03-08 Thread Cheah Kok Cheong
On Wed, Mar 08, 2017 at 10:45:26AM +0100, Greg KH wrote: > On Wed, Mar 08, 2017 at 05:38:12PM +0800, Cheah Kok Cheong wrote: > > Dear Greg, > > Thanks for taking the time to review. > > > > On Tue, Mar 07, 2017 at 08:01:38PM +0100, Greg KH wrote: > > > On Sun, Mar 05, 2017 at 03:22:32AM +0800, C

[PATCH] staging: android: ashmem: lseek failed due to no FMODE_LSEEK.

2017-03-08 Thread zhangshuxiaomi
From: zhangshuxiao vfs_llseek will check whether the file mode has FMODE_LSEEK, no return failure. But ashmem can be lseek, so add FMODE_LSEEK to ashmem file. Signed-off-by: zhangshuxiao --- drivers/staging/android/ashmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/an

Re: [PATCH 2/2] Staging: comedi: comedi_fops: Fix "out of minor numbers for board device files"

2017-03-08 Thread Cheah Kok Cheong
Dear Dan, Thanks for reviewing this patch. On Wed, Mar 08, 2017 at 08:54:47AM +0300, Dan Carpenter wrote: > On Sun, Mar 05, 2017 at 03:22:33AM +0800, Cheah Kok Cheong wrote: > > If comedi module is loaded with the following max allowed parameter > > [comedi_num_legacy_minors=48], subsequent load

Re: [PATCH 1/2] Staging: comedi: comedi_fops: Change comedi_num_legacy_minors type

2017-03-08 Thread Greg KH
On Wed, Mar 08, 2017 at 05:38:12PM +0800, Cheah Kok Cheong wrote: > Dear Greg, > Thanks for taking the time to review. > > On Tue, Mar 07, 2017 at 08:01:38PM +0100, Greg KH wrote: > > On Sun, Mar 05, 2017 at 03:22:32AM +0800, Cheah Kok Cheong wrote: > > > Change to unsigned to allow removal of n

RE: [PATCH 08/29] drivers, md: convert mddev.active from atomic_t to refcount_t

2017-03-08 Thread Reshetova, Elena
> On Mon, Mar 06, 2017 at 04:20:55PM +0200, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to use-after-free > > si

RE: [PATCH 10/29] drivers, md: convert stripe_head.count from atomic_t to refcount_t

2017-03-08 Thread Reshetova, Elena
> On Mon, Mar 06, 2017 at 04:20:57PM +0200, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to use-after-free > > si

Re: [PATCH 1/4] staging: dgnc: audit goto's in dgnc_driver

2017-03-08 Thread Tobin C. Harding
> X-Mailer: Mutt 1.5.24 (2015-08-30) On Wed, Mar 08, 2017 at 12:22:46AM +0300, Dan Carpenter wrote: > On Wed, Mar 08, 2017 at 08:06:31AM +1100, Tobin C. Harding wrote: > > On Tue, Mar 07, 2017 at 08:03:51PM +0300, Dan Carpenter wrote: > > > On Tue, Mar 07, 2017 at 05:33:06PM +1100, Tobin C. Hardin

Re: [PATCH 1/2] Staging: comedi: comedi_fops: Change comedi_num_legacy_minors type

2017-03-08 Thread Cheah Kok Cheong
Dear Greg, Thanks for taking the time to review. On Tue, Mar 07, 2017 at 08:01:38PM +0100, Greg KH wrote: > On Sun, Mar 05, 2017 at 03:22:32AM +0800, Cheah Kok Cheong wrote: > > Change to unsigned to allow removal of negative value check in > > init section. > > Why? > User can input a -ve nu

Re: [RFC PATCH v2 09/32] x86: Change early_ioremap to early_memremap for BOOT data

2017-03-08 Thread Borislav Petkov
On Thu, Mar 02, 2017 at 10:13:53AM -0500, Brijesh Singh wrote: > From: Tom Lendacky > > In order to map BOOT data with the proper encryption bit, the Btw, what does that all-caps spelling "BOOT" denote? Something I'm missing? > early_ioremap() function calls are changed to early_memremap() call

Re: [PATCH 08/12] staging: ks7010: fix spelling of Michael MIC

2017-03-08 Thread Tobin C. Harding
On Wed, Mar 08, 2017 at 08:54:39AM +0300, Dan Carpenter wrote: > On Wed, Mar 08, 2017 at 02:36:53PM +1100, Tobin C. Harding wrote: > > Various symbols are named 'michel*'. The keyed hash function name is > > spelled 'Michael'. > > > > Rename symbols michel -> michael. > > > > Signed-off-by: Tobin

Re: [PATCH v2] staging: wilc1000: Fix sparse warnings incorrect type assignment

2017-03-08 Thread Andrea Ghittino
Thank you for your time regard, andrea On Wed, Mar 8, 2017 at 7:22 AM, Dan Carpenter wrote: > I think this change is buggy. > > On Tue, Mar 07, 2017 at 10:36:53PM +0100, Andrea Ghittino wrote: >> Fixed sparse warnings related to the conversion of le16 and le32 to u16 and >> u32, during the upda

[PATCH, RESEND] staging: octeon: remove unused variable

2017-03-08 Thread Arnd Bergmann
A cleanup patch left one local variable without a reference: drivers/staging/octeon/ethernet-rx.c:339:28: warning: unused variable 'priv' [-Wunused-variable] This removes the declaration too. Fixes: 66812da3a689 ("staging: octeon: Use net_device_stats from struct net_device") Signed-off-by: Ar