[PATCH v4 05/58] mtd: nand: ams-delta: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance instead of allocating our own. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/ams-delta.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nan

[PATCH v4 00/58] mtd: nand: refactor the NAND subsystem (part 1)

2015-12-10 Thread Boris Brezillon
Hello, This huge series aims at clarifying the relationship between the mtd and nand_chip structures and hiding NAND framework internals to NAND controller drivers. The first part of the series (patch 1 to 4) is a set of fixes/simple reworks easing the migration to mtd_to_nand(). The second part

[PATCH v4 03/58] mtd: nand: nuc900: create and use mtd_to_nuc900()

2015-12-10 Thread Boris Brezillon
Create and use mtd_to_nuc900() instead of direct container_of() calls. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/nuc900_nand.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/drivers/mtd/nand/nuc900_nand.c b/drivers/mtd/nand/nuc900_nand.c

[PATCH v4 06/58] mtd: nand: atmel: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 01/58] mtd: nand: denali: add missing nand_release() call in denali_remove()

2015-12-10 Thread Boris Brezillon
Unregister the NAND device from the NAND subsystem when removing a denali NAND controller, otherwise the MTD attached to the NAND device is still exposed by the MTD layer, and accesses to this device will likely crash the system. Signed-off-by: Boris Brezillon Cc: #3.8+ Fixes: 2a0a288ec258 ("mtd

[PATCH v4 12/58] mtd: nand: cmx270: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/cmx270_nand.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/mtd/nand/cmx270_nand.c b/drivers/mtd/nand/cmx270_nand.c index 43bd

[PATCH v4 11/58] mtd: nand: cafe: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/cafe_nand.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c index 77c92f1..7d6a

[PATCH v4 14/58] mtd: nand: davinci: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 07/58] mtd: nand: au1550nd: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 04/58] mtd: nand: omap2: create and use mtd_to_omap()

2015-12-10 Thread Boris Brezillon
Define and use mtd_to_omap() instead of container_of(); Signed-off-by: Boris Brezillon --- drivers/mtd/nand/omap2.c | 55 ++-- 1 file changed, 21 insertions(+), 34 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 944

[PATCH v4 16/58] mtd: nand: diskonchip: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/diskonchip.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index 5f7bcc

[PATCH v4 19/58] mtd: nand: fsl_ifc: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 20/58] mtd: nand: fsl_upm: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 13/58] mtd: nand: cs553x: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/cs553x_nand.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/mtd/nand/cs553x_nand.c b/drivers/mtd/nand/cs553x_nand.c index

[PATCH v4 10/58] mtd: nand: brcm: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 17/58] mtd: nand: docg4: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/docg4.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c index da93d7f..c

[PATCH v4 15/58] mtd: nand: denali: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 18/58] mtd: nand: fsl_elbc: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 09/58] mtd: nand: bf5xx: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 08/58] mtd: nand: bcm47xx: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 02/58] mtd: nand: fsmc: create and use mtd_to_fsmc()

2015-12-10 Thread Boris Brezillon
Create and use mtd_to_fsmc() to avoid duplication of container_of(mtd, struct fsmc_nand_data, mtd) calls. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/fsmc_nand.c | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/drivers/mtd/nand/fsmc_na

[PATCH v4 23/58] mtd: nand: gpmi: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 21/58] mtd: nand: fsmc: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 22/58] mtd: nand: gpio: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 24/58] mtd: nand: hisi504: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 26/58] mtd: nand: lpc32xx: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 27/58] mtd: nand: mpc5121: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 25/58] mtd: nand: jz4740: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 28/58] mtd: nand: mxc: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 30/58] mtd: nand: ndfc: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 29/58] mtd: nand: nandsim: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/nandsim.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index eb2a567..442eeaf

[PATCH v4 31/58] mtd: nand: nuc900: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 32/58] mtd: nand: omap2: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 33/58] mtd: nand: orion: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/orion_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c index 4ed4f67..087a040

[PATCH v4 34/58] mtd: nand: pasemi: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/pasemi_nand.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c index 0ecec

[PATCH v4 37/58] mtd: nand: r852: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/r852.c | 34 +++--- drivers/mtd/nand/r852.h | 1 - 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/drivers/mtd/nand/r852.c b

[PATCH v4 36/58] mtd: nand: pxa3xx: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/pxa3xx_nand.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/px

[PATCH v4 38/58] mtd: nand: s3c2410: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 40/58] mtd: nand: sharpsl: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 39/58] mtd: nand: sh_flctl: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 35/58] mtd: nand: plat: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 43/58] mtd: nand: tmio: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 41/58] mtd: nand: socrates: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 42/58] mtd: nand: sunxi: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 44/58] mtd: nand: txx9ndfmc: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 45/58] mtd: nand: vf610: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon --- Changes generated with the following coccinelle script --->8--- virtual patch @fix1@ identifier __chipfield, __mtdfield; type __type; @@ ( __type { ...

[PATCH v4 48/58] cris: nand: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Patch all drivers to make use of this mtd instance instead of using the instance embedded in their private struct or dynamically allocated. Signed-off-by: Boris Brezillon --- Most of those changes were generated with the coccinelle script added in commit

[PATCH v4 49/58] mtd: nand: update mtd_to_nand()

2015-12-10 Thread Boris Brezillon
Now that all drivers are using the mtd instance embedded in the nand_chip struct we can safely update the mtd_to_nand() implementation to use the container_of macro instead of returning the content of mtd->priv. This will allow us to remove mtd->priv = chip assignments done in all NAND controller d

[PATCH v4 46/58] mtd: nand: update the documentation to reflect framework changes

2015-12-10 Thread Boris Brezillon
The MTD device is now directly embedded in the nand_chip struct. Update the mtdnand documentation to mention this aspect and fix the different examples. Signed-off-by: Boris Brezillon --- Documentation/DocBook/mtdnand.tmpl | 31 +++ 1 file changed, 15 insertions(+), 1

[PATCH v4 47/58] staging: mt29f_spinand: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Boris Brezillon
struct nand_chip now embeds an mtd device, use it instead of allocating a new one. Signed-off-by: Boris Brezillon --- drivers/staging/mt29f_spinand/mt29f_spinand.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/mt29f_spinand/mt29f_spinand.c b/drivers/stag

[PATCH v4 50/58] mtd: nand: remove useless mtd->priv = chip assignments

2015-12-10 Thread Boris Brezillon
mtd_to_nand() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: Boris Brezillon --- Patch generated with the following coccinelle script: ---8< virtual patch @@ struct m

[PATCH v4 56/58] ARM: make use of nand_set/get_controller_data() helpers

2015-12-10 Thread Boris Brezillon
New helpers have been added to avoid directly accessing chip->field. Use them where appropriate. Signed-off-by: Boris Brezillon --- arch/arm/mach-ixp4xx/ixdp425-setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-i

[PATCH v4 52/58] staging: mt29f_spinand: remove useless mtd->priv = chip assignment

2015-12-10 Thread Boris Brezillon
mtd_to_nand() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: Boris Brezillon --- Patch generated with the following coccinelle script: ---8< virtual patch @@ struct m

[PATCH v4 55/58] mtd: nand: add helpers to access ->priv

2015-12-10 Thread Boris Brezillon
Add two helpers to access the field reserved for private controller data. This makes it clearer what this field is reserved for and ease future refactoring. Signed-off-by: Boris Brezillon --- include/linux/mtd/nand.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/m

[PATCH v4 53/58] mtd: nand: simplify nand_dt_init() usage

2015-12-10 Thread Boris Brezillon
nand_dt_init() function requires 3 arguments where it actually needs one (dn and mtd can both be retrieved from chip). Drop these parameters. Testing for dn != NULL inside nand_dt_init() also helps simplifying the caller code. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/nand_base.c | 21

[PATCH v4 51/58] cris: nand: remove useless mtd->priv = chip assignments

2015-12-10 Thread Boris Brezillon
mtd_to_nand() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: Boris Brezillon --- Patch generated with the following coccinelle script: ---8< virtual patch @@ struct m

[PATCH v4 54/58] mtd: nand: kill the chip->flash_node field

2015-12-10 Thread Boris Brezillon
Now that the nand_chip struct directly embeds an mtd_info struct we can get rid of the ->flash_node field and forward set/get_flash_node requests to the MTD layer. As a side effect, we no longer need the mtd_set_of_node() call done in nand_dt_init(). Signed-off-by: Boris Brezillon --- drivers/m

[PATCH v4 58/58] staging: mt29f_spinand: make use of nand_set/get_controller_data() helpers

2015-12-10 Thread Boris Brezillon
New helpers have been added to avoid directly accessing chip->field. Use them where appropriate. Signed-off-by: Boris Brezillon --- drivers/staging/mt29f_spinand/mt29f_spinand.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/mt29f_spinand/mt29f_spi

[PATCH v4 57/58] mtd: nand: make use of nand_set/get_controller_data() helpers

2015-12-10 Thread Boris Brezillon
New helpers have been added to avoid directly accessing chip->field. Use them where appropriate. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/ams-delta.c | 6 +-- drivers/mtd/nand/atmel_nand.c| 55 +++--- drivers/mtd/nand/bcm47xxnflash/main

[PATCH] staging: gdm72xx: add userspace data struct

2015-12-10 Thread Wim de With
This fixes the sparse warnings about dereferencing a userspace pointer. However, gdm_wimax_ioctl_get_data and gdm_wimax_ioctl_set_data both carefully check whether the pointers and data are valid, gdm_update_fsm does not. It simply casts userspace data to struct fsm_s. I haven't fixed this, and am

Re: [PATCH] staging: gdm72xx: add userspace data struct

2015-12-10 Thread Dan Carpenter
On Thu, Dec 10, 2015 at 10:11:12AM +0100, Wim de With wrote: > @@ -482,8 +483,16 @@ static int gdm_wimax_ioctl(struct net_device *dev, > struct ifreq *ifr, int cmd) > /* NOTE: gdm_update_fsm should be called >* before gdm_wimax_ioctl_se

Re: [PATCH] staging: gdm72xx: add userspace data struct

2015-12-10 Thread Wim de With
On 10-12-2015 10:37, Dan Carpenter wrote: > On Thu, Dec 10, 2015 at 10:11:12AM +0100, Wim de With wrote: >> @@ -482,8 +483,16 @@ static int gdm_wimax_ioctl(struct net_device *dev, >> struct ifreq *ifr, int cmd) >> /* NOTE: gdm_update_fsm should be called >>

RE: [PATCH V2 02/10] Drivers: hv: utils: run polling callback always in interrupt context

2015-12-10 Thread Dexuan Cui
> -Original Message- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf > Of K. Y. Srinivasan > Sent: Friday, October 30, 2015 9:13 > To: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com

Re: [PATCH] staging: gdm72xx: add userspace data struct

2015-12-10 Thread Dan Carpenter
On Thu, Dec 10, 2015 at 10:42:14AM +0100, Wim de With wrote: > On 10-12-2015 10:37, Dan Carpenter wrote: > > On Thu, Dec 10, 2015 at 10:11:12AM +0100, Wim de With wrote: > >> @@ -482,8 +483,16 @@ static int gdm_wimax_ioctl(struct net_device *dev, > >> struct ifreq *ifr, int cmd) > >>

[PATCH v2] staging: gdm72xx: add userspace data struct

2015-12-10 Thread Wim de With
This fixes the sparse warnings about dereferencing a userspace pointer. Once I updated the sparse annotations, I noticed a bug in gdm_wimax_ioctl() where we pass a user space pointer to gdm_update_fsm() which dereferences it. I fixed this. Signed-off-by: Wim de With --- drivers/staging/gdm72xx/

[PATCH 1/2] staging/rdma/hfi1: add definitions for OPA traps

2015-12-10 Thread Mike Marciniszyn
From: Jubin John These new definitions will be used by follow-on patches for formating and sending OPA traps. Reviewed-by: Ira Weiny Signed-off-by: Jubin John --- drivers/staging/rdma/hfi1/mad.h | 114 +++ 1 file changed, 114 insertions(+) diff --git a/dr

[PATCH 2/2] staging/rdma/hfi1: HFI now sends OPA Traps instead of IBTA

2015-12-10 Thread Mike Marciniszyn
From: Erik E. Kahn send_trap() was still using old ib_smp instead of opa_smp for formatting and sending traps. Reviewed-by: Arthur Kepner Reviewed-by: Ira Weiny Reviewed-by: Dennis Dalessandro Signed-off-by: Jubin John Signed-off-by: Erik E. Kahn --- drivers/staging/rdma/hfi1/mad.c | 12

[PATCH 0/2] Convert IBTA traps to OPA traps

2015-12-10 Thread Mike Marciniszyn
This two patch series gets rid of the vestigal use of IBTA traps in the hfi1 driver. --- Erik E. Kahn (1): staging/rdma/hfi1: HFI now sends OPA Traps instead of IBTA Jubin John (1): staging/rdma/hfi1: add definitions for OPA traps drivers/staging/rdma/hfi1/mad.c | 121 ++

[PATCH 0/2] staging: COMEDI: checkpatch.pl cleanups in comedi.h

2015-12-10 Thread Moritz König
This patchset fixes all the warnings and legitimate checks of checkpatch.pl in comedi.h. The following warnings were fixed: * WARNING: Block comments use * on subsequent lines * WARNING: Block comments use a trailing */ on a separate line The following checks were fixed: * CHECK: spaces prefer

[PATCH 2/2] staging: COMEDI: Added missing spaces at binary operators

2015-12-10 Thread Moritz König
This patch adds missing spaces at binary operators in comedi.h. Signed-off-by: Moritz König Signed-off-by: Fabian Lang --- drivers/staging/comedi/comedi.h | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/comedi/comedi.h b/drive

[PATCH 1/2] staging: COMEDI: Fixed the format of comments

2015-12-10 Thread Moritz König
This patch fixes the format of comments in comedi.h. Signed-off-by: Moritz König Signed-off-by: Fabian Lang --- drivers/staging/comedi/comedi.h | 202 +++- 1 file changed, 116 insertions(+), 86 deletions(-) diff --git a/drivers/staging/comedi/comedi.h b/driv

Re: [PATCH v2] staging: gdm72xx: add userspace data struct

2015-12-10 Thread One Thousand Gnomes
> if (cmd != SIOCWMIOCTL) > return -EOPNOTSUPP; > @@ -482,8 +483,16 @@ static int gdm_wimax_ioctl(struct net_device *dev, > struct ifreq *ifr, int cmd) > /* NOTE: gdm_update_fsm should be called >* before gdm_wimax_i

[PATCH v1 1/3] staging: rtl8188eu: provide an absolute path to include folder

2015-12-10 Thread Andy Shevchenko
Otherwise compiler will complain as follows CC [M] drivers/staging/rtl8188eu/core/rtw_ap.o cc1: warning: drivers/staging/rtl8188eu/include: No such file or directory [-Wmissing-include-dirs] Signed-off-by: Andy Shevchenko --- drivers/staging/rtl8188eu/Makefile | 2 +- 1 file changed, 1 inse

[PATCH v1 3/3] staging: rtl8188eu: print OUI with %*ph

2015-12-10 Thread Andy Shevchenko
There is no need to pass each byte as a parameter when printing values in hex format. We rather use %*ph specifier for that. Signed-off-by: Andy Shevchenko --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/r

[PATCH v1 2/3] staging: rtl8188eu: replace open-coded print_hex_dump()

2015-12-10 Thread Andy Shevchenko
No need to reinvent a wheel, i.e. print_hex_dump(). Replace an open-coded variant by generic kernel helper. Signed-off-by: Andy Shevchenko --- drivers/staging/rtl8188eu/core/rtw_recv.c | 39 +-- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/drivers/s

[PATCH] staging/rdma/hfi1: Fix a possible null pointer dereference

2015-12-10 Thread Mike Marciniszyn
From: Easwar Hariharan A code inspection pointed out that kmalloc_array may return NULL and memset doesn't check the input pointer for NULL, resulting in a possible NULL dereference. This patch fixes this. Reviewed-by: Mike Marciniszyn Signed-off-by: Easwar Hariharan --- drivers/staging/rdma/

Re: [PATCH] Fixed coding style problems based on checkpatch.pl for goldfish_audio.c

2015-12-10 Thread Benjamin Young
On Thu, Dec 10, 2015 at 12:43:19PM +0530, Sudip Mukherjee wrote: > On Wed, Dec 09, 2015 at 03:46:02PM -0800, Benjamin Young wrote: > > From f18a3e5f155f5258d2d19ac6b56bfaafa2ad470b Mon Sep 17 00:00:00 2001 > > From: Benjamin Young > > Date: Wed, 9 Dec 2015 13:45:00 -0800 > > Subject: [PATCH] Fixed

[PATCH v10 2/7] drivers:hv: Export hv_do_hypercall()

2015-12-10 Thread jakeo
From: Jake Oshins This patch exposes the function that hv_vmbus.ko uses to make hypercalls. This is necessary for retargeting an interrupt when it is given a new affinity and vector. Signed-off-by: Jake Oshins --- drivers/hv/hv.c | 20 ++-- drivers/hv/hyperv_vmbus.h |

[PATCH v10 7/7] PCI: hv: New paravirtual PCI front-end for Hyper-V VMs

2015-12-10 Thread jakeo
From: Jake Oshins This patch introduces a new driver which exposes a root PCI bus whenever a PCI Express device is passed through to a guest VM under Hyper-V. The device can be single- or multi-function. The interrupts for the devices are managed by an IRQ domain, implemented within the driver.

[PATCH v10 5/7] PCI: irqdomain: Look up IRQ domain by fwnode_handle

2015-12-10 Thread jakeo
From: Jake Oshins This patch adds a second way of finding an IRQ domain associated with a root PCI bus. After looking to see if one can be found through the OF tree, it attempts to look up the IRQ domain through an fwnode_handle stored in the pci_sysdata struct. Signed-off-by: Jake Oshins ---

[PATCH v10 3/7] PCI: Make it possible to implement a PCI MSI IRQ Domain in a module.

2015-12-10 Thread jakeo
From: Jake Oshins The Linux kernel already has the concpet of IRQ domain, wherein a component can expose a set of IRQs which are managed by a particular interrupt controller chip or other subsystem. The PCI driver exposes the notion of an IRQ domain for Message-Signaled Interrupts (MSI) from PCI

[PATCH v10 1/7] drivers:hv: Export a function that maps Linux CPU num onto Hyper-V proc num

2015-12-10 Thread jakeo
From: Jake Oshins This patch exposes the mapping between Linux CPU number and Hyper-V virtual processor number. This is necessary because the hypervisor needs to know which virtual processor to target when making a mapping in the Interrupt Redirection Table in the I/O MMU. Signed-off-by: Jake Os

[PATCH v10 0/7] PCI: hv: New paravirtual PCI front-end for Hyper-V VMs

2015-12-10 Thread jakeo
From: Jake Oshins This version of the patch series removes warning when compiling x86 32-bit while still making it build cleanly for x64. First, export functions that allow correlating Hyper-V virtual processors and Linux cpus, along with the means for invoking a hypercall that targets interrupt

[PATCH v10 4/7] PCI: Add fwnode_handle to pci_sysdata

2015-12-10 Thread jakeo
From: Jake Oshins This patch adds an fwnode_handle to struct pci_sysdata, which is used by the next patch in the series when trying to locate an IRQ domain associated with a root PCI bus. Signed-off-by: Jake Oshins --- arch/x86/include/asm/pci.h | 15 +++ drivers/pci/probe.c

[PATCH v10 6/7] drivers:hv: Define the channel type of Hyper-V PCI Express pass-through

2015-12-10 Thread jakeo
From: Jake Oshins This defines the channel type for PCI front-ends in Hyper-V VMs. Signed-off-by: Jake Oshins --- include/linux/hyperv.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 24d0b65..c9a9eed 100644 --- a/include/

Re: [PATCH v10 5/7] PCI: irqdomain: Look up IRQ domain by fwnode_handle

2015-12-10 Thread Marc Zyngier
On 10/12/15 17:53, ja...@microsoft.com wrote: > From: Jake Oshins > > This patch adds a second way of finding an IRQ domain associated with > a root PCI bus. After looking to see if one can be found through > the OF tree, it attempts to look up the IRQ domain through an > fwnode_handle stored in

Re: [PATCH v10 3/7] PCI: Make it possible to implement a PCI MSI IRQ Domain in a module.

2015-12-10 Thread Marc Zyngier
On 10/12/15 17:52, ja...@microsoft.com wrote: > From: Jake Oshins > > The Linux kernel already has the concpet of IRQ domain, wherein a > component can expose a set of IRQs which are managed by a particular > interrupt controller chip or other subsystem. The PCI driver exposes > the notion of an

Re: [PATCH v10 4/7] PCI: Add fwnode_handle to pci_sysdata

2015-12-10 Thread Marc Zyngier
On 10/12/15 17:53, ja...@microsoft.com wrote: > From: Jake Oshins > > This patch adds an fwnode_handle to struct pci_sysdata, which is > used by the next patch in the series when trying to locate an > IRQ domain associated with a root PCI bus. > > Signed-off-by: Jake Oshins > --- > arch/x86/in

Re: [PATCH v2] storvsc: add logging for error/warning messages

2015-12-10 Thread Martin K. Petersen
> "Long" == Long Li writes: Long> Introduce a logging level for storvsc to log certain error/warning Long> messages. Those messages are helpful in some environments, Long> e.g. Microsoft Azure, for customer support and troubleshooting Long> purposes. Applied to 4.5/scsi-queue. -- Martin K.

[PATCH net-next] hv_netvsc: Fix race condition on Multi-Send Data field

2015-12-10 Thread Haiyang Zhang
In commit 2a04ae8acb14 ("hv_netvsc: remove locking in netvsc_send()"), the locking for MSD (Multi-Send Data) field was removed. This could cause a race condition between RNDIS control messages and data packets processing, because these two types of traffic are not synchronized. This patch fixes thi

Re: [PATCH 2/2] staging: COMEDI: Added missing spaces at binary operators

2015-12-10 Thread Joe Perches
On Thu, 2015-12-10 at 15:57 +0100, Moritz König wrote: > #define CR_AREF(a) (((a) >> 24)&0x03) If you are going to fix these, it'd probably be better to use spaces around the '&' too #define CR_AREF(a) (((a) >> 24) & 0x03) ___ devel mailing lis

[PATCH] staging/rdma/hfi1: Fix for module parameter hdrq_entsize when it's 0

2015-12-10 Thread Mike Marciniszyn
From: Sebastian Sanchez If driver is loaded with parameter hdrq_entsize=0, then there's a NULL dereference when the driver gets unloaded. This causes a kernel Oops and prevents the module from being unloaded. This patch fixes this issue by making sure -EINVAL gets returned when hdrq_entsize=0.

[PATCH 4/4] scsi: storvsc: Tighten up the interrupt path

2015-12-10 Thread K. Y. Srinivasan
On the interrupt path, we repeatedly establish the pointer to the storvsc_device. Fix this. Signed-off-by: K. Y. Srinivasan Reviewed-by: Long Li Tested-by: Alex Ng --- drivers/scsi/storvsc_drv.c | 23 --- 1 files changed, 8 insertions(+), 15 deletions(-) diff --git a/dri

[PATCH 0/4] scsi: storvsc: Properly support FC hosts

2015-12-10 Thread K. Y. Srinivasan
Properly support FC hosts. Additional cleanup patches are also included. K. Y. Srinivasan (4): scsi: storvsc: Fix a bug in the layout of the hv_fc_wwn_packet scsi: storvsc: Properly support Fibre Channel devices scsi: storvsc: Refactor the code in storvsc_channel_init() scsi: storvsc: Tigh

[PATCH 2/4] scsi: storvsc: Properly support Fibre Channel devices

2015-12-10 Thread K. Y. Srinivasan
For FC devices managed by this driver, atttach the appropriate transport template. This will allow us to create the appropriate sysfs files for these devices. With this we can publish the wwn for both the port and the node. Signed-off-by: K. Y. Srinivasan Reviewed-by: Long Li Tested-by: Alex Ng

[PATCH 3/4] scsi: storvsc: Refactor the code in storvsc_channel_init()

2015-12-10 Thread K. Y. Srinivasan
The function storvsc_channel_init() repeatedly interacts with the host to extract various channel properties. Refactor this code to eliminate code repetition. Signed-off-by: K. Y. Srinivasan Reviewed-by: Long Li Tested-by: Alex Ng --- drivers/scsi/storvsc_drv.c | 155 -

[PATCH 1/4] scsi: storvsc: Fix a bug in the layout of the hv_fc_wwn_packet

2015-12-10 Thread K. Y. Srinivasan
The hv_fc_wwn_packet is exchanged over vmbus. Make the definition in Linux match the Window's definition. Signed-off-by: K. Y. Srinivasan Reviewed-by: Long Li Tested-by: Alex Ng --- drivers/scsi/storvsc_drv.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/

Re: [PATCH] staging/rdma/hfi1: Fix for module parameter hdrq_entsize when it's 0

2015-12-10 Thread Stephen Rothwell
Hi Mike, On Thu, 10 Dec 2015 16:02:49 -0500 Mike Marciniszyn wrote: > > From: Sebastian Sanchez linux-nxt doesn't really need to be informed about random changes to stuff in staging unless it fixes a linux-next specific problem. -- Cheers, Stephen Rothwells...@canb.auug.o

RE: [PATCH V2 02/10] Drivers: hv: utils: run polling callback always in interrupt context

2015-12-10 Thread KY Srinivasan
> -Original Message- > From: Dexuan Cui > Sent: Thursday, December 10, 2015 2:19 AM > To: KY Srinivasan ; gre...@linuxfoundation.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; vkuzn...@redhat.com; jasow...@redhat.com > Subject: RE

[PATCH] staging: goldfish: Coding Style Fix - spaces preferred around that '+'

2015-12-10 Thread Benjamin Young
>From 4b8ce6b3bd7effdfff2c95fbeb4a20cb93d5e9e5 Mon Sep 17 00:00:00 2001 From: Benjamin Young Date: Thu, 10 Dec 2015 17:31:00 -0500 Subject: [PATCH] staging: goldfish: Coding Style Fix - spaces preferred around that '+' Helped improve coding style to make arithemethic easier to read Signed-off-b

  1   2   >