Re: [PATCH 02/22] nvmet: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
On 13/04/17 10:59 PM, Christoph Hellwig wrote: > On Thu, Apr 13, 2017 at 04:05:15PM -0600, Logan Gunthorpe wrote: >> This is a straight forward conversion in two places. Should kmap fail, >> the code will return an INVALD_DATA error in the completion. > > It really should be using nvmet_copy_fro

Re: [PATCH 02/22] nvmet: Make use of the new sg_map helper function

2017-04-13 Thread Christoph Hellwig
On Thu, Apr 13, 2017 at 11:06:16PM -0600, Logan Gunthorpe wrote: > Or maybe I'll just send a patch for that > separately seeing it doesn't depend on anything and is pretty simple. I > can do that next week. Yes, please just send that patch linux-nvme, we should be able to get it into 4.12. ___

Re: [PATCH 02/22] nvmet: Make use of the new sg_map helper function

2017-04-13 Thread Christoph Hellwig
On Thu, Apr 13, 2017 at 04:05:15PM -0600, Logan Gunthorpe wrote: > This is a straight forward conversion in two places. Should kmap fail, > the code will return an INVALD_DATA error in the completion. It really should be using nvmet_copy_from_sgl to make things safer, as we don't want to rely on a

RE: [PATCH] scsi: storvsc: remove return at end of void function

2017-04-13 Thread KY Srinivasan
> -Original Message- > From: Miguel Bernal Marin [mailto:miguel.bernal.ma...@linux.intel.com] > Sent: Thursday, March 16, 2017 12:00 AM > To: KY Srinivasan ; Martin K. Petersen > > Cc: linux-ker...@vger.kernel.org; linux-s...@vger.kernel.org; > de...@linuxdriverproject.org; Haiyang Zhang

RE: [PATCH] scsi: storvsc: Prefer kcalloc over kzalloc with multiply

2017-04-13 Thread KY Srinivasan
> -Original Message- > From: Miguel Bernal Marin [mailto:miguel.bernal.ma...@linux.intel.com] > Sent: Wednesday, March 15, 2017 11:58 PM > To: KY Srinivasan ; Martin K. Petersen > > Cc: linux-ker...@vger.kernel.org; linux-s...@vger.kernel.org; > de...@linuxdriverproject.org; Haiyang Zhan

[PATCH 01/22] scatterlist: Introduce sg_map helper functions

2017-04-13 Thread Logan Gunthorpe
This patch introduces functions which kmap the pages inside an sgl. Two variants are provided: one if an offset is required and one if the offset is zero. These functions replace a common pattern of kmap(sg_page(sg)) that is used in about 50 places within the kernel. The motivation for this work i

[PATCH 04/22] target: Make use of the new sg_map function at 16 call sites

2017-04-13 Thread Logan Gunthorpe
Fairly straightforward conversions in all spots. In a couple of cases any error gets propogated up should sg_map fail. In other cases a warning is issued if the kmap fails seeing there's no clear error path. This should not be an issue until someone tries to use unmappable memory in the sgl with th

[PATCH 15/22] scsi: libfc, csiostor: Change to sg_copy_buffer in two drivers

2017-04-13 Thread Logan Gunthorpe
These two drivers appear to duplicate the functionality of sg_copy_buffer. So we clean them up to use the common code. This helps us remove a couple of instances that would otherwise be slightly tricky sg_map usages. Signed-off-by: Logan Gunthorpe --- drivers/scsi/csiostor/csio_scsi.c | 54 +++-

[PATCH 21/22] mmc: tifm_sd: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
This conversion is a bit complicated. We modiy the read_fifo, write_fifo and copy_page functions to take a scatterlist instead of a page. Thus we can use sg_map instead of kmap_atomic. There's a bit of accounting that needed to be done for the offset for this to work. (Seeing sg_map takes care of t

[PATCH 10/22] staging: unisys: visorbus: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion to the new function. Signed-off-by: Logan Gunthorpe --- drivers/staging/unisys/visorhba/visorhba_main.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/v

[PATCH 07/22] crypto: shash, caam: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion to the new function in two crypto drivers. Signed-off-by: Logan Gunthorpe --- crypto/shash.c| 9 ++--- drivers/crypto/caam/caamalg.c | 8 +++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/crypto/shash.c b/crypto/shash.c in

[PATCH 02/22] nvmet: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
This is a straight forward conversion in two places. Should kmap fail, the code will return an INVALD_DATA error in the completion. Signed-off-by: Logan Gunthorpe --- drivers/nvme/target/fabrics-cmd.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/n

[PATCH 18/22] mmc: spi: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
We use the sg_map helper but it's slightly more complicated as we only check for the error when the mapping actually gets used. Such that if the mapping failed but wasn't needed then no error occurs. Signed-off-by: Logan Gunthorpe --- drivers/mmc/host/mmc_spi.c | 26 +++--- 1

[PATCH 14/22] scsi: arcmsr, ips, megaraid: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion of three scsi drivers Signed-off-by: Logan Gunthorpe --- drivers/scsi/arcmsr/arcmsr_hba.c | 16 drivers/scsi/ips.c | 8 drivers/scsi/megaraid.c | 9 +++-- 3 files changed, 23 insertions(+), 10 deletions(-) di

[PATCH 17/22] mmc: sdhci: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion, except due to the lack of error path we have to WARN if the memory in the SGL is not mappable. Signed-off-by: Logan Gunthorpe --- drivers/mmc/host/sdhci.c | 35 ++- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/drivers/

[PATCH 22/22] memstick: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion, but we have to WARN if unmappable memory finds its way into the sgl. Signed-off-by: Logan Gunthorpe --- drivers/memstick/host/jmb38x_ms.c | 23 ++- drivers/memstick/host/tifm_ms.c | 22 +- 2 files changed, 35 insertions(+), 10

[PATCH 00/22] Introduce common scatterlist map function

2017-04-13 Thread Logan Gunthorpe
Hi Everyone, As part of my effort to enable P2P DMA transactions with PCI cards, we've identified the need to be able to safely put IO memory into scatterlists (and eventually other spots). This probably involves a conversion from struct page to pfn_t but that migration is a ways off and those dec

[PATCH 16/22] xen-blkfront: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion to the new helper, except due to the lack of error path, we have to warn if unmapable memory is ever present in the sgl. Signed-off-by: Logan Gunthorpe --- drivers/block/xen-blkfront.c | 33 +++-- 1 file changed, 27 insertions(+), 6 deletion

[PATCH 20/22] mmc: sdricoh_cs: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
This is a straightforward conversion to the new function. Signed-off-by: Logan Gunthorpe --- drivers/mmc/host/sdricoh_cs.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdricoh_cs.c b/drivers/mmc/host/sdricoh_cs.c index 5ff26ab..7eeed23 10064

[PATCH 12/22] scsi: ipr, pmcraid, isci: Make use of the new sg_map helper in 4 call sites

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion of three scsi drivers. Signed-off-by: Logan Gunthorpe --- drivers/scsi/ipr.c | 27 ++- drivers/scsi/isci/request.c | 42 +- drivers/scsi/pmcraid.c | 19 --- 3 files chang

[PATCH 05/22] drm/i915: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
This is a single straightforward conversion from kmap to sg_map. Signed-off-by: Logan Gunthorpe --- drivers/gpu/drm/i915/i915_gem.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c

[PATCH 08/22] crypto: chcr: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
The get_page in this area looks *highly* suspect due to there being no corresponding put_page. However, I've left that as is to avoid breaking things. I've also removed the KMAP_ATOMIC_ARGS check as it appears to be dead code that dates back to when it was first committed... Signed-off-by: Logan

[PATCH 09/22] dm-crypt: Make use of the new sg_map helper in 4 call sites

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion to the new function in all four spots. Signed-off-by: Logan Gunthorpe --- drivers/md/dm-crypt.c | 38 +- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 389a363

[PATCH 11/22] RDS: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion except there's no error path, so we WARN if the sg_map fails. Signed-off-by: Logan Gunthorpe --- net/rds/ib_recv.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c index e10624a..7f8fa99 100644

[PATCH 06/22] crypto: hifn_795x: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Conversion of a couple kmap_atomic instances to the sg_map helper function. However, it looks like there was a bug in the original code: the source scatter lists offset (t->offset) was passed to ablkcipher_get which added it to the destination address. This doesn't make a lot of sense, but t->offs

[PATCH 03/22] libiscsi: Make use of new the sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Convert the kmap and kmap_atomic uses to the sg_map function. We now store the flags for the kmap instead of a boolean to indicate atomicitiy. We also propogate a possible kmap error down and create a new ISCSI_TCP_INTERNAL_ERR error type for this. Signed-off-by: Logan Gunthorpe --- drivers/scsi

[PATCH 19/22] mmc: tmio: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion to sg_map helper. A couple paths will WARN if the memory does not end up being mappable. Signed-off-by: Logan Gunthorpe --- drivers/mmc/host/tmio_mmc.h | 12 ++-- drivers/mmc/host/tmio_mmc_dma.c | 5 + drivers/mmc/host/tmio_mmc_pio.c | 24 +

[PATCH 13/22] scsi: hisi_sas, mvsas, gdth: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion of three scsi drivers. Signed-off-by: Logan Gunthorpe --- drivers/scsi/gdth.c| 9 +++-- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 14 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 13 + drivers/scsi/mvsas/mv_sas.c

Re: [Bug] VCHIQ functional test broken

2017-04-13 Thread Russell King - ARM Linux
On Thu, Apr 13, 2017 at 07:41:48PM +0200, Stefan Wahren wrote: > > Stefan Wahren hat am 11. April 2017 um 20:10 > > geschrieben: > > > > > > Hi, > > > > recently i found that vchiq_test -f doesn't work anymore with current > > mainline (4.11-rc6) and linux-next (20170404) on my Raspberry Pi Z

Personal

2017-04-13 Thread Ashraf Basit
Good day. I know we have not met before or have any prior contact with each other but this is very important and I am hoping that you can at least take your time to read my message carefully. My name is Ashraf Basit, I am contacting you from the crisis torn country of Syria. I am contacting you

Re: [Bug] VCHIQ functional test broken

2017-04-13 Thread Stefan Wahren
> Stefan Wahren hat am 11. April 2017 um 20:10 > geschrieben: > > > Hi, > > recently i found that vchiq_test -f doesn't work anymore with current > mainline (4.11-rc6) and linux-next (20170404) on my Raspberry Pi Zero. The > issue is always reproducible, but the error behavior isn't determin

Re: [PATCH 40/40] media: imx: set and propagate empty field, colorimetry params

2017-04-13 Thread Steve Longerbeam
On 04/13/2017 03:09 AM, Philipp Zabel wrote: Hi Steve, thanks for cleaning this up. Apart from the comments below, this looks good to me. On Wed, 2017-04-12 at 17:45 -0700, Steve Longerbeam wrote: This patch adds a call to imx_media_fill_empty_mbus_fields() in the *_try_fmt() functions at th

[PATCH] staging: rtl8723bs: clean up identical code on an if statement

2017-04-13 Thread Colin King
From: Colin Ian King The two different paths for an if statement are identical and hence we can just replace it with the single statement. Detected by CoverityScan, CID#1428443 ("Identical code for different branches") Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/core/rtw_mlme.

[PATCH] staging: rtl8723bs: remove redundant comparisons of unsigned ints with >= 0

2017-04-13 Thread Colin King
From: Colin Ian King The comparison of mode >= 0 is redundant as mode is a u32 and this is always true. Remove this redundant code. Detected with CoverityScan ("Unsigned compared against 0") Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/core/rtw_debug.c | 6 +++--- 1 file chang

Re: [PATCH v6 17/39] platform: add video-multiplexer subdevice driver

2017-04-13 Thread Philipp Zabel
Hi Sakari, thank you for the review. On Tue, 2017-04-04 at 15:47 +0300, Sakari Ailus wrote: > Hi Steve, Philipp and Pavel, > > On Mon, Mar 27, 2017 at 05:40:34PM -0700, Steve Longerbeam wrote: > > From: Philipp Zabel > > > > This driver can handle SoC internal and external video bus multiplexe

Re: [PATCH 40/40] media: imx: set and propagate empty field, colorimetry params

2017-04-13 Thread Philipp Zabel
Hi Steve, thanks for cleaning this up. Apart from the comments below, this looks good to me. On Wed, 2017-04-12 at 17:45 -0700, Steve Longerbeam wrote: > This patch adds a call to imx_media_fill_empty_mbus_fields() in the > *_try_fmt() functions at the sink pads, to set empty field order and > co

Re: [PATCH] [media] imx: csi: retain current field order and colorimetry setting as default

2017-04-13 Thread Philipp Zabel
On Wed, 2017-04-12 at 09:03 +0200, Hans Verkuil wrote: [...] > >> Do you have a git tree with this patch? It is really hard to review without > >> having the full imx-media-csi.c source. > > > > The patch applies on top of > > > > https://github.com/slongerbeam/mediatree.git imx-media-staging-m

[PATCH RESEND v2] Staging: lustre cleanup macros in libcfs_private.h

2017-04-13 Thread Craig Inches
This resolves a checkpatch warning that "Single statement macros should not use a do {} while (0) loop" by removing the loop and adjusting line length accordingly. Signed-off-by: Craig Inches --- Changes in v2: - Kept statements together - Kept operator on previous line .../lustre/inclu

Re: [PATCH 1/2] staging: greybus: light.c: Remove include linux/version.h

2017-04-13 Thread Rui Miguel Silva
Hi Darryl, Thanks for the patch. On Wed, Apr 12, 2017 at 08:36:14PM -0500, Darryl T. Agostinelli wrote: Fixes: $ make versioncheck | grep staging ./drivers/staging/greybus/light.c: 15 linux/version.h not needed. Signed-off-by: Darryl T. Agostinelli --- drivers/staging/greybus/light.c | 1 - 1 fi

Re: [greybus-dev] [PATCH 2/2] staging: greybus: uart.c: Remove include linux/serial.h

2017-04-13 Thread Alex Elder
On 04/12/2017 08:36 PM, Darryl T. Agostinelli wrote: > $ make includecheck | grep staging > ./drivers/staging/greybus/uart.c: linux/serial.h is included more than once. > > Signed-off-by: Darryl T. Agostinelli Looks good. Reviewed-by: Alex Elder > --- > drivers/staging/greybus/uart.c | 1 - >

Re: [greybus-dev] [PATCH 1/2] staging: greybus: light.c: Remove include linux/version.h

2017-04-13 Thread Alex Elder
On 04/12/2017 08:36 PM, Darryl T. Agostinelli wrote: > Fixes: > $ make versioncheck | grep staging > ./drivers/staging/greybus/light.c: 15 linux/version.h not needed. > > Signed-off-by: Darryl T. Agostinelli Looks good. Reviewed-by: Alex Elder > --- > drivers/staging/greybus/light.c | 1 - >

[PATCH v2] staging: lustre: Fix sparse endianness warnings cast to restricted __le64 and __le32

2017-04-13 Thread skanda . kashyap
From: Skanda Guruanand Modified struct lu_dirpage in lustre_idl.h file to remove the sparse warnings where cast to restricted types are made. Following warnings are removed by this fix. drivers/staging/lustre/lustre/mdc/mdc_request.c:958:42: warning: cast to restricted __le64 drivers/staging/l