[PATCH] PCI: xgene: fix a mistake about cfg address

2021-03-28 Thread Dejin Zheng
Now, revert it. Fixes: e2dcd20b1645a ("PCI: controller: Convert to devm_platform_ioremap_resource_byname()") Reported-by: dann.fraz...@canonical.com Signed-off-by: Dejin Zheng --- drivers/pci/controller/pci-xgene.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v2] PCI: controller: convert to devm_platform_ioremap_resource_byname()

2021-03-28 Thread Dejin Zheng
On Sat, Mar 27, 2021 at 12:02:42PM -0600, dann frazier wrote: Hi Dann, I'm so sorry for that, And there is a mistake with my patch that caused this problem. Thank you very much for telling me this, I will fix it as soon as possible. > On Wed, Jun 03, 2020 at 01:16:01AM +0800, Dejin Zheng wr

Re: [PATCH v5 0/4] Introduce pcim_alloc_irq_vectors()

2021-02-28 Thread Dejin Zheng
On Fri, Feb 26, 2021 at 08:20:55PM +0100, Robert Richter wrote: > On 26.02.21 23:50:52, Dejin Zheng wrote: > > Introduce pcim_alloc_irq_vectors(), a device-managed version of > > pci_alloc_irq_vectors(), In some i2c drivers, If pcim_enable_device() > > h

Re: [PATCH v5 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-28 Thread Dejin Zheng
On Fri, Feb 26, 2021 at 06:23:02PM +0200, Andy Shevchenko wrote: > On Fri, Feb 26, 2021 at 11:50:53PM +0800, Dejin Zheng wrote: > > Introduce pcim_alloc_irq_vectors(), a device-managed version of > > pci_alloc_irq_vectors(). Introducing this function can simplify > > th

[PATCH v5 4/4] i2c: thunderx: Use pcim_alloc_irq_vectors() to allocate IRQ vectors

2021-02-26 Thread Dejin Zheng
it with pcim_alloc_irq_vectors(). Signed-off-by: Dejin Zheng --- v4 -> v5: - Modify the subject name. v3 -> v4: - No change. v2 -> v3: - No change. v1 -> v2: - Modify some commit messages. drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH v5 2/4] Documentation: devres: Add pcim_alloc_irq_vectors()

2021-02-26 Thread Dejin Zheng
Add pcim_alloc_irq_vectors(), a device-managed version of pci_alloc_irq_vectors(). introducing this function can simplify the error handling path in many drivers. Signed-off-by: Dejin Zheng --- v4 -> v5: - No change v3 -> v4: - No change v2 -> v3: - No change

[PATCH v5 3/4] i2c: designware: Use pcim_alloc_irq_vectors() to allocate IRQ vectors

2021-02-26 Thread Dejin Zheng
it with pcim_alloc_irq_vectors(). At the same time, Remove the pci_free_irq_vectors() function to simplify the error handling path. the freeing resources will take automatically when device is gone. Acked-by: Andy Shevchenko Signed-off-by: Dejin Zheng --- v4 -> v5: - Modify the subject name. v3 -&

[PATCH v5 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-26 Thread Dejin Zheng
explicit that pcim_alloc_irq_vectors() is a device-managed function. Suggested-by: Andy Shevchenko Signed-off-by: Dejin Zheng --- v4 -> v5: - Remove the check of enable device in pcim_alloc_irq_vectors() and make it as a static line function. v3 -> v4: - No cha

[PATCH v5 0/4] Introduce pcim_alloc_irq_vectors()

2021-02-26 Thread Dejin Zheng
- Modify some commit messages. Dejin Zheng (4): PCI: Introduce pcim_alloc_irq_vectors() Documentation: devres: Add pcim_alloc_irq_vectors() i2c: designware: Use pcim_alloc_irq_vectors() to allocate IRQ vectors i2c: thunderx: Use pcim_alloc_irq_vectors() to allocate IRQ vectors .../drive

Re: [PATCH v4 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-26 Thread Dejin Zheng
On Thu, Feb 25, 2021 at 10:33:53AM +0100, Robert Richter wrote: > On 23.02.21 22:14:35, Dejin Zheng wrote: > > On Tue, Feb 23, 2021 at 09:02:54AM +0100, Robert Richter wrote: > > > On 22.02.21 23:14:15, Dejin Zheng wrote: > > > > On Mon, Feb 22, 2021 at 11:56:08

Re: [PATCH v4 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-23 Thread Dejin Zheng
On Tue, Feb 23, 2021 at 09:02:54AM +0100, Robert Richter wrote: > On 22.02.21 23:14:15, Dejin Zheng wrote: > > On Mon, Feb 22, 2021 at 11:56:08AM +0100, Robert Richter wrote: > > > On 20.02.21 00:46:49, Dejin Zheng wrote: > > > > > On 18.

Re: [PATCH v4 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-22 Thread Dejin Zheng
On Mon, Feb 22, 2021 at 11:56:08AM +0100, Robert Richter wrote: > On 20.02.21 00:46:49, Dejin Zheng wrote: > > > On 18.02.21 23:04:55, Dejin Zheng wrote: > > > > > + if (!dr || !dr->enabled) > > here checks whether the pci device is enabled. > &g

Re: [PATCH v4 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-19 Thread Dejin Zheng
On Fri, Feb 19, 2021 at 03:40:05PM +0100, Robert Richter wrote: > On 18.02.21 23:04:55, Dejin Zheng wrote: > > Introduce pcim_alloc_irq_vectors(), a device-managed version of > > pci_alloc_irq_vectors(). Introducing this function can simplify > > the error handling

[PATCH v1] Documentation: devres: add missing entry for pcim_set_mwi()

2021-02-18 Thread Dejin Zheng
The pcim_set_mwi() should be documented in devres.rst. So add the missing entry. Signed-off-by: Dejin Zheng --- Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api

[PATCH v4 3/4] i2c: designware: Use the correct name of device-managed function

2021-02-18 Thread Dejin Zheng
. It is used here as a device-managed function, So replace it with pcim_alloc_irq_vectors(). At the same time, Remove the pci_free_irq_vectors() function to simplify the error handling path. the freeing resources will take automatically when device is gone. Signed-off-by: Dejin Zheng --- v3 ->

[PATCH v4 4/4] i2c: thunderx: Use the correct name of device-managed function

2021-02-18 Thread Dejin Zheng
. It is used here as a device-managed function, So replace it with pcim_alloc_irq_vectors(). Signed-off-by: Dejin Zheng --- v3 -> v4: - No change. v2 -> v3: - No change. v1 -> v2: - Modify some commit messages. drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +- 1 file c

[PATCH v4 2/4] Documentation: devres: Add pcim_alloc_irq_vectors()

2021-02-18 Thread Dejin Zheng
Add pcim_alloc_irq_vectors(), a device-managed version of pci_alloc_irq_vectors(). introducing this function can simplify the error handling path in many drivers. Signed-off-by: Dejin Zheng --- v3 -> v4: - No change v2 -> v3: - No change v1 -> v2: - Modify so

[PATCH v4 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-18 Thread Dejin Zheng
explicit that pcim_alloc_irq_vectors() is a device-managed function. Suggested-by: Andy Shevchenko Signed-off-by: Dejin Zheng --- v3 -> v4: - No change v2 -> v3: - Add some commit comments for replace some codes in pcim_release() by pci_free_irq_vectors(). v1

[PATCH v4 0/4] Introduce pcim_alloc_irq_vectors()

2021-02-18 Thread Dejin Zheng
er. v1 -> v2: - Use pci_free_irq_vectors() to replace some code in pcim_release(). - Modify some commit messages. Dejin Zheng (4): PCI: Introduce pcim_alloc_irq_vectors() Documentation: devres: Add pcim_alloc_irq_vectors() i2c: designware: Use the correct name

Re: [PATCH v3 3/4] i2c: designware: Use the correct name of device-managed function

2021-02-18 Thread Dejin Zheng
On Wed, Feb 17, 2021 at 03:47:01PM +0200, Andy Shevchenko wrote: > On Wed, Feb 17, 2021 at 07:40:14PM +0800, Dejin Zheng wrote: > > On Tue, Feb 16, 2021 at 06:46:01PM +0100, Krzysztof Wilczyński wrote: > > ... > > > > The change simplifies the error handling path

Re: [PATCH v3 3/4] i2c: designware: Use the correct name of device-managed function

2021-02-17 Thread Dejin Zheng
On Tue, Feb 16, 2021 at 06:46:01PM +0100, Krzysztof Wilczyński wrote: Hi Krzysztof, > Hi Dejin, > > Thank you for all the changes, looks good! > > You could improve the subject line, as it is very vague - what is the > new function name more correct? Was the other and/or the previous one > not

Re: [PATCH v3 2/4] Documentation: devres: Add pcim_alloc_irq_vectors()

2021-02-17 Thread Dejin Zheng
On Tue, Feb 16, 2021 at 06:10:52PM +0100, Krzysztof Wilczyński wrote: > Hi Dejin, > > Thank you again for all the work here! > > > Add pcim_alloc_irq_vectors(), a device-managed version of > > pci_alloc_irq_vectors(). introducing this function can simplify > > the error handling path in many

Re: [PATCH v2 3/4] i2c: designware: Use the correct name of device-managed function

2021-02-16 Thread Dejin Zheng
On Tue, Feb 16, 2021 at 04:39:09PM +0200, Andy Shevchenko wrote: > On Tue, Feb 16, 2021 at 10:18:09PM +0800, Dejin Zheng wrote: > > Use the new function pcim_alloc_irq_vectors() to allocate IRQ vectors, > > the pcim_alloc_irq_vectors() function, an explicit device-

[PATCH v3 4/4] i2c: thunderx: Use the correct name of device-managed function

2021-02-16 Thread Dejin Zheng
. It is used here as a device-managed function, So replace it with pcim_alloc_irq_vectors(). Signed-off-by: Dejin Zheng --- v2 -> v3: - No change. v1 -> v2: - Modify some commit messages. drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v3 2/4] Documentation: devres: Add pcim_alloc_irq_vectors()

2021-02-16 Thread Dejin Zheng
Add pcim_alloc_irq_vectors(), a device-managed version of pci_alloc_irq_vectors(). introducing this function can simplify the error handling path in many drivers. Signed-off-by: Dejin Zheng --- v2 -> v3: - No change v1 -> v2: - Modify some commit messages. Documentation/

[PATCH v3 3/4] i2c: designware: Use the correct name of device-managed function

2021-02-16 Thread Dejin Zheng
. It is used here as a device-managed function, So replace it with pcim_alloc_irq_vectors(). At the same time, simplify the error handling path. Signed-off-by: Dejin Zheng --- v2 -> v3: - simplify the error handling path. v1 -> v2: - Modify some commit messages. drivers/i2c/buss

[PATCH v3 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-16 Thread Dejin Zheng
explicit that pcim_alloc_irq_vectors() is a device-managed function. Suggested-by: Andy Shevchenko Signed-off-by: Dejin Zheng --- v2 -> v3: - Add some commit comments for replace some codes in pcim_release() by pci_free_irq_vectors(). v1 -> v2:

[PATCH v3 0/4] Introduce pcim_alloc_irq_vectors()

2021-02-16 Thread Dejin Zheng
e some code in pcim_release(). - Modify some commit messages. Dejin Zheng (4): PCI: Introduce pcim_alloc_irq_vectors() Documentation: devres: Add pcim_alloc_irq_vectors() i2c: designware: Use the correct name of device-managed function i2c: thunderx: Use the correc

Re: [PATCH v1 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-16 Thread Dejin Zheng
On Tue, Feb 16, 2021 at 12:12:39PM +0200, Andy Shevchenko wrote: > On Mon, Feb 15, 2021 at 09:55:06PM +0100, Krzysztof Wilczyński wrote: > > > Question: wouldn't you need to call pci_free_irq_vectors() somewhere, > > possibly to pcim_release() callback? Although, I am not sure where the > >

[PATCH v2 4/4] i2c: thunderx: Use the correct name of device-managed function

2021-02-16 Thread Dejin Zheng
. It is used here as a device-managed function, So replace it with pcim_alloc_irq_vectors(). Signed-off-by: Dejin Zheng --- v1 -> v2: - Modify some commit messages. drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/

[PATCH v2 3/4] i2c: designware: Use the correct name of device-managed function

2021-02-16 Thread Dejin Zheng
. It is used here as a device-managed function, So replace it with pcim_alloc_irq_vectors(). Signed-off-by: Dejin Zheng --- v1 -> v2: - Modify some commit messages. drivers/i2c/busses/i2c-designware-pcidrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/

[PATCH v2 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-16 Thread Dejin Zheng
Introduce pcim_alloc_irq_vectors(), a device-managed version of pci_alloc_irq_vectors(). Introducing this function can simplify the error handling path in many drivers. Suggested-by: Andy Shevchenko Signed-off-by: Dejin Zheng --- v1 -> v2: - Use pci_free_irq_vectors() to replace s

[PATCH v2 0/4] Introduce pcim_alloc_irq_vectors()

2021-02-16 Thread Dejin Zheng
it with pcim_alloc_irq_vectors(). Changelog - v1 -> v2: - Use pci_free_irq_vectors() to replace some code in pcim_release(). - Modify some commit messages. Andy and Krzysztof, thanks for your help! Dejin Zheng (4): PCI: Introduce pcim_alloc_irq_vectors() Documentation: dev

[PATCH v2 2/4] Documentation: devres: Add pcim_alloc_irq_vectors()

2021-02-16 Thread Dejin Zheng
Add pcim_alloc_irq_vectors(), a device-managed version of pci_alloc_irq_vectors(). introducing this function can simplify the error handling path in many drivers. Signed-off-by: Dejin Zheng --- v1 -> v2: - Modify some commit messages. Documentation/driver-api/driver-model/devres.

[PATCH v1 4/4] i2c: thunderx: Use the correct name of device-managed function

2021-02-15 Thread Dejin Zheng
Use the correct name of device-managed function to alloc irq vectors, the pcim_alloc_irq_vectors() function, a explicit device-managed version of pci_alloc_irq_vectors(). Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v1 2/4] Documentation: devres: add pcim_alloc_irq_vectors()

2021-02-15 Thread Dejin Zheng
add pcim_alloc_irq_vectors(), a explicit device-managed version of pci_alloc_irq_vectors(). Signed-off-by: Dejin Zheng --- Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation

[PATCH v1 3/4] i2c: designware: Use the correct name of device-managed function

2021-02-15 Thread Dejin Zheng
Use the correct name of device-managed function to alloc irq vectors, the pcim_alloc_irq_vectors() function, a explicit device-managed version of pci_alloc_irq_vectors(). Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-designware-pcidrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v1 0/4] Introduce pcim_alloc_irq_vectors()

2021-02-15 Thread Dejin Zheng
Introduce pcim_alloc_irq_vectors(), a explicit device-managed version of pci_alloc_irq_vectors(). and use the correct name of device-managed function to alloc irq vectors in i2c drivers. Dejin Zheng (4): PCI: Introduce pcim_alloc_irq_vectors() Documentation: devres: add pcim_alloc_irq_vectors

[PATCH v1 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-15 Thread Dejin Zheng
Introduce pcim_alloc_irq_vectors(), a explicit device-managed version of pci_alloc_irq_vectors(). Suggested-by: Andy Shevchenko Signed-off-by: Dejin Zheng --- drivers/pci/pci.c | 19 +++ include/linux/pci.h | 3 +++ 2 files changed, 22 insertions(+) diff --git a/drivers/pci

Re: [PATCH] spi: pca2xx-pci: Fix an issue about missing call to 'pci_free_irq_vectors()'

2021-02-15 Thread Dejin Zheng
On Mon, Feb 15, 2021 at 03:22:38PM +0200, Andy Shevchenko wrote: > On Sun, Feb 14, 2021 at 10:57:46PM +0800, Dejin Zheng wrote: > > Call to 'pci_free_irq_vectors()' are missing both in the error handling > > path of the probe function, and in the remove function. So add them. >

Re: [PATCH v2] spi: pxa2xx-pci: Fix an issue about missing call to 'pci_free_irq_vectors()'

2021-02-15 Thread Dejin Zheng
On Mon, Feb 15, 2021 at 08:44:29PM +0800, Dejin Zheng wrote: Hi All: I'm very sorry forgot to add change list in patch v2. v1 -> v2: * modify subject name pca2xx-pci to pxa2xx-pci. * add jan and Jarkko's review tag. Dejin > Call to 'pci_free_irq_vectors()' are missin

Re: [PATCH 2/3] dmaengine: dw-edma: Add missing call to 'pci_free_irq_vectors()' in probe function

2021-02-15 Thread Dejin Zheng
On Mon, Feb 15, 2021 at 09:45:07AM +, Gustavo Pimentel wrote: > On Sun, Feb 14, 2021 at 13:21:52, Dejin Zheng > wrote: > > > Call to 'pci_free_irq_vectors()' is missing in the error handling path > > of the probe function, So add it. > > > > Fixes: 41aaff2a

Re: [PATCH i2c-next] i2c: designware: Consolidate pci_free_irq_vectors to a single place

2021-02-15 Thread Dejin Zheng
On Mon, Feb 15, 2021 at 11:36:27AM +0200, Jarkko Nikula wrote: > On 2/14/21 8:45 AM, Dejin Zheng wrote: > > Consolidate pci_free_irq_vectors to a single place using "goto free_irq" > > for simplify the code. > > > > Signed-off-by: Dejin Zheng > >

[PATCH v2] spi: pxa2xx-pci: Fix an issue about missing call to 'pci_free_irq_vectors()'

2021-02-15 Thread Dejin Zheng
Call to 'pci_free_irq_vectors()' are missing both in the error handling path of the probe function, and in the remove function. So add them. Fixes: 64e02cb0bdfc7c ("spi: pca2xx-pci: Allow MSI") Reviewed-by: Jan Kiszka Reviewed-by: Jarkko Nikula Signed-off-by: Dejin Zheng --- drive

Re: [PATCH] spi: pca2xx-pci: Fix an issue about missing call to 'pci_free_irq_vectors()'

2021-02-15 Thread Dejin Zheng
On Mon, Feb 15, 2021 at 11:41:50AM +0200, Jarkko Nikula wrote: > On 2/15/21 11:23 AM, Jan Kiszka wrote: > > On 14.02.21 15:57, Dejin Zheng wrote: > > > Call to 'pci_free_irq_vectors()' are missing both in the error handling > > > path of the probe function, and in the r

[PATCH] spi: pca2xx-pci: Fix an issue about missing call to 'pci_free_irq_vectors()'

2021-02-14 Thread Dejin Zheng
Call to 'pci_free_irq_vectors()' are missing both in the error handling path of the probe function, and in the remove function. So add them. Fixes: 64e02cb0bdfc7c ("spi: pca2xx-pci: Allow MSI") Signed-off-by: Dejin Zheng --- drivers/spi/spi-pxa2xx-pci.c | 13 ++--- 1 file c

[PATCH] i2c: thunderx: Fix an issue about missing call to 'pci_free_irq_vectors()'

2021-02-14 Thread Dejin Zheng
Call to 'pci_free_irq_vectors()' are missing both in the error handling path of the probe function, and in the remove function. So add them. Fixes: 4c21541d8da17fb ("i2c: thunderx: Replace pci_enable_msix()") Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-thunderx-pc

[PATCH 1/3] dmaengine: hsu: Add missing call to 'pci_free_irq_vectors()' in probe and remove functions

2021-02-14 Thread Dejin Zheng
Call to 'pci_free_irq_vectors()' are missing both in the error handling path of the probe function, and in the remove function. Add them. Fixes: e9bb8a9df316a2 ("dmaengine: hsu: pci: switch to new API for IRQ allocation") Signed-off-by: Dejin Zheng --- drivers/dma/hsu/pci.c | 5 +++

[PATCH 3/3] dmaengine: hisilicon: Add missing call to 'pci_free_irq_vectors()' in probe function

2021-02-14 Thread Dejin Zheng
Call to 'pci_free_irq_vectors()' is missing in the error handling path of the probe function, So add it. Fixes: e9f08b65250d73ab ("dmaengine: hisilicon: Add Kunpeng DMA engine support") Signed-off-by: Dejin Zheng --- drivers/dma/hisi_dma.c | 14 ++ 1 file changed, 10

[PATCH 2/3] dmaengine: dw-edma: Add missing call to 'pci_free_irq_vectors()' in probe function

2021-02-14 Thread Dejin Zheng
Call to 'pci_free_irq_vectors()' is missing in the error handling path of the probe function, So add it. Fixes: 41aaff2a2ac01c5 ("dmaengine: Add Synopsys eDMA IP PCIe glue-logic") Signed-off-by: Dejin Zheng --- drivers/dma/dw-edma/dw-edma-pcie.c | 15 +++ 1 file c

[PATCH 0/3] Add missing call to 'pci_free_irq_vectors()'

2021-02-14 Thread Dejin Zheng
This patchset just for add missing call to 'pci_free_irq_vectors()' in the error handling path of the probe function, or in the remove function. Dejin Zheng (3): dmaengine: hsu: Add missing call to 'pci_free_irq_vectors()' in probe and remove functions dmaengine: dw-edma: Add missing call

[PATCH i2c-next] i2c: designware: Consolidate pci_free_irq_vectors to a single place

2021-02-13 Thread Dejin Zheng
Consolidate pci_free_irq_vectors to a single place using "goto free_irq" for simplify the code. Signed-off-by: Dejin Zheng --- drivers/i2c/busses/i2c-designware-pcidrv.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/i2c/

[PATCH mtd/next 1/8] mtd: Add helper macro for register_mtd_blktrans boilerplate

2021-02-13 Thread Dejin Zheng
to eliminate a few lines of boilerplate code per mtd blktrans driver. Signed-off-by: Dejin Zheng --- include/linux/mtd/blktrans.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/mtd/blktrans.h b/include/linux/mtd/blktrans.h index 3c668cb1e344..15cc9b95e32b 100644

[PATCH mtd/next 5/8] mtd: mtdblock_ro: Use module_mtd_blktrans to register driver

2021-02-13 Thread Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng --- drivers/mtd/mtdblock_ro.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/mtd

[PATCH mtd/next 7/8] mtd: nftlcore: Use module_mtd_blktrans to register driver

2021-02-13 Thread Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng --- drivers/mtd/nftlcore.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/mtd

[PATCH mtd/next 6/8] mtd: mtdswap: Use module_mtd_blktrans to register driver

2021-02-13 Thread Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng --- drivers/mtd/mtdswap.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/mtd

[PATCH mtd/next 8/8] mtd: rfd_ftl: Use module_mtd_blktrans to register driver

2021-02-13 Thread Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng --- drivers/mtd/rfd_ftl.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/mtd

[PATCH mtd/next 3/8] mtd: inftlcore: Use module_mtd_blktrans to register driver

2021-02-13 Thread Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng --- drivers/mtd/inftlcore.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/mtd

[PATCH mtd/next 4/8] mtd: mtdblock: Use module_mtd_blktrans to register driver

2021-02-13 Thread Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng --- drivers/mtd/mtdblock.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/mtd

[PATCH mtd/next 0/8] Introduces the module_mtd_blktrans macro

2021-02-13 Thread Dejin Zheng
it is possible to eliminate a few lines of boilerplate code per mtd blktrans driver. Dejin Zheng (8): mtd: Add helper macro for register_mtd_blktrans boilerplate mtd: ftl: Use module_mtd_blktrans to register driver mtd: inftlcore: Use module_mtd_blktrans to register driver mtd: mtdblock: Use

[PATCH mtd/next 2/8] mtd: ftl: Use module_mtd_blktrans to register driver

2021-02-13 Thread Dejin Zheng
Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng --- drivers/mtd/ftl.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/mtd/ftl.c b

Re: [PATCH v3] usb: dwc3: core: fix a issue about clear connect state

2020-10-30 Thread Dejin Zheng
On Wed, Oct 28, 2020 at 03:57:03PM +0200, Felipe Balbi wrote: Hi Balbi and all: > > Hi, > > Dejin Zheng writes: > >> Dejin Zheng writes: > >> > According to Synopsys Programming Guide chapter 2.2 Register Resets, > >> > it cannot reset the DCTL r

Re: [PATCH v3] usb: dwc3: core: fix a issue about clear connect state

2020-10-28 Thread Dejin Zheng
On Tue, Oct 27, 2020 at 10:33:09AM +0200, Felipe Balbi wrote: Hi Balbi: Thank you so much for your comment. > > Hi, > > Dejin Zheng writes: > > According to Synopsys Programming Guide chapter 2.2 Register Resets, > > it cannot reset the DCTL register by setting DC

Re: [PATCH v3] usb: dwc3: core: fix a issue about clear connect state

2020-10-28 Thread Dejin Zheng
On Wed, Oct 28, 2020 at 03:57:03PM +0200, Felipe Balbi wrote: > > Hi, > > Dejin Zheng writes: > >> Dejin Zheng writes: > >> > According to Synopsys Programming Guide chapter 2.2 Register Resets, > >> > it cannot reset the DCTL register by se

[PATCH v3] usb: dwc3: core: fix a issue about clear connect state

2020-10-20 Thread Dejin Zheng
. Fixes: f59dcab176293b6 ("usb: dwc3: core: improve reset sequence") Suggested-by: Thinh Nguyen Signed-off-by: Dejin Zheng --- v2 -> v3: * Reset all fields of DCTL register by Thinh's suggest, Thanks for Thinh's help! v1 -> v2: * modify some commit mess

Re: [PATCH v2] usb: dwc3: core: fix a issue about clear connect state

2020-10-20 Thread Dejin Zheng
On Mon, Oct 19, 2020 at 10:04:41PM +, Thinh Nguyen wrote: > Dejin Zheng wrote: Hi Thinh: > > According to Synopsys Programming Guide chapter 2.2 Register Resets, > > it cannot reset the DCTL register by setting DCTL.CSFTRST for core soft > > reset, if DWC3 control

[PATCH v2] usb: dwc3: core: fix a issue about clear connect state

2020-10-18 Thread Dejin Zheng
device when the DWC3 controller did not power off. because the connection status is incorrect, so we also need to clear DCTL.RUN_STOP bit for disabling connect when doing core soft reset. Fixes: f59dcab176293b6 ("usb: dwc3: core: improve reset sequence") Signed-off-by: Dejin Zheng --

[PATCH v1] usb: dwc3: core: fix a issue about clear connect state

2020-10-18 Thread Dejin Zheng
the DWC3 controller did not power off. because the connection status is incorrect, so we also need clear DCTL.RUN_STOP bit for disable connect when do core soft reset. Fixes: f59dcab176293b6 ("usb: dwc3: core: improve reset sequence") Signed-off-by: Dejin Zheng --- drivers/usb/dwc3/core.

Re: [PATCH v4 2/2] i2c: busses: convert to devm_platform_request_irq()

2020-07-22 Thread Dejin Zheng
On Fri, Jul 17, 2020 at 09:11:52PM +0200, Heiko Stübner wrote: > Am Freitag, 17. Juli 2020, 18:11:58 CEST schrieb Dejin Zheng: > > Use devm_platform_request_irq() to simplify code, and it contains > > platform_get_irq() and devm_request_irq(). > > > > Cc: Michal

Re: [PATCH v1] PCI: dwc: fix a warning about variable 'res' is uninitialized

2020-07-17 Thread Dejin Zheng
On Fri, Jul 17, 2020 at 05:31:11PM +0100, Lorenzo Pieralisi wrote: > On Fri, Jul 17, 2020 at 09:30:07PM +0800, Dejin Zheng wrote: > > The kernel test robot reported a compile warning, > > > > drivers/pci/controller/dwc/pci-keystone.c:1236:18: warning: variable 'res' > >

[PATCH v4 2/2] i2c: busses: convert to devm_platform_request_irq()

2020-07-17 Thread Dejin Zheng
Use devm_platform_request_irq() to simplify code, and it contains platform_get_irq() and devm_request_irq(). Cc: Michal Simek Cc: Wolfram Sang Signed-off-by: Dejin Zheng Acked-by: Linus Walleij Acked-by: Michal Simek --- v3 -> v4: - add Michal's Acked-by tag in the second pa

[PATCH v4 1/2] drivers: provide devm_platform_request_irq()

2020-07-17 Thread Dejin Zheng
It will call devm_request_irq() after platform_get_irq() function in many drivers, And sometimes, the error handling of these two functions is incorrect in some drivers. So this function is provided to simplify the driver. Cc: Michal Simek Cc: Wolfram Sang Signed-off-by: Dejin Zheng --- v3

[PATCH v4 0/2] drivers: provide devm_platform_request_irq()

2020-07-17 Thread Dejin Zheng
iscussion: https://patchwork.ozlabs.org/project/linux-i2c/patch/20200520144821.8069-1-zhengdej...@gmail.com/ The patch content has not changed. Dejin Zheng (2): drivers: provide devm_platform_request_irq() i2c: busses: convert to devm_platform_request_irq() .../driver-api/dri

Re: [PATCH v3 1/2] drivers: provide devm_platform_request_irq()

2020-07-17 Thread Dejin Zheng
On Fri, Jul 17, 2020 at 04:59:46PM +0200, Greg KH wrote: > On Fri, Jul 17, 2020 at 10:30:30PM +0800, Dejin Zheng wrote: > > On Wed, May 27, 2020 at 10:26:10PM +0800, Dejin Zheng wrote: > > Hi Jonathan, Greg, Rafael, Linus, Michal and Wolfram: > > > > Could you help

Re: [PATCH v3 1/2] drivers: provide devm_platform_request_irq()

2020-07-17 Thread Dejin Zheng
On Wed, May 27, 2020 at 10:26:10PM +0800, Dejin Zheng wrote: Hi Jonathan, Greg, Rafael, Linus, Michal and Wolfram: Could you help me review this patch if you have free time? Thank you very very much! BR, Dejin > It will call devm_request_irq() after platform_get_irq() function > in many d

Re: [PATCH v1] PCI: controller: Remove duplicate error message

2020-07-17 Thread Dejin Zheng
On Wed, Jul 15, 2020 at 05:45:59PM +0100, Lorenzo Pieralisi wrote: > On Sat, Jul 11, 2020 at 03:47:33PM +0800, Dejin Zheng wrote: > > On Mon, Jul 06, 2020 at 04:58:47PM +0100, Lorenzo Pieralisi wrote: > > > On Tue, Jun 02, 2020 at 09:01:13AM -0600,

[PATCH v1] PCI: dwc: fix a warning about variable 'res' is uninitialized

2020-07-17 Thread Dejin Zheng
ixes: c59a7d771134b5 ("PCI: dwc: Convert to devm_platform_ioremap_resource_byname()") Reported-by: kernel test robot Signed-off-by: Dejin Zheng --- drivers/pci/controller/dwc/pci-keystone.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller

Re: [PATCH v1] PCI: controller: Remove duplicate error message

2020-07-11 Thread Dejin Zheng
On Mon, Jul 06, 2020 at 04:58:47PM +0100, Lorenzo Pieralisi wrote: > On Tue, Jun 02, 2020 at 09:01:13AM -0600, Rob Herring wrote: > > [...] > > > > The other 2 error cases as well don't print the resource name as far as > > > I recall (they will at least print the resource start/end). > > > >

[PATCH v1] PCI: Add more information when devm_request_mem_region() goes wrong

2020-07-11 Thread Dejin Zheng
Add more information, the name of the resource will be printed when the request memory region or remapping of configuration space fails in the devm_request_mem_region() function. Signed-off-by: Dejin Zheng --- drivers/pci/pci.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

[PATCH v2] PCI: dwc: convert to devm_platform_ioremap_resource_byname()

2020-07-08 Thread Dejin Zheng
Use devm_platform_ioremap_resource_byname() to simplify codes. it contains platform_get_resource_byname() and devm_ioremap_resource(). Signed-off-by: Dejin Zheng Reviewed-by: Gustavo Pimentel Reviewed-by: Rob Herring --- v1 -> v2: - rebase to pci/dwc branch - add Gust

Re: [PATCH v1] PCI: controller: convert to devm_platform_ioremap_resource()

2020-07-08 Thread Dejin Zheng
On Tue, Jul 07, 2020 at 02:37:07PM +0100, Lorenzo Pieralisi wrote: > On Wed, May 27, 2020 at 12:01:10AM +0800, Dejin Zheng wrote: > > use devm_platform_ioremap_resource() to simplify code, it > > contains platform_get_resource() and devm_ioremap_resource(). > > > >

[PATCH v2] PCI: controller: convert to devm_platform_ioremap_resource()

2020-07-08 Thread Dejin Zheng
use devm_platform_ioremap_resource() to simplify code, it contains platform_get_resource() and devm_ioremap_resource(). Signed-off-by: Dejin Zheng Reviewed-by: Rob Herring --- v1 -> v2: - rebase to pci/misc branch - add Rob Reviewed tag and Thanks for Bob's help. drivers/

Re: [PATCH v1] reset: intel: fix a compile warning about REG_OFFSET redefined

2020-06-26 Thread Dejin Zheng
On Fri, Jun 26, 2020 at 12:38:13PM +0200, Philipp Zabel wrote: Hi Philipp: Thanks very much for your review! > Hi Dejin, > > On Thu, 2020-06-04 at 23:30 +0800, Dejin Zheng wrote: > > kernel test robot reports a compile warning about REG_OFFSET redefined > > in the reset-int

[PATCH net v3] net: phy: smsc: fix printing too many logs

2020-06-20 Thread Dejin Zheng
sue by use read_poll_timeout() to replace phy_read_poll_timeout(). Fixes: 7ae7ad2f11ef47 ("net: phy: smsc: use phy_read_poll_timeout() to simplify the code") Reported-by: Kevin Groeneveld Signed-off-by: Dejin Zheng --- v2 -> v3: - modify commit message to why need this

Re: [PATCH net v1] net: phy: smsc: fix printing too many logs

2020-06-18 Thread Dejin Zheng
On Wed, Jun 17, 2020 at 11:36:42PM +0200, Andrew Lunn wrote: > On Wed, Jun 17, 2020 at 09:24:50PM +0100, Russell King - ARM Linux admin > wrote: > > On Wed, Jun 17, 2020 at 08:43:34PM +0200, Andrew Lunn wrote: > > > You have explained what the change does. But not why it is > > > needed. What

[PATCH net v2] net: phy: smsc: fix printing too many logs

2020-06-17 Thread Dejin Zheng
%d\n", __func__, __ret); \ __ret; \ }) So use read_poll_timeout() to replace phy_read_poll_timeout() for be consistent with the original code and fix this issue. Fixes: 7ae7ad2f11ef47 ("net: phy: smsc: use phy_read_poll_timeout() to simplify the code") Reported-by: Kevin G

Re: [PATCH net v1] net: phy: smsc: fix printing too many logs

2020-06-17 Thread Dejin Zheng
On Wed, Jun 17, 2020 at 06:19:25PM +0200, Andrew Lunn wrote: > On Wed, Jun 17, 2020 at 11:33:40PM +0800, Dejin Zheng wrote: > > Commit 7ae7ad2f11ef47 ("net: phy: smsc: use phy_read_poll_timeout() > > to simplify the code") will print a lot of logs as follow

[PATCH net v1] net: phy: smsc: fix printing too many logs

2020-06-17 Thread Dejin Zheng
ll_timeout(). Fixes: 7ae7ad2f11ef47 ("net: phy: smsc: use phy_read_poll_timeout() to simplify the code") Reported-by: Kevin Groeneveld Signed-off-by: Dejin Zheng --- drivers/net/phy/smsc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/smsc.c b/dr

Re: drivers/reset/reset-intel-gw.c:18:9: warning: 'REG_OFFSET' macro redefined

2020-06-15 Thread Dejin Zheng
On Mon, Jun 15, 2020 at 10:33:12PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: b3a9e3b9622ae10064826dccb4f7a52bd88c7407 > commit: e44ab4e14d6f4c448ae555132090c1a116b19e5c regmap: Simplify > implementation of the

Re: drivers/reset/reset-intel-gw.c:18: warning: "REG_OFFSET" redefined

2020-06-04 Thread Dejin Zheng
On Thu, Jun 04, 2020 at 07:37:06PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: 6929f71e46bdddbf1c4d67c2728648176c67c555 > commit: e44ab4e14d6f4c448ae555132090c1a116b19e5c regmap: Simplify > implementation of the

[PATCH v1] reset: intel: fix a compile warning about REG_OFFSET redefined

2020-06-04 Thread Dejin Zheng
rted-by: kernel test robot Fixes: e44ab4e14d6f4 ("regmap: Simplify implementation of the regmap_read_poll_timeout() macro") Signed-off-by: Dejin Zheng --- drivers/reset/reset-intel-gw.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/reset/reset-in

[PATCH v2] PCI: controller: convert to devm_platform_ioremap_resource_byname()

2020-06-02 Thread Dejin Zheng
Use devm_platform_ioremap_resource_byname() to simplify codes. it contains platform_get_resource_byname() and devm_ioremap_resource(). Signed-off-by: Dejin Zheng --- v1 -> v2: - Discard changes to the file drivers/pci/controller/pcie-xilinx-nwl.c Due to my mistakes, my pa

Re: [PATCH v1] PCI: controller: convert to devm_platform_ioremap_resource_byname()

2020-06-02 Thread Dejin Zheng
On Mon, Jun 01, 2020 at 04:22:29PM -0600, Rob Herring wrote: > On Mon, Jun 01, 2020 at 10:33:45PM +0800, Dejin Zheng wrote: > > Use devm_platform_ioremap_resource_byname() to simplify codes. > > it contains platform_get_resource_byname() and devm_ioremap_resource(). > > >

Re: [PATCH v1] PCI: controller: convert to devm_platform_ioremap_resource_byname()

2020-06-02 Thread Dejin Zheng
cify the > base tree in git format-patch, please see > https://stackoverflow.com/a/37406982] > > url: > https://github.com/0day-ci/linux/commits/Dejin-Zheng/PCI-controller-convert-to-devm_platform_ioremap_resource_byname/20200601-223757 > base: https://git.kernel.org/

Re: [PATCH net-next v7 09/10] net: phy: smsc: use phy_read_poll_timeout() to simplify the code

2020-06-02 Thread Dejin Zheng
On Mon, Jun 01, 2020 at 02:58:21PM -0400, Kevin Groeneveld wrote: > On Mon, Mar 23, 2020 at 11:10 AM Dejin Zheng wrote: > > > > use phy_read_poll_timeout() to replace the poll codes for > > simplify lan87xx_read_status() function. > > > > Suggested-by: Andr

[PATCH v1] PCI: controller: convert to devm_platform_ioremap_resource_byname()

2020-06-01 Thread Dejin Zheng
Use devm_platform_ioremap_resource_byname() to simplify codes. it contains platform_get_resource_byname() and devm_ioremap_resource(). Signed-off-by: Dejin Zheng --- drivers/pci/controller/cadence/pcie-cadence-ep.c | 3 +-- drivers/pci/controller/cadence/pcie-cadence-host.c | 3 +-- drivers

[tip: timers/core] drivers/clocksource/arm_arch_timer: Remove duplicate error message

2020-06-01 Thread tip-bot2 for Dejin Zheng
The following commit has been merged into the timers/core branch of tip: Commit-ID: d1b5e55208fd8e1c73876ab6ad1ce93485e3f5a2 Gitweb: https://git.kernel.org/tip/d1b5e55208fd8e1c73876ab6ad1ce93485e3f5a2 Author:Dejin Zheng AuthorDate:Wed, 29 Apr 2020 23:35:59 +08:00

[tip: timers/core] clocksource/drivers/arc_timer: Remove duplicate error message

2020-06-01 Thread tip-bot2 for Dejin Zheng
The following commit has been merged into the timers/core branch of tip: Commit-ID: 311fb70aa55174ddebb5c6022b23e58b85e9f116 Gitweb: https://git.kernel.org/tip/311fb70aa55174ddebb5c6022b23e58b85e9f116 Author:Dejin Zheng AuthorDate:Wed, 29 Apr 2020 23:12:23 +08:00

[PATCH v1] PCI: dwc: convert to devm_platform_ioremap_resource_byname()

2020-05-28 Thread Dejin Zheng
Use devm_platform_ioremap_resource_byname() to simplify codes. it contains platform_get_resource_byname() and devm_ioremap_resource(). Signed-off-by: Dejin Zheng --- drivers/pci/controller/dwc/pci-dra7xx.c | 11 --- drivers/pci/controller/dwc/pci-keystone.c | 7

[PATCH v1] Documentation: devres: add missing entry for devm_platform_get_and_ioremap_resource()

2020-05-27 Thread Dejin Zheng
The devm_platform_get_and_ioremap_resource() should be documented in devres.rst. Add the missing entry. Signed-off-by: Dejin Zheng --- Documentation/driver-api/driver-model/devres.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/driver-api/driver-model/devres.rst b

  1   2   >