[PATCH v2 net-next] ethernet: ucc_geth: Use kmemdup() rather than kmalloc+memcpy

2021-05-23 Thread YueHaibing
Issue identified with Coccinelle.

Signed-off-by: YueHaibing 
---
v2: keep kmemdup oneline

 drivers/net/ethernet/freescale/ucc_geth.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/ucc_geth.c 
b/drivers/net/ethernet/freescale/ucc_geth.c
index e0936510fa34..0acfafb73db1 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -3590,10 +3590,9 @@ static int ucc_geth_probe(struct platform_device* ofdev)
if ((ucc_num < 0) || (ucc_num > 7))
return -ENODEV;
 
-   ug_info = kmalloc(sizeof(*ug_info), GFP_KERNEL);
+   ug_info = kmemdup(_primary_info, sizeof(*ug_info), GFP_KERNEL);
if (ug_info == NULL)
return -ENOMEM;
-   memcpy(ug_info, _primary_info, sizeof(*ug_info));
 
ug_info->uf_info.ucc_num = ucc_num;
 
-- 
2.17.1



Re: [PATCH net-next] ethernet: ucc_geth: Use kmemdup() rather than kmalloc+memcpy

2021-05-23 Thread YueHaibing
On 2021/5/23 22:26, Andrew Lunn wrote:
> On Sun, May 23, 2021 at 03:29:37PM +0200, Christophe Leroy wrote:
>> YueHaibing  a écrit :
>>
>>> Issue identified with Coccinelle.
>>>
>>> Signed-off-by: YueHaibing 
>>> ---
>>>  drivers/net/ethernet/freescale/ucc_geth.c | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
>>> b/drivers/net/ethernet/freescale/ucc_geth.c
>>> index e0936510fa34..51206272cc25 100644
>>> --- a/drivers/net/ethernet/freescale/ucc_geth.c
>>> +++ b/drivers/net/ethernet/freescale/ucc_geth.c
>>> @@ -3590,10 +3590,10 @@ static int ucc_geth_probe(struct
>>> platform_device* ofdev)
>>> if ((ucc_num < 0) || (ucc_num > 7))
>>> return -ENODEV;
>>>
>>> -   ug_info = kmalloc(sizeof(*ug_info), GFP_KERNEL);
>>> +   ug_info = kmemdup(_primary_info, sizeof(*ug_info),
>>> + GFP_KERNEL);
>>
>> Can you keep that as a single line ? The tolerance is 100 chars per line now.
> 
> Networking prefers 80. If it fits a single 80 char line, please use a single 
> line.
> Otherwise please leave it as it is.

Ok, will send v2.
> 
>  Andrew
> .
> 


[PATCH net-next] ethernet: ucc_geth: Use kmemdup() rather than kmalloc+memcpy

2021-05-23 Thread YueHaibing
Issue identified with Coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/net/ethernet/freescale/ucc_geth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/ucc_geth.c 
b/drivers/net/ethernet/freescale/ucc_geth.c
index e0936510fa34..51206272cc25 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -3590,10 +3590,10 @@ static int ucc_geth_probe(struct platform_device* ofdev)
if ((ucc_num < 0) || (ucc_num > 7))
return -ENODEV;
 
-   ug_info = kmalloc(sizeof(*ug_info), GFP_KERNEL);
+   ug_info = kmemdup(_primary_info, sizeof(*ug_info),
+ GFP_KERNEL);
if (ug_info == NULL)
return -ENOMEM;
-   memcpy(ug_info, _primary_info, sizeof(*ug_info));
 
ug_info->uf_info.ucc_num = ucc_num;
 
-- 
2.17.1



[PATCH net-next] ibmveth: fix kobj_to_dev.cocci warnings

2021-05-18 Thread YueHaibing
Use kobj_to_dev() instead of container_of()

Generated by: scripts/coccinelle/api/kobj_to_dev.cocci

Signed-off-by: YueHaibing 
---
 drivers/net/ethernet/ibm/ibmveth.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmveth.c 
b/drivers/net/ethernet/ibm/ibmveth.c
index 7fea9ae60f13..bc67a7ee872b 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -1799,8 +1799,7 @@ static ssize_t veth_pool_store(struct kobject *kobj, 
struct attribute *attr,
struct ibmveth_buff_pool *pool = container_of(kobj,
  struct ibmveth_buff_pool,
  kobj);
-   struct net_device *netdev = dev_get_drvdata(
-   container_of(kobj->parent, struct device, kobj));
+   struct net_device *netdev = dev_get_drvdata(kobj_to_dev(kobj->parent));
struct ibmveth_adapter *adapter = netdev_priv(netdev);
long value = simple_strtol(buf, NULL, 10);
long rc;
-- 
2.17.1



[PATCH -next] powerpc/pseries/memhotplug: Remove unused inline function dlpar_memory_remove()

2021-05-14 Thread YueHaibing
dlpar_memory_remove() is never used, so can be removed.

Signed-off-by: YueHaibing 
---
 arch/powerpc/platforms/pseries/hotplug-memory.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c 
b/arch/powerpc/platforms/pseries/hotplug-memory.c
index 8377f1f7c78e..3d93f1c48e23 100644
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
+++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -585,10 +585,6 @@ static inline int pseries_remove_mem_node(struct 
device_node *np)
 {
return 0;
 }
-static inline int dlpar_memory_remove(struct pseries_hp_errorlog *hp_elog)
-{
-   return -EOPNOTSUPP;
-}
 static int dlpar_remove_lmb(struct drmem_lmb *lmb)
 {
return -EOPNOTSUPP;
-- 
2.17.1



Re: [PATCH -next] powerpc/eeh: Remove unused inline function eeh_dev_phb_init_dynamic()

2021-03-31 Thread YueHaibing
On 2021/3/26 13:08, Daniel Axtens wrote:
> Hi,
> 
>> commit 475028efc708 ("powerpc/eeh: Remove eeh_dev_phb_init_dynamic()")
>> left behind this, so can remove it.
> 
> I had a look: the inline that you are removing here is for the
> !CONFIG_EEH case, which explains why it was missed the first time.
> 
> This looks like a good change. Out of interest, what tool are you using
> to find these unused inlines? If there are many more, it might make
> sense to combine future patches removing them into a single patch, but
> I'm not sure.

Just use some grep skill, will do that if any.

> 
> checkpatch likes this patch, so that's also good :)
> 
> Reviewed-by: Daniel Axtens 
> 
> Kind regards,
> Daniel
> .
> 


[PATCH -next] powerpc/eeh: Add correct inline functions

2021-03-31 Thread YueHaibing
pseries_eeh_add_device_early()/pseries_eeh_add_device_tree_early() is
never used since adding, however pseries_eeh_init_edev() and
pseries_eeh_init_edev_recursive() need their inline versions.

Fixes: b6eebb093cad ("powerpc/eeh: Make early EEH init pseries specific")
Signed-off-by: YueHaibing 
---
 arch/powerpc/include/asm/eeh.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index b1a5bba2e0b9..0b6c2a6711d3 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch/powerpc/include/asm/eeh.h
@@ -357,8 +357,8 @@ static inline int eeh_phb_pe_create(struct pci_controller 
*phb) { return 0; }
 void pseries_eeh_init_edev(struct pci_dn *pdn);
 void pseries_eeh_init_edev_recursive(struct pci_dn *pdn);
 #else
-static inline void pseries_eeh_add_device_early(struct pci_dn *pdn) { }
-static inline void pseries_eeh_add_device_tree_early(struct pci_dn *pdn) { }
+static inline void pseries_eeh_init_edev(struct pci_dn *pdn) { }
+static inline void pseries_eeh_init_edev_recursive(struct pci_dn *pdn) { }
 #endif
 
 #ifdef CONFIG_PPC64
-- 
2.17.1



[PATCH -next] powerpc/smp: Remove unused inline functions

2021-03-24 Thread YueHaibing
commit 441c19c8a290 ("powerpc/kvm/book3s_hv: Rework the secondary inhibit code")
left behind this, so can remove it.

Signed-off-by: YueHaibing 
---
 arch/powerpc/include/asm/smp.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
index 7a13bc20f0a0..ad7129a19e8f 100644
--- a/arch/powerpc/include/asm/smp.h
+++ b/arch/powerpc/include/asm/smp.h
@@ -189,8 +189,6 @@ extern void __cpu_die(unsigned int cpu);
 #define hard_smp_processor_id()get_hard_smp_processor_id(0)
 #define smp_setup_cpu_maps()
 #define thread_group_shares_l2  0
-static inline void inhibit_secondary_onlining(void) {}
-static inline void uninhibit_secondary_onlining(void) {}
 static inline const struct cpumask *cpu_sibling_mask(int cpu)
 {
return cpumask_of(cpu);
-- 
2.17.1



[PATCH -next] powerpc/eeh: Remove unused inline function eeh_dev_phb_init_dynamic()

2021-03-24 Thread YueHaibing
commit 475028efc708 ("powerpc/eeh: Remove eeh_dev_phb_init_dynamic()")
left behind this, so can remove it.

Signed-off-by: YueHaibing 
---
 arch/powerpc/include/asm/eeh.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index b1a5bba2e0b9..ee0e7b8eac60 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch/powerpc/include/asm/eeh.h
@@ -333,8 +333,6 @@ static inline bool eeh_enabled(void)
 
 static inline void eeh_show_enabled(void) { }
 
-static inline void eeh_dev_phb_init_dynamic(struct pci_controller *phb) { }
-
 static inline int eeh_check_failure(const volatile void __iomem *token)
 {
return 0;
-- 
2.17.1



[PATCH net-next] net/wan/fsl_ucc_hdlc: Add MODULE_DESCRIPTION

2020-08-29 Thread YueHaibing
Add missing MODULE_DESCRIPTION.

Signed-off-by: YueHaibing 
---
 drivers/net/wan/fsl_ucc_hdlc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index 9edd94679283..dca97cd7c4e7 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -1295,3 +1295,4 @@ static struct platform_driver ucc_hdlc_driver = {
 
 module_platform_driver(ucc_hdlc_driver);
 MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION(DRV_DESC);
-- 
2.17.1




[PATCH -next] powerpc: Remove unneeded inline functions

2020-07-17 Thread YueHaibing
Both of those functions are only called from 64-bit only code, so the
stubs should not be needed at all.

Suggested-by: Michael Ellerman 
Signed-off-by: YueHaibing 
---
 arch/powerpc/include/asm/mmu_context.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/powerpc/include/asm/mmu_context.h 
b/arch/powerpc/include/asm/mmu_context.h
index 1a474f6b1992..7f3658a97384 100644
--- a/arch/powerpc/include/asm/mmu_context.h
+++ b/arch/powerpc/include/asm/mmu_context.h
@@ -218,8 +218,6 @@ static inline void inc_mm_active_cpus(struct mm_struct *mm) 
{ }
 static inline void dec_mm_active_cpus(struct mm_struct *mm) { }
 static inline void mm_context_add_copro(struct mm_struct *mm) { }
 static inline void mm_context_remove_copro(struct mm_struct *mm) { }
-static inline void mm_context_add_vas_windows(struct mm_struct *mm) { }
-static inline void mm_context_remove_vas_windows(struct mm_struct *mm) { }
 #endif
 
 
-- 
2.17.1




[PATCH] powerpc: Fix inconsistent function names

2020-07-14 Thread YueHaibing
The stub helpers name should be consistent with prototypes.

mm_context_add_vas_windows() --> mm_context_add_vas_window()
mm_context_remove_vas_windows() --> mm_context_remove_vas_window()

Fixes: c420644c0a8f ("powerpc: Use mm_context vas_windows counter to issue 
CP_ABORT")
Signed-off-by: YueHaibing 
---
 arch/powerpc/include/asm/mmu_context.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/mmu_context.h 
b/arch/powerpc/include/asm/mmu_context.h
index 1a474f6b1992..00fd1d44731a 100644
--- a/arch/powerpc/include/asm/mmu_context.h
+++ b/arch/powerpc/include/asm/mmu_context.h
@@ -218,8 +218,8 @@ static inline void inc_mm_active_cpus(struct mm_struct *mm) 
{ }
 static inline void dec_mm_active_cpus(struct mm_struct *mm) { }
 static inline void mm_context_add_copro(struct mm_struct *mm) { }
 static inline void mm_context_remove_copro(struct mm_struct *mm) { }
-static inline void mm_context_add_vas_windows(struct mm_struct *mm) { }
-static inline void mm_context_remove_vas_windows(struct mm_struct *mm) { }
+static inline void mm_context_add_vas_window(struct mm_struct *mm) { }
+static inline void mm_context_remove_vas_window(struct mm_struct *mm) { }
 #endif
 
 
-- 
2.17.1




[PATCH -next] powerpc/smp: Remove unused inline functions

2020-07-14 Thread YueHaibing
commit 441c19c8a290 ("powerpc/kvm/book3s_hv: Rework the secondary inhibit code")
left behind this, remove it.

Signed-off-by: YueHaibing 
---
 arch/powerpc/include/asm/smp.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
index 49a25e2400f2..5d5a7596d144 100644
--- a/arch/powerpc/include/asm/smp.h
+++ b/arch/powerpc/include/asm/smp.h
@@ -176,8 +176,6 @@ extern void __cpu_die(unsigned int cpu);
 /* for UP */
 #define hard_smp_processor_id()get_hard_smp_processor_id(0)
 #define smp_setup_cpu_maps()
-static inline void inhibit_secondary_onlining(void) {}
-static inline void uninhibit_secondary_onlining(void) {}
 static inline const struct cpumask *cpu_sibling_mask(int cpu)
 {
return cpumask_of(cpu);
-- 
2.17.1




[PATCH -next] powerpc/xive: Remove unused inline function xive_kexec_teardown_cpu()

2020-07-14 Thread YueHaibing
commit e27e0a94651e ("powerpc/xive: Remove xive_kexec_teardown_cpu()")
left behind this, remove it.

Signed-off-by: YueHaibing 
---
 arch/powerpc/include/asm/xive.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/include/asm/xive.h b/arch/powerpc/include/asm/xive.h
index d08ea11b271c..309b4d65b74f 100644
--- a/arch/powerpc/include/asm/xive.h
+++ b/arch/powerpc/include/asm/xive.h
@@ -155,7 +155,6 @@ static inline void xive_smp_probe(void) { }
 static inline int  xive_smp_prepare_cpu(unsigned int cpu) { return -EINVAL; }
 static inline void xive_smp_setup_cpu(void) { }
 static inline void xive_smp_disable_cpu(void) { }
-static inline void xive_kexec_teardown_cpu(int secondary) { }
 static inline void xive_shutdown(void) { }
 static inline void xive_flush_interrupt(void) { }
 
-- 
2.17.1




Re: [PATCH -next] soc: fsl: dpio: remove set but not used variable 'addr_cena'

2020-05-09 Thread Yuehaibing
Pls ignore this duplicate.

On 2020/5/8 22:10, YueHaibing wrote:
> drivers/soc/fsl/dpio//qbman-portal.c:650:11: warning: variable 'addr_cena' 
> set but not used [-Wunused-but-set-variable]
>   uint64_t addr_cena;
>^
> 
> It is never used, so remove it.
> 
> Signed-off-by: YueHaibing 
> ---
>  drivers/soc/fsl/dpio/qbman-portal.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/soc/fsl/dpio/qbman-portal.c 
> b/drivers/soc/fsl/dpio/qbman-portal.c
> index e2e9fbb58a72..0ce859b60888 100644
> --- a/drivers/soc/fsl/dpio/qbman-portal.c
> +++ b/drivers/soc/fsl/dpio/qbman-portal.c
> @@ -647,7 +647,6 @@ int qbman_swp_enqueue_multiple_direct(struct qbman_swp *s,
>   const uint32_t *cl = (uint32_t *)d;
>   uint32_t eqcr_ci, eqcr_pi, half_mask, full_mask;
>   int i, num_enqueued = 0;
> - uint64_t addr_cena;
>  
>   spin_lock(>access_spinlock);
>   half_mask = (s->eqcr.pi_ci_mask>>1);
> @@ -700,7 +699,6 @@ int qbman_swp_enqueue_multiple_direct(struct qbman_swp *s,
>  
>   /* Flush all the cacheline without load/store in between */
>   eqcr_pi = s->eqcr.pi;
> - addr_cena = (size_t)s->addr_cena;
>   for (i = 0; i < num_enqueued; i++)
>   eqcr_pi++;
>   s->eqcr.pi = eqcr_pi & full_mask;
> 



[PATCH -next] soc: fsl: qbman: Remove unused inline function qm_eqcr_get_ci_stashing

2020-05-08 Thread YueHaibing
There's no callers in-tree anymore.

Signed-off-by: YueHaibing 
---
 drivers/soc/fsl/qbman/qman.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
index 1e164e03410a..9888a7061873 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -449,11 +449,6 @@ static inline int qm_eqcr_init(struct qm_portal *portal,
return 0;
 }
 
-static inline unsigned int qm_eqcr_get_ci_stashing(struct qm_portal *portal)
-{
-   return (qm_in(portal, QM_REG_CFG) >> 28) & 0x7;
-}
-
 static inline void qm_eqcr_finish(struct qm_portal *portal)
 {
struct qm_eqcr *eqcr = >eqcr;
-- 
2.17.1




[PATCH -next] soc: fsl: dpio: remove set but not used variable 'addr_cena'

2020-05-08 Thread YueHaibing
drivers/soc/fsl/dpio//qbman-portal.c:650:11: warning: variable 'addr_cena' set 
but not used [-Wunused-but-set-variable]
  uint64_t addr_cena;
   ^

It is never used, so remove it.

Signed-off-by: YueHaibing 
---
 drivers/soc/fsl/dpio/qbman-portal.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/soc/fsl/dpio/qbman-portal.c 
b/drivers/soc/fsl/dpio/qbman-portal.c
index e2e9fbb58a72..0ce859b60888 100644
--- a/drivers/soc/fsl/dpio/qbman-portal.c
+++ b/drivers/soc/fsl/dpio/qbman-portal.c
@@ -647,7 +647,6 @@ int qbman_swp_enqueue_multiple_direct(struct qbman_swp *s,
const uint32_t *cl = (uint32_t *)d;
uint32_t eqcr_ci, eqcr_pi, half_mask, full_mask;
int i, num_enqueued = 0;
-   uint64_t addr_cena;
 
spin_lock(>access_spinlock);
half_mask = (s->eqcr.pi_ci_mask>>1);
@@ -700,7 +699,6 @@ int qbman_swp_enqueue_multiple_direct(struct qbman_swp *s,
 
/* Flush all the cacheline without load/store in between */
eqcr_pi = s->eqcr.pi;
-   addr_cena = (size_t)s->addr_cena;
for (i = 0; i < num_enqueued; i++)
eqcr_pi++;
s->eqcr.pi = eqcr_pi & full_mask;
-- 
2.17.1




[PATCH -next] soc: fsl: dpio: Remove unused inline function qbman_write_eqcr_am_rt_register

2020-05-08 Thread YueHaibing
There's no callers in-tree anymore since commit
3b2abda7d28c ("soc: fsl: dpio: Replace QMAN array mode with ring mode enqueue")

Signed-off-by: YueHaibing 
---
 drivers/soc/fsl/dpio/qbman-portal.c | 12 
 1 file changed, 12 deletions(-)

diff --git a/drivers/soc/fsl/dpio/qbman-portal.c 
b/drivers/soc/fsl/dpio/qbman-portal.c
index 804b8ba9bf5c..e2e9fbb58a72 100644
--- a/drivers/soc/fsl/dpio/qbman-portal.c
+++ b/drivers/soc/fsl/dpio/qbman-portal.c
@@ -572,18 +572,6 @@ void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, u32 
qdid,
 #define EQAR_VB(eqar)  ((eqar) & 0x80)
 #define EQAR_SUCCESS(eqar) ((eqar) & 0x100)
 
-static inline void qbman_write_eqcr_am_rt_register(struct qbman_swp *p,
-  u8 idx)
-{
-   if (idx < 16)
-   qbman_write_register(p, QBMAN_CINH_SWP_EQCR_AM_RT + idx * 4,
-QMAN_RT_MODE);
-   else
-   qbman_write_register(p, QBMAN_CINH_SWP_EQCR_AM_RT2 +
-(idx - 16) * 4,
-QMAN_RT_MODE);
-}
-
 #define QB_RT_BIT ((u32)0x100)
 /**
  * qbman_swp_enqueue_direct() - Issue an enqueue command
-- 
2.17.1




Re: linux-next: Tree for Apr 3

2020-04-03 Thread Yuehaibing
+cc linuxppc-dev@lists.ozlabs.org

On 2020/4/3 16:54, Yuehaibing wrote:
> 
> 
> On 2020/4/3 13:29, Stephen Rothwell wrote:
>> Hi all,
>>
>> The merge window has opened, so please do not add any material for the
>> next release into your linux-next included trees/branches until after
>> the merge window closes.
>>
>> Changes since 20200402:
>>
> 
> On PPC32, randcondfig warning this:
> 
> WARNING: unmet direct dependencies detected for HOTPLUG_CPU
>   Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || 
> PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n])
>   Selected by [y]:
>   - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=y] || 
> ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y]
> 



[PATCH v2] powerpc/mm: ptdump: Add missing include

2020-04-03 Thread YueHaibing
while PPC_PSERIES is not set, gcc build fails:

arch/powerpc/mm/ptdump/hashpagetable.c: In function ‘pseries_find’:
arch/powerpc/mm/ptdump/hashpagetable.c:262:18: error: ‘H_SUCCESS’ undeclared 
(first use in this function); did you mean ‘FL_ACCESS’?
   if (lpar_rc != H_SUCCESS)
  ^
  FL_ACCESS

If PPC_PSERIES is not set,  does not
include , which leads to this failure.

Add missing include file  in hashpagetable.c to fix this.

Reported-by: Hulk Robot 
Fixes: 65e701b2d2a8 ("powerpc/ptdump: drop non vital #ifdefs")
Signed-off-by: YueHaibing 
---
v2: Add hvcall.h instead of vio.h, also rework patch log
---
 arch/powerpc/mm/ptdump/hashpagetable.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/mm/ptdump/hashpagetable.c 
b/arch/powerpc/mm/ptdump/hashpagetable.c
index b6ed9578382f..3e7e6206688c 100644
--- a/arch/powerpc/mm/ptdump/hashpagetable.c
+++ b/arch/powerpc/mm/ptdump/hashpagetable.c
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
-- 
2.17.1




Re: [PATCH] powerpc/mm: ptdump: Add missing include

2020-04-03 Thread Yuehaibing
On 2020/4/3 12:58, Michael Ellerman wrote:
> YueHaibing  writes:
>> gcc build fails:
> 
> What config? Custom?

A randconfig, CONFIG_PPC_PSERIES  is not set,  see attach.

> 
>> arch/powerpc/mm/ptdump/hashpagetable.c: In function ‘pseries_find’:
>> arch/powerpc/mm/ptdump/hashpagetable.c:262:18: error: ‘H_SUCCESS’ undeclared 
>> (first use in this function); did you mean ‘FL_ACCESS’?
>>if (lpar_rc != H_SUCCESS)
>>   ^
>>   FL_ACCESS
>>
>> Reported-by: Hulk Robot 
>> Fixes: 65e701b2d2a8 ("powerpc/ptdump: drop non vital #ifdefs")
>> Signed-off-by: YueHaibing 
>> ---
>>  arch/powerpc/mm/ptdump/hashpagetable.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/powerpc/mm/ptdump/hashpagetable.c 
>> b/arch/powerpc/mm/ptdump/hashpagetable.c
>> index b6ed9578382f..8ea5f9a3b658 100644
>> --- a/arch/powerpc/mm/ptdump/hashpagetable.c
>> +++ b/arch/powerpc/mm/ptdump/hashpagetable.c
>> @@ -20,6 +20,7 @@
>>  #include 
>>  #include 
>>  #include 
>> +#include 
> 
> I don't think you want vio.h, hvcall.h has the definition of H_SUCCESS.

Ok, will resend.

> 
> cheers
> 
> .
> 
#
# Automatically generated file; DO NOT EDIT.
# Linux/powerpc 5.6.0 Kernel Configuration
#

#
# Compiler: powerpc-linux-gnu-gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=70500
CONFIG_LD_VERSION=23000
CONFIG_CLANG_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_HAS_ASM_GOTO=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_TABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y

#
# General setup
#
CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not set
CONFIG_UAPI_HEADER_TEST=y
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_BUILD_SALT=""
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_XZ is not set
CONFIG_DEFAULT_HOSTNAME="(none)"
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
# CONFIG_WATCH_QUEUE is not set
CONFIG_CROSS_MEMORY_ATTACH=y
# CONFIG_USELIB is not set
CONFIG_HAVE_ARCH_AUDITSYSCALL=y

#
# IRQ subsystem
#
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
CONFIG_GENERIC_IRQ_MIGRATION=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_DOMAIN_HIERARCHY=y
CONFIG_GENERIC_MSI_IRQ=y
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
# CONFIG_GENERIC_IRQ_DEBUGFS is not set
# end of IRQ subsystem

CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_ARCH_HAS_TICK_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_CMOS_UPDATE=y

#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
CONFIG_NO_HZ=y
# CONFIG_HIGH_RES_TIMERS is not set
# end of Timers subsystem

CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_PREEMPT_COUNT=y

#
# CPU/Task time and stats accounting
#
CONFIG_VIRT_CPU_ACCOUNTING=y
# CONFIG_TICK_CPU_ACCOUNTING is not set
CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
# CONFIG_SCHED_THERMAL_PRESSURE is not set
CONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not set
# CONFIG_PSI is not set
# end of CPU/Task time and stats accounting

CONFIG_CPU_ISOLATION=y

#
# RCU Subsystem
#
CONFIG_TREE_RCU=y
CONFIG_RCU_EXPERT=y
CONFIG_SRCU=y
CONFIG_TREE_SRCU=y
CONFIG_TASKS_RCU_GENERIC=y
CONFIG_TASKS_RCU=y
CONFIG_TASKS_RUDE_RCU=y
CONFIG_TASKS_TRACE_RCU=y
CONFIG_RCU_STALL_COMMON=y
CONFIG_RCU_NEED_SEGCBLIST=y
CONFIG_RCU_FANOUT=64
CONFIG_RCU_FANOUT_LEAF=16
# CONFIG_RCU_FAST_NO_HZ is not set
# CONFIG_RCU_NOCB_CPU is not set
CONFIG_TASKS_TRACE_RCU_READ_MB=y
# end of RCU Subsystem

CONFIG_BUILD_BIN2C=y
CONFIG_IKCONFIG=y
CONFIG_IKHEADERS=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13

#
# Scheduler features
#
# end of Scheduler features

CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_CC_HAS_INT128=y
CONFIG_CGROUPS=y
# CONFIG_MEMCG is not set
# CONFIG_BLK_CGROUP is not set
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_RT_GROUP_SCHED=y
# CONFIG_CGROUP_PIDS is not set
# CONFIG_CGROUP_RDMA is not set
CONFIG_CGROUP_FREEZER=y
# CONFIG_CGROUP_HUGETLB is not set
# CONFIG_CPUSETS is not set
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
# CONFIG_CGROUP_DEBUG is not set
# CONFIG_NAMESPACES is not set
# CONFIG_CHECKPOINT_RESTORE is not set
CONFIG_SCHED_AUTOGROUP=y
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_XZ=y
CONFIG_RD_LZO=y
# CONFIG_RD_LZ4 is not set
CONFIG_BOOT_CONFIG=y
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CON

[PATCH] powerpc/mm: ptdump: Add missing include

2020-04-02 Thread YueHaibing
gcc build fails:

arch/powerpc/mm/ptdump/hashpagetable.c: In function ‘pseries_find’:
arch/powerpc/mm/ptdump/hashpagetable.c:262:18: error: ‘H_SUCCESS’ undeclared 
(first use in this function); did you mean ‘FL_ACCESS’?
   if (lpar_rc != H_SUCCESS)
  ^
  FL_ACCESS

Reported-by: Hulk Robot 
Fixes: 65e701b2d2a8 ("powerpc/ptdump: drop non vital #ifdefs")
Signed-off-by: YueHaibing 
---
 arch/powerpc/mm/ptdump/hashpagetable.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/mm/ptdump/hashpagetable.c 
b/arch/powerpc/mm/ptdump/hashpagetable.c
index b6ed9578382f..8ea5f9a3b658 100644
--- a/arch/powerpc/mm/ptdump/hashpagetable.c
+++ b/arch/powerpc/mm/ptdump/hashpagetable.c
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
-- 
2.17.1




Re: [PATCH] powerpc/44x: Make AKEBONO depends on NET

2020-03-30 Thread Yuehaibing
On 2020/3/31 8:58, Michael Ellerman wrote:
> YueHaibing  writes:
>> Fix Kconfig warnings:
>>
>> WARNING: unmet direct dependencies detected for NETDEVICES
>>   Depends on [n]: NET [=n]
>>   Selected by [y]:
>>   - AKEBONO [=y] && PPC_47x [=y]
>>
>> WARNING: unmet direct dependencies detected for ETHERNET
>>   Depends on [n]: NETDEVICES [=y] && NET [=n]
>>   Selected by [y]:
>>   - AKEBONO [=y] && PPC_47x [=y]
>>
>> AKEBONO select NETDEVICES and ETHERNET unconditionally,
> 
> It shouldn't do that, that's the job of a defconfig.
> 
> It might want to enable NET_VENDOR_IBM iff the config already has NET
> and other dependencies enabled.
> 
> So the patch below might work?

Yes, It works for me, Thanks!

Tested-by: YueHaibing  # build-tested

> 
> cheers
> 
> diff --git a/arch/powerpc/platforms/44x/Kconfig 
> b/arch/powerpc/platforms/44x/Kconfig
> index 25ebe634a661..32aac4f40f1b 100644
> --- a/arch/powerpc/platforms/44x/Kconfig
> +++ b/arch/powerpc/platforms/44x/Kconfig
> @@ -207,9 +207,7 @@ config AKEBONO
>   select PPC4xx_HSTA_MSI
>   select I2C
>   select I2C_IBM_IIC
> - select NETDEVICES
> - select ETHERNET
> - select NET_VENDOR_IBM
> + imply NET_VENDOR_IBM
>   select IBM_EMAC_EMAC4 if IBM_EMAC
>   select USB if USB_SUPPORT
>   select USB_OHCI_HCD_PLATFORM if USB_OHCI_HCD
> 
> 
> 
>> If NET is not set, build fails. Add this dependcy to fix this.
>>
>> Fixes: 2a2c74b2efcb ("IBM Akebono: Add the Akebono platform")
>> Signed-off-by: YueHaibing 
>> ---
>>  arch/powerpc/platforms/44x/Kconfig | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/powerpc/platforms/44x/Kconfig 
>> b/arch/powerpc/platforms/44x/Kconfig
>> index 25ebe634a661..394f662d7df2 100644
>> --- a/arch/powerpc/platforms/44x/Kconfig
>> +++ b/arch/powerpc/platforms/44x/Kconfig
>> @@ -199,6 +199,7 @@ config FSP2
>>  config AKEBONO
>>  bool "IBM Akebono (476gtr) Support"
>>  depends on PPC_47x
>> +depends on NET
>>  select SWIOTLB
>>  select 476FPE
>>  select PPC4xx_PCI_EXPRESS
>> -- 
>> 2.17.1
> 
> .
> 



[PATCH] powerpc/44x: Make AKEBONO depends on NET

2020-03-30 Thread YueHaibing
Fix Kconfig warnings:

WARNING: unmet direct dependencies detected for NETDEVICES
  Depends on [n]: NET [=n]
  Selected by [y]:
  - AKEBONO [=y] && PPC_47x [=y]

WARNING: unmet direct dependencies detected for ETHERNET
  Depends on [n]: NETDEVICES [=y] && NET [=n]
  Selected by [y]:
  - AKEBONO [=y] && PPC_47x [=y]

AKEBONO select NETDEVICES and ETHERNET unconditionally,
If NET is not set, build fails. Add this dependcy to fix this.

Fixes: 2a2c74b2efcb ("IBM Akebono: Add the Akebono platform")
Signed-off-by: YueHaibing 
---
 arch/powerpc/platforms/44x/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/platforms/44x/Kconfig 
b/arch/powerpc/platforms/44x/Kconfig
index 25ebe634a661..394f662d7df2 100644
--- a/arch/powerpc/platforms/44x/Kconfig
+++ b/arch/powerpc/platforms/44x/Kconfig
@@ -199,6 +199,7 @@ config FSP2
 config AKEBONO
bool "IBM Akebono (476gtr) Support"
depends on PPC_47x
+   depends on NET
select SWIOTLB
select 476FPE
select PPC4xx_PCI_EXPRESS
-- 
2.17.1




[PATCH -next] usb: gadget: fsl: remove unused variable 'driver_desc'

2020-03-26 Thread YueHaibing
drivers/usb/gadget/udc/fsl_udc_core.c:56:19:
 warning: 'driver_desc' defined but not used [-Wunused-const-variable=]

It is never used, so remove it.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 drivers/usb/gadget/udc/fsl_udc_core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c 
b/drivers/usb/gadget/udc/fsl_udc_core.c
index ec6eda426223..febabde62f71 100644
--- a/drivers/usb/gadget/udc/fsl_udc_core.c
+++ b/drivers/usb/gadget/udc/fsl_udc_core.c
@@ -53,7 +53,6 @@
 #defineDMA_ADDR_INVALID(~(dma_addr_t)0)
 
 static const char driver_name[] = "fsl-usb2-udc";
-static const char driver_desc[] = DRIVER_DESC;
 
 static struct usb_dr_device __iomem *dr_regs;
 
-- 
2.17.1




[PATCH v2 -next] powerpc/pmac/smp: drop unnecessary volatile qualifier

2020-03-03 Thread YueHaibing
core99_l2_cache/core99_l3_cache no need to mark as volatile,
just remove it.

Signed-off-by: YueHaibing 
---
v2: remove 'volatile' qualifier
---
 arch/powerpc/platforms/powermac/smp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/smp.c 
b/arch/powerpc/platforms/powermac/smp.c
index f95fbde..69ad567 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -661,8 +661,8 @@ static void smp_core99_gpio_tb_freeze(int freeze)
 #endif /* !CONFIG_PPC64 */
 
 /* L2 and L3 cache settings to pass from CPU0 to CPU1 on G4 cpus */
-volatile static long int core99_l2_cache;
-volatile static long int core99_l3_cache;
+static long core99_l2_cache;
+static long core99_l3_cache;
 
 static void core99_init_caches(int cpu)
 {
-- 
2.7.4




[PATCH -next] soc: fsl: dpio: remove set but not used variable 'addr_cena'

2020-02-21 Thread YueHaibing
commit 3b2abda7d28c ("soc: fsl: dpio: Replace QMAN array
mode with ring mode enqueue") introduced this, but not
used, so remove it.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 drivers/soc/fsl/dpio/qbman-portal.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/soc/fsl/dpio/qbman-portal.c 
b/drivers/soc/fsl/dpio/qbman-portal.c
index 740ee0d..350de56 100644
--- a/drivers/soc/fsl/dpio/qbman-portal.c
+++ b/drivers/soc/fsl/dpio/qbman-portal.c
@@ -658,7 +658,6 @@ int qbman_swp_enqueue_multiple_direct(struct qbman_swp *s,
const uint32_t *cl = (uint32_t *)d;
uint32_t eqcr_ci, eqcr_pi, half_mask, full_mask;
int i, num_enqueued = 0;
-   uint64_t addr_cena;
 
spin_lock(>access_spinlock);
half_mask = (s->eqcr.pi_ci_mask>>1);
@@ -711,7 +710,6 @@ int qbman_swp_enqueue_multiple_direct(struct qbman_swp *s,
 
/* Flush all the cacheline without load/store in between */
eqcr_pi = s->eqcr.pi;
-   addr_cena = (size_t)s->addr_cena;
for (i = 0; i < num_enqueued; i++)
eqcr_pi++;
s->eqcr.pi = eqcr_pi & full_mask;
@@ -822,7 +820,6 @@ int qbman_swp_enqueue_multiple_desc_direct(struct qbman_swp 
*s,
const uint32_t *cl;
uint32_t eqcr_ci, eqcr_pi, half_mask, full_mask;
int i, num_enqueued = 0;
-   uint64_t addr_cena;
 
half_mask = (s->eqcr.pi_ci_mask>>1);
full_mask = s->eqcr.pi_ci_mask;
@@ -866,7 +863,6 @@ int qbman_swp_enqueue_multiple_desc_direct(struct qbman_swp 
*s,
 
/* Flush all the cacheline without load/store in between */
eqcr_pi = s->eqcr.pi;
-   addr_cena = (uint64_t)s->addr_cena;
for (i = 0; i < num_enqueued; i++)
eqcr_pi++;
s->eqcr.pi = eqcr_pi & full_mask;
-- 
2.7.4




[PATCH -next] soc: fsl: qe: remove set but not used variable 'mm_gc'

2020-01-08 Thread YueHaibing
drivers/soc/fsl/qe/gpio.c: In function qe_pin_request:
drivers/soc/fsl/qe/gpio.c:163:26: warning: variable mm_gc set but not used 
[-Wunused-but-set-variable]

commit 1e714e54b5ca ("powerpc: qe_lib-gpio: use gpiochip data pointer")
left behind this unused variable.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 drivers/soc/fsl/qe/gpio.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/soc/fsl/qe/gpio.c b/drivers/soc/fsl/qe/gpio.c
index 12bdfd9..ed75198 100644
--- a/drivers/soc/fsl/qe/gpio.c
+++ b/drivers/soc/fsl/qe/gpio.c
@@ -160,7 +160,6 @@ struct qe_pin *qe_pin_request(struct device_node *np, int 
index)
 {
struct qe_pin *qe_pin;
struct gpio_chip *gc;
-   struct of_mm_gpio_chip *mm_gc;
struct qe_gpio_chip *qe_gc;
int err;
unsigned long flags;
@@ -186,7 +185,6 @@ struct qe_pin *qe_pin_request(struct device_node *np, int 
index)
goto err0;
}
 
-   mm_gc = to_of_mm_gpio_chip(gc);
qe_gc = gpiochip_get_data(gc);
 
spin_lock_irqsave(_gc->lock, flags);
-- 
2.7.4




[PATCH -next] powerpc/pmac/smp: Fix old-style declaration

2019-12-25 Thread YueHaibing
There expect the 'static' keyword to come first in a declaration

arch/powerpc/platforms/powermac/smp.c:664:1: warning: static is not at 
beginning of declaration [-Wold-style-declaration]
arch/powerpc/platforms/powermac/smp.c:665:1: warning: static is not at 
beginning of declaration [-Wold-style-declaration]

Signed-off-by: YueHaibing 
---
 arch/powerpc/platforms/powermac/smp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/smp.c 
b/arch/powerpc/platforms/powermac/smp.c
index f95fbde..7233b85 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -661,8 +661,8 @@ static void smp_core99_gpio_tb_freeze(int freeze)
 #endif /* !CONFIG_PPC64 */
 
 /* L2 and L3 cache settings to pass from CPU0 to CPU1 on G4 cpus */
-volatile static long int core99_l2_cache;
-volatile static long int core99_l3_cache;
+static volatile long int core99_l2_cache;
+static volatile long int core99_l3_cache;
 
 static void core99_init_caches(int cpu)
 {
-- 
2.7.4




[PATCH -next] soc: fsl: Enable COMPILE_TEST

2019-11-08 Thread YueHaibing
When do COMPILE_TEST buiding for RTC_DRV_FSL_FTM_ALARM,
we get this warning:

WARNING: unmet direct dependencies detected for FSL_RCPM
  Depends on [n]: PM_SLEEP [=y] && (ARM || ARM64)
  Selected by [m]:
  - RTC_DRV_FSL_FTM_ALARM [=m] && RTC_CLASS [=y] && (ARCH_LAYERSCAPE || 
SOC_LS1021A || COMPILE_TEST [=y])

This enable COMPILE_TEST for FSL_RCPM to fix the issue.

Fixes: e1c2feb1efa2 ("rtc: fsl-ftm-alarm: allow COMPILE_TEST")
Signed-off-by: YueHaibing 
---
In commit c6c2d36bc46f ("rtc: fsl-ftm-alarm: Fix build error without PM_SLEEP")
I posted a wrong kconfig warning(which PM_SLEEP is n), sorry for confusion.
---
 drivers/soc/fsl/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/fsl/Kconfig b/drivers/soc/fsl/Kconfig
index 4df32bc..e142662 100644
--- a/drivers/soc/fsl/Kconfig
+++ b/drivers/soc/fsl/Kconfig
@@ -43,7 +43,7 @@ config DPAA2_CONSOLE
 
 config FSL_RCPM
bool "Freescale RCPM support"
-   depends on PM_SLEEP && (ARM || ARM64)
+   depends on PM_SLEEP && (ARM || ARM64 || COMPILE_TEST)
help
  The NXP QorIQ Processors based on ARM Core have RCPM module
  (Run Control and Power Management), which performs all device-level
-- 
2.7.4




[RESEND][PATCH] powerpc/pseries: Use correct event modifier in rtas_parse_epow_errlog()

2019-10-23 Thread YueHaibing
rtas_parse_epow_errlog() should pass 'modifier' to
handle_system_shutdown, because event modifier only use
bottom 4 bits.

Reviewed-by: Tyrel Datwyler 
Signed-off-by: YueHaibing 
---
 arch/powerpc/platforms/pseries/ras.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/ras.c 
b/arch/powerpc/platforms/pseries/ras.c
index 3acdcc3..1d7f973 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -255,7 +255,7 @@ static void rtas_parse_epow_errlog(struct rtas_error_log 
*log)
break;
 
case EPOW_SYSTEM_SHUTDOWN:
-   handle_system_shutdown(epow_log->event_modifier);
+   handle_system_shutdown(modifier);
break;
 
case EPOW_SYSTEM_HALT:
-- 
2.7.4




[PATCH -next] powerpc/spufs: remove set but not used variable 'ctx'

2019-10-23 Thread YueHaibing
arch/powerpc/platforms/cell/spufs/inode.c:201:22:
 warning: variable ctx set but not used [-Wunused-but-set-variable]

It is not used since commit 67cba9fd6456 ("move
spu_forget() into spufs_rmdir()")

Signed-off-by: YueHaibing 
---
 arch/powerpc/platforms/cell/spufs/inode.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/inode.c 
b/arch/powerpc/platforms/cell/spufs/inode.c
index 2dd452a..9b1586b 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -198,14 +198,12 @@ static int spufs_fill_dir(struct dentry *dir,
 
 static int spufs_dir_close(struct inode *inode, struct file *file)
 {
-   struct spu_context *ctx;
struct inode *parent;
struct dentry *dir;
int ret;
 
dir = file->f_path.dentry;
parent = d_inode(dir->d_parent);
-   ctx = SPUFS_I(d_inode(dir))->i_ctx;
 
inode_lock_nested(parent, I_MUTEX_PARENT);
ret = spufs_rmdir(parent, dir);
-- 
2.7.4




Re: [PATCH -next 00/13] hwrng: use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread Yuehaibing



On 2019/10/17 0:44, Florian Fainelli wrote:
> On 10/16/19 3:46 AM, YueHaibing wrote:
>> devm_platform_ioremap_resource() internally have platform_get_resource()
>> and devm_ioremap_resource() in it. So instead of calling them separately
>> use devm_platform_ioremap_resource() directly.
> 
> Did your coccinelle script not cover
> drivers/char/hw_random/iproc-rng200.c somehow? Do you mind including it
> as a separate patch?

A patch from Markus Elfring has be queued:

commit a68b931932c5574aa5bd459529c766ba577c72b3
Author: Markus Elfring 
Date:   Wed Sep 18 09:09:22 2019 +0200

hwrng: iproc-rng200 - Use devm_platform_ioremap_resource() in 
iproc_rng200_probe()

Simplify this function implementation by using a known wrapper function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
Reviewed-by: Ray Jui 
Reviewed-by: Florian Fainelli 
Signed-off-by: Herbert Xu 




> Thanks
> 
>>
>> YueHaibing (13):
>>   hwrng: atmel - use devm_platform_ioremap_resource() to simplify code
>>   hwrng: bcm2835 - use devm_platform_ioremap_resource() to simplify code
>>   hwrng: exynos - use devm_platform_ioremap_resource() to simplify code
>>   hwrng: hisi - use devm_platform_ioremap_resource() to simplify code
>>   hwrng: ks-sa - use devm_platform_ioremap_resource() to simplify code
>>   hwrng: meson - use devm_platform_ioremap_resource() to simplify code
>>   hwrng: npcm - use devm_platform_ioremap_resource() to simplify code
>>   hwrng: omap - use devm_platform_ioremap_resource() to simplify code
>>   hwrng: pasemi - use devm_platform_ioremap_resource() to simplify code
>>   hwrng: pic32 - use devm_platform_ioremap_resource() to simplify code
>>   hwrng: st - use devm_platform_ioremap_resource() to simplify code
>>   hwrng: tx4939 - use devm_platform_ioremap_resource() to simplify code
>>   hwrng: xgene - use devm_platform_ioremap_resource() to simplify code
>>
>>  drivers/char/hw_random/atmel-rng.c   | 4 +---
>>  drivers/char/hw_random/bcm2835-rng.c | 5 +
>>  drivers/char/hw_random/exynos-trng.c | 4 +---
>>  drivers/char/hw_random/hisi-rng.c| 4 +---
>>  drivers/char/hw_random/ks-sa-rng.c   | 4 +---
>>  drivers/char/hw_random/meson-rng.c   | 4 +---
>>  drivers/char/hw_random/npcm-rng.c| 4 +---
>>  drivers/char/hw_random/omap-rng.c| 4 +---
>>  drivers/char/hw_random/pasemi-rng.c  | 4 +---
>>  drivers/char/hw_random/pic32-rng.c   | 4 +---
>>  drivers/char/hw_random/st-rng.c  | 4 +---
>>  drivers/char/hw_random/tx4939-rng.c  | 4 +---
>>  drivers/char/hw_random/xgene-rng.c   | 4 +---
>>  13 files changed, 13 insertions(+), 40 deletions(-)
>>
> 
> 



[PATCH -next 09/13] hwrng: pasemi - use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/char/hw_random/pasemi-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/pasemi-rng.c 
b/drivers/char/hw_random/pasemi-rng.c
index 24b1460..2498d4e 100644
--- a/drivers/char/hw_random/pasemi-rng.c
+++ b/drivers/char/hw_random/pasemi-rng.c
@@ -86,10 +86,8 @@ static struct hwrng pasemi_rng = {
 static int rng_probe(struct platform_device *pdev)
 {
void __iomem *rng_regs;
-   struct resource *res;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   rng_regs = devm_ioremap_resource(>dev, res);
+   rng_regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(rng_regs))
return PTR_ERR(rng_regs);
 
-- 
2.7.4




[PATCH -next 12/13] hwrng: tx4939 - use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/char/hw_random/tx4939-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/tx4939-rng.c 
b/drivers/char/hw_random/tx4939-rng.c
index 1093583..c8bd34e 100644
--- a/drivers/char/hw_random/tx4939-rng.c
+++ b/drivers/char/hw_random/tx4939-rng.c
@@ -107,14 +107,12 @@ static int tx4939_rng_data_read(struct hwrng *rng, u32 
*buffer)
 static int __init tx4939_rng_probe(struct platform_device *dev)
 {
struct tx4939_rng *rngdev;
-   struct resource *r;
int i;
 
rngdev = devm_kzalloc(>dev, sizeof(*rngdev), GFP_KERNEL);
if (!rngdev)
return -ENOMEM;
-   r = platform_get_resource(dev, IORESOURCE_MEM, 0);
-   rngdev->base = devm_ioremap_resource(>dev, r);
+   rngdev->base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(rngdev->base))
return PTR_ERR(rngdev->base);
 
-- 
2.7.4




[PATCH -next 13/13] hwrng: xgene - use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/char/hw_random/xgene-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/xgene-rng.c 
b/drivers/char/hw_random/xgene-rng.c
index 7e568db..d7516a4 100644
--- a/drivers/char/hw_random/xgene-rng.c
+++ b/drivers/char/hw_random/xgene-rng.c
@@ -313,7 +313,6 @@ static struct hwrng xgene_rng_func = {
 
 static int xgene_rng_probe(struct platform_device *pdev)
 {
-   struct resource *res;
struct xgene_rng_dev *ctx;
int rc = 0;
 
@@ -324,8 +323,7 @@ static int xgene_rng_probe(struct platform_device *pdev)
ctx->dev = >dev;
platform_set_drvdata(pdev, ctx);
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   ctx->csr_base = devm_ioremap_resource(>dev, res);
+   ctx->csr_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ctx->csr_base))
return PTR_ERR(ctx->csr_base);
 
-- 
2.7.4




[PATCH -next 11/13] hwrng: st - use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/char/hw_random/st-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c
index 8634483..783c24e 100644
--- a/drivers/char/hw_random/st-rng.c
+++ b/drivers/char/hw_random/st-rng.c
@@ -72,7 +72,6 @@ static int st_rng_read(struct hwrng *rng, void *data, size_t 
max, bool wait)
 static int st_rng_probe(struct platform_device *pdev)
 {
struct st_rng_data *ddata;
-   struct resource *res;
struct clk *clk;
void __iomem *base;
int ret;
@@ -81,8 +80,7 @@ static int st_rng_probe(struct platform_device *pdev)
if (!ddata)
return -ENOMEM;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   base = devm_ioremap_resource(>dev, res);
+   base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
 
-- 
2.7.4




[PATCH -next 10/13] hwrng: pic32 - use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/char/hw_random/pic32-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/pic32-rng.c 
b/drivers/char/hw_random/pic32-rng.c
index 90f498c..81080cb 100644
--- a/drivers/char/hw_random/pic32-rng.c
+++ b/drivers/char/hw_random/pic32-rng.c
@@ -70,7 +70,6 @@ static int pic32_rng_read(struct hwrng *rng, void *buf, 
size_t max,
 static int pic32_rng_probe(struct platform_device *pdev)
 {
struct pic32_rng *priv;
-   struct resource *res;
u32 v;
int ret;
 
@@ -78,8 +77,7 @@ static int pic32_rng_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   priv->base = devm_ioremap_resource(>dev, res);
+   priv->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
 
-- 
2.7.4




[PATCH -next 08/13] hwrng: omap - use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/char/hw_random/omap-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/omap-rng.c 
b/drivers/char/hw_random/omap-rng.c
index b27f396..b3f4a00 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -432,7 +432,6 @@ static int get_omap_rng_device_details(struct omap_rng_dev 
*omap_rng)
 static int omap_rng_probe(struct platform_device *pdev)
 {
struct omap_rng_dev *priv;
-   struct resource *res;
struct device *dev = >dev;
int ret;
 
@@ -449,8 +448,7 @@ static int omap_rng_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, priv);
priv->dev = dev;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   priv->base = devm_ioremap_resource(dev, res);
+   priv->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->base)) {
ret = PTR_ERR(priv->base);
goto err_ioremap;
-- 
2.7.4




[PATCH -next 07/13] hwrng: npcm - use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/char/hw_random/npcm-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/npcm-rng.c 
b/drivers/char/hw_random/npcm-rng.c
index b7c8c7e..01d0440 100644
--- a/drivers/char/hw_random/npcm-rng.c
+++ b/drivers/char/hw_random/npcm-rng.c
@@ -87,15 +87,13 @@ static int npcm_rng_read(struct hwrng *rng, void *buf, 
size_t max, bool wait)
 static int npcm_rng_probe(struct platform_device *pdev)
 {
struct npcm_rng *priv;
-   struct resource *res;
int ret;
 
priv = devm_kzalloc(>dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   priv->base = devm_ioremap_resource(>dev, res);
+   priv->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
 
-- 
2.7.4




[PATCH -next 06/13] hwrng: meson - use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/char/hw_random/meson-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/meson-rng.c 
b/drivers/char/hw_random/meson-rng.c
index 76e693d..e446236 100644
--- a/drivers/char/hw_random/meson-rng.c
+++ b/drivers/char/hw_random/meson-rng.c
@@ -42,7 +42,6 @@ static int meson_rng_probe(struct platform_device *pdev)
 {
struct device *dev = >dev;
struct meson_rng_data *data;
-   struct resource *res;
int ret;
 
data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
@@ -51,8 +50,7 @@ static int meson_rng_probe(struct platform_device *pdev)
 
data->pdev = pdev;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   data->base = devm_ioremap_resource(dev, res);
+   data->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(data->base))
return PTR_ERR(data->base);
 
-- 
2.7.4




[PATCH -next 04/13] hwrng: hisi - use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/char/hw_random/hisi-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/hisi-rng.c 
b/drivers/char/hw_random/hisi-rng.c
index c663d5d..6815e17 100644
--- a/drivers/char/hw_random/hisi-rng.c
+++ b/drivers/char/hw_random/hisi-rng.c
@@ -73,7 +73,6 @@ static int hisi_rng_read(struct hwrng *rng, void *buf, size_t 
max, bool wait)
 static int hisi_rng_probe(struct platform_device *pdev)
 {
struct hisi_rng *rng;
-   struct resource *res;
int ret;
 
rng = devm_kzalloc(>dev, sizeof(*rng), GFP_KERNEL);
@@ -82,8 +81,7 @@ static int hisi_rng_probe(struct platform_device *pdev)
 
platform_set_drvdata(pdev, rng);
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   rng->base = devm_ioremap_resource(>dev, res);
+   rng->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(rng->base))
return PTR_ERR(rng->base);
 
-- 
2.7.4




[PATCH -next 05/13] hwrng: ks-sa - use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/char/hw_random/ks-sa-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/ks-sa-rng.c 
b/drivers/char/hw_random/ks-sa-rng.c
index a674300..556400a 100644
--- a/drivers/char/hw_random/ks-sa-rng.c
+++ b/drivers/char/hw_random/ks-sa-rng.c
@@ -174,7 +174,6 @@ static int ks_sa_rng_probe(struct platform_device *pdev)
struct ks_sa_rng*ks_sa_rng;
struct device   *dev = >dev;
int ret;
-   struct resource *mem;
 
ks_sa_rng = devm_kzalloc(dev, sizeof(*ks_sa_rng), GFP_KERNEL);
if (!ks_sa_rng)
@@ -190,8 +189,7 @@ static int ks_sa_rng_probe(struct platform_device *pdev)
};
ks_sa_rng->rng.priv = (unsigned long)dev;
 
-   mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   ks_sa_rng->reg_rng = devm_ioremap_resource(dev, mem);
+   ks_sa_rng->reg_rng = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ks_sa_rng->reg_rng))
return PTR_ERR(ks_sa_rng->reg_rng);
 
-- 
2.7.4




[PATCH -next 00/13] hwrng: use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
devm_platform_ioremap_resource() internally have platform_get_resource()
and devm_ioremap_resource() in it. So instead of calling them separately
use devm_platform_ioremap_resource() directly.

YueHaibing (13):
  hwrng: atmel - use devm_platform_ioremap_resource() to simplify code
  hwrng: bcm2835 - use devm_platform_ioremap_resource() to simplify code
  hwrng: exynos - use devm_platform_ioremap_resource() to simplify code
  hwrng: hisi - use devm_platform_ioremap_resource() to simplify code
  hwrng: ks-sa - use devm_platform_ioremap_resource() to simplify code
  hwrng: meson - use devm_platform_ioremap_resource() to simplify code
  hwrng: npcm - use devm_platform_ioremap_resource() to simplify code
  hwrng: omap - use devm_platform_ioremap_resource() to simplify code
  hwrng: pasemi - use devm_platform_ioremap_resource() to simplify code
  hwrng: pic32 - use devm_platform_ioremap_resource() to simplify code
  hwrng: st - use devm_platform_ioremap_resource() to simplify code
  hwrng: tx4939 - use devm_platform_ioremap_resource() to simplify code
  hwrng: xgene - use devm_platform_ioremap_resource() to simplify code

 drivers/char/hw_random/atmel-rng.c   | 4 +---
 drivers/char/hw_random/bcm2835-rng.c | 5 +
 drivers/char/hw_random/exynos-trng.c | 4 +---
 drivers/char/hw_random/hisi-rng.c| 4 +---
 drivers/char/hw_random/ks-sa-rng.c   | 4 +---
 drivers/char/hw_random/meson-rng.c   | 4 +---
 drivers/char/hw_random/npcm-rng.c| 4 +---
 drivers/char/hw_random/omap-rng.c| 4 +---
 drivers/char/hw_random/pasemi-rng.c  | 4 +---
 drivers/char/hw_random/pic32-rng.c   | 4 +---
 drivers/char/hw_random/st-rng.c  | 4 +---
 drivers/char/hw_random/tx4939-rng.c  | 4 +---
 drivers/char/hw_random/xgene-rng.c   | 4 +---
 13 files changed, 13 insertions(+), 40 deletions(-)

-- 
2.7.4




[PATCH -next 02/13] hwrng: bcm2835 - use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/char/hw_random/bcm2835-rng.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/char/hw_random/bcm2835-rng.c 
b/drivers/char/hw_random/bcm2835-rng.c
index f759790..d2a5791 100644
--- a/drivers/char/hw_random/bcm2835-rng.c
+++ b/drivers/char/hw_random/bcm2835-rng.c
@@ -142,7 +142,6 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
struct device_node *np = dev->of_node;
const struct of_device_id *rng_id;
struct bcm2835_rng_priv *priv;
-   struct resource *r;
int err;
 
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -151,10 +150,8 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
 
platform_set_drvdata(pdev, priv);
 
-   r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
/* map peripheral */
-   priv->base = devm_ioremap_resource(dev, r);
+   priv->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
 
-- 
2.7.4




[PATCH -next 03/13] hwrng: exynos - use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/char/hw_random/exynos-trng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/exynos-trng.c 
b/drivers/char/hw_random/exynos-trng.c
index b4b52ab..8e1fe3f 100644
--- a/drivers/char/hw_random/exynos-trng.c
+++ b/drivers/char/hw_random/exynos-trng.c
@@ -109,7 +109,6 @@ static int exynos_trng_init(struct hwrng *rng)
 static int exynos_trng_probe(struct platform_device *pdev)
 {
struct exynos_trng_dev *trng;
-   struct resource *res;
int ret = -ENOMEM;
 
trng = devm_kzalloc(>dev, sizeof(*trng), GFP_KERNEL);
@@ -128,8 +127,7 @@ static int exynos_trng_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, trng);
trng->dev = >dev;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   trng->mem = devm_ioremap_resource(>dev, res);
+   trng->mem = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(trng->mem))
return PTR_ERR(trng->mem);
 
-- 
2.7.4




[PATCH -next 01/13] hwrng: atmel - use devm_platform_ioremap_resource() to simplify code

2019-10-16 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing 
---
 drivers/char/hw_random/atmel-rng.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/atmel-rng.c 
b/drivers/char/hw_random/atmel-rng.c
index e557057..b3138ec2 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -62,15 +62,13 @@ static void atmel_trng_disable(struct atmel_trng *trng)
 static int atmel_trng_probe(struct platform_device *pdev)
 {
struct atmel_trng *trng;
-   struct resource *res;
int ret;
 
trng = devm_kzalloc(>dev, sizeof(*trng), GFP_KERNEL);
if (!trng)
return -ENOMEM;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   trng->base = devm_ioremap_resource(>dev, res);
+   trng->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(trng->base))
return PTR_ERR(trng->base);
 
-- 
2.7.4




[PATCH v2 -next] ASoC: fsl_mqs: Move static keyword to the front of declarations

2019-10-11 Thread YueHaibing
gcc warn about this:

sound/soc/fsl/fsl_mqs.c:146:1: warning:
 static is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: YueHaibing 
---
v2: Fix patch title
---
 sound/soc/fsl/fsl_mqs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_mqs.c b/sound/soc/fsl/fsl_mqs.c
index f7fc44e..0c813a4 100644
--- a/sound/soc/fsl/fsl_mqs.c
+++ b/sound/soc/fsl/fsl_mqs.c
@@ -143,7 +143,7 @@ static void fsl_mqs_shutdown(struct snd_pcm_substream 
*substream,
   MQS_EN_MASK, 0);
 }
 
-const static struct snd_soc_component_driver soc_codec_fsl_mqs = {
+static const struct snd_soc_component_driver soc_codec_fsl_mqs = {
.idle_bias_on = 1,
.non_legacy_dai_naming  = 1,
 };
-- 
2.7.4




Re: [PATCH -next] ASoC: fsl_mqs: fix old-style function declaration

2019-10-11 Thread Yuehaibing
On 2019/10/11 21:12, Andreas Schwab wrote:
> On Okt 11 2019, YueHaibing  wrote:
> 
>> gcc warn about this:
>>
>> sound/soc/fsl/fsl_mqs.c:146:1: warning:
>>  static is not at beginning of declaration [-Wold-style-declaration]
> 
> It's not a function, though.

Oh..., will fix this, thanks!

> 
> Andreas.
> 



[PATCH -next] ASoC: fsl_mqs: fix old-style function declaration

2019-10-11 Thread YueHaibing
gcc warn about this:

sound/soc/fsl/fsl_mqs.c:146:1: warning:
 static is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: YueHaibing 
---
 sound/soc/fsl/fsl_mqs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_mqs.c b/sound/soc/fsl/fsl_mqs.c
index f7fc44e..0c813a4 100644
--- a/sound/soc/fsl/fsl_mqs.c
+++ b/sound/soc/fsl/fsl_mqs.c
@@ -143,7 +143,7 @@ static void fsl_mqs_shutdown(struct snd_pcm_substream 
*substream,
   MQS_EN_MASK, 0);
 }
 
-const static struct snd_soc_component_driver soc_codec_fsl_mqs = {
+static const struct snd_soc_component_driver soc_codec_fsl_mqs = {
.idle_bias_on = 1,
.non_legacy_dai_naming  = 1,
 };
-- 
2.7.4




[PATCH -next] ASoC: fsl_mqs: remove set but not used variable 'bclk'

2019-10-06 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning:

sound/soc/fsl/fsl_mqs.c: In function fsl_mqs_hw_params:
sound/soc/fsl/fsl_mqs.c:54:6: warning: variable bclk set but not used 
[-Wunused-but-set-variable]

It is never used, so can be removed.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/fsl/fsl_mqs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/fsl/fsl_mqs.c b/sound/soc/fsl/fsl_mqs.c
index c1619a5..7b9cab3 100644
--- a/sound/soc/fsl/fsl_mqs.c
+++ b/sound/soc/fsl/fsl_mqs.c
@@ -51,10 +51,9 @@ static int fsl_mqs_hw_params(struct snd_pcm_substream 
*substream,
struct fsl_mqs *mqs_priv = snd_soc_component_get_drvdata(component);
unsigned long mclk_rate;
int div, res;
-   int bclk, lrclk;
+   int lrclk;
 
mclk_rate = clk_get_rate(mqs_priv->mclk);
-   bclk = snd_soc_params_to_bclk(params);
lrclk = params_rate(params);
 
/*
-- 
2.7.4




[PATCH -next] crypto: nx - remove unused variables 'nx_driver_string' and 'nx_driver_version'

2019-08-22 Thread YueHaibing
drivers/crypto/nx/nx.h:12:19: warning:
 nx_driver_string defined but not used [-Wunused-const-variable=]
drivers/crypto/nx/nx.h:13:19: warning:
 nx_driver_version defined but not used [-Wunused-const-variable=]

They are never used, so just remove it.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 drivers/crypto/nx/nx.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/crypto/nx/nx.h b/drivers/crypto/nx/nx.h
index c6b5a3b..7ecca16 100644
--- a/drivers/crypto/nx/nx.h
+++ b/drivers/crypto/nx/nx.h
@@ -9,9 +9,6 @@
 #define NX_STRING  "IBM Power7+ Nest Accelerator Crypto Driver"
 #define NX_VERSION "1.0"
 
-static const char nx_driver_string[] = NX_STRING;
-static const char nx_driver_version[] = NX_VERSION;
-
 /* a scatterlist in the format PHYP is expecting */
 struct nx_sg {
u64 addr;
-- 
2.7.4




[PATCH -next 34/34] ASoC: sun8i-codec: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/sunxi/sun8i-codec.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index 0e0e8eb..55798bc 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -533,7 +533,6 @@ static const struct regmap_config sun8i_codec_regmap_config 
= {
 
 static int sun8i_codec_probe(struct platform_device *pdev)
 {
-   struct resource *res_base;
struct sun8i_codec *scodec;
void __iomem *base;
int ret;
@@ -556,8 +555,7 @@ static int sun8i_codec_probe(struct platform_device *pdev)
return PTR_ERR(scodec->clk_bus);
}
 
-   res_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   base = devm_ioremap_resource(>dev, res_base);
+   base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base)) {
dev_err(>dev, "Failed to map the registers\n");
return PTR_ERR(base);
-- 
2.7.4




[PATCH -next 33/34] ASoC: sunxi: sun50i-codec-analog: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/sunxi/sun50i-codec-analog.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/sunxi/sun50i-codec-analog.c 
b/sound/soc/sunxi/sun50i-codec-analog.c
index 6d1de56..f5b7069 100644
--- a/sound/soc/sunxi/sun50i-codec-analog.c
+++ b/sound/soc/sunxi/sun50i-codec-analog.c
@@ -459,12 +459,10 @@ MODULE_DEVICE_TABLE(of, sun50i_codec_analog_of_match);
 
 static int sun50i_codec_analog_probe(struct platform_device *pdev)
 {
-   struct resource *res;
struct regmap *regmap;
void __iomem *base;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   base = devm_ioremap_resource(>dev, res);
+   base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base)) {
dev_err(>dev, "Failed to map the registers\n");
return PTR_ERR(base);
-- 
2.7.4




[PATCH -next 32/34] ASoC: sun8i-codec-analog: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/sunxi/sun8i-codec-analog.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec-analog.c 
b/sound/soc/sunxi/sun8i-codec-analog.c
index e92aeed..be872ee 100644
--- a/sound/soc/sunxi/sun8i-codec-analog.c
+++ b/sound/soc/sunxi/sun8i-codec-analog.c
@@ -819,12 +819,10 @@ MODULE_DEVICE_TABLE(of, sun8i_codec_analog_of_match);
 
 static int sun8i_codec_analog_probe(struct platform_device *pdev)
 {
-   struct resource *res;
struct regmap *regmap;
void __iomem *base;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   base = devm_ioremap_resource(>dev, res);
+   base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base)) {
dev_err(>dev, "Failed to map the registers\n");
return PTR_ERR(base);
-- 
2.7.4




[PATCH -next 31/34] ASoC: xlnx: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/xilinx/xlnx_i2s.c   | 4 +---
 sound/soc/xilinx/xlnx_spdif.c | 3 +--
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/sound/soc/xilinx/xlnx_i2s.c b/sound/soc/xilinx/xlnx_i2s.c
index 8b35316..cc641e5 100644
--- a/sound/soc/xilinx/xlnx_i2s.c
+++ b/sound/soc/xilinx/xlnx_i2s.c
@@ -95,7 +95,6 @@ MODULE_DEVICE_TABLE(of, xlnx_i2s_of_match);
 
 static int xlnx_i2s_probe(struct platform_device *pdev)
 {
-   struct resource *res;
void __iomem *base;
struct snd_soc_dai_driver *dai_drv;
int ret;
@@ -107,8 +106,7 @@ static int xlnx_i2s_probe(struct platform_device *pdev)
if (!dai_drv)
return -ENOMEM;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   base = devm_ioremap_resource(>dev, res);
+   base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
 
diff --git a/sound/soc/xilinx/xlnx_spdif.c b/sound/soc/xilinx/xlnx_spdif.c
index 3b9000f..e2ca087 100644
--- a/sound/soc/xilinx/xlnx_spdif.c
+++ b/sound/soc/xilinx/xlnx_spdif.c
@@ -260,8 +260,7 @@ static int xlnx_spdif_probe(struct platform_device *pdev)
return ret;
}
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   ctx->base = devm_ioremap_resource(dev, res);
+   ctx->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ctx->base)) {
ret = PTR_ERR(ctx->base);
goto clk_err;
-- 
2.7.4




[PATCH -next 30/34] ASoC: meson: axg-fifo: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/meson/axg-fifo.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
index 01c1c7d..80a3dde 100644
--- a/sound/soc/meson/axg-fifo.c
+++ b/sound/soc/meson/axg-fifo.c
@@ -314,7 +314,6 @@ int axg_fifo_probe(struct platform_device *pdev)
struct device *dev = >dev;
const struct axg_fifo_match_data *data;
struct axg_fifo *fifo;
-   struct resource *res;
void __iomem *regs;
 
data = of_device_get_match_data(dev);
@@ -328,8 +327,7 @@ int axg_fifo_probe(struct platform_device *pdev)
return -ENOMEM;
platform_set_drvdata(pdev, fifo);
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   regs = devm_ioremap_resource(dev, res);
+   regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
return PTR_ERR(regs);
 
-- 
2.7.4




[PATCH -next 28/34] ASoC: meson: axg-spdifin: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/meson/axg-spdifin.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/meson/axg-spdifin.c b/sound/soc/meson/axg-spdifin.c
index 01b2035..d0d09f9 100644
--- a/sound/soc/meson/axg-spdifin.c
+++ b/sound/soc/meson/axg-spdifin.c
@@ -453,7 +453,6 @@ static int axg_spdifin_probe(struct platform_device *pdev)
struct device *dev = >dev;
struct axg_spdifin *priv;
struct snd_soc_dai_driver *dai_drv;
-   struct resource *res;
void __iomem *regs;
int ret;
 
@@ -468,8 +467,7 @@ static int axg_spdifin_probe(struct platform_device *pdev)
return -ENODEV;
}
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   regs = devm_ioremap_resource(dev, res);
+   regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
return PTR_ERR(regs);
 
-- 
2.7.4




[PATCH -next 29/34] ASoC: meson: axg-spdifout: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/meson/axg-spdifout.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/meson/axg-spdifout.c b/sound/soc/meson/axg-spdifout.c
index 9dea528..7ce6aa97 100644
--- a/sound/soc/meson/axg-spdifout.c
+++ b/sound/soc/meson/axg-spdifout.c
@@ -401,7 +401,6 @@ static int axg_spdifout_probe(struct platform_device *pdev)
 {
struct device *dev = >dev;
struct axg_spdifout *priv;
-   struct resource *res;
void __iomem *regs;
int ret;
 
@@ -410,8 +409,7 @@ static int axg_spdifout_probe(struct platform_device *pdev)
return -ENOMEM;
platform_set_drvdata(pdev, priv);
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   regs = devm_ioremap_resource(dev, res);
+   regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
return PTR_ERR(regs);
 
-- 
2.7.4




[PATCH -next 27/34] ASoC: meson: axg-pdm: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/meson/axg-pdm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/meson/axg-pdm.c b/sound/soc/meson/axg-pdm.c
index 9d56844..bfd37d4 100644
--- a/sound/soc/meson/axg-pdm.c
+++ b/sound/soc/meson/axg-pdm.c
@@ -585,7 +585,6 @@ static int axg_pdm_probe(struct platform_device *pdev)
 {
struct device *dev = >dev;
struct axg_pdm *priv;
-   struct resource *res;
void __iomem *regs;
int ret;
 
@@ -600,8 +599,7 @@ static int axg_pdm_probe(struct platform_device *pdev)
return -ENODEV;
}
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   regs = devm_ioremap_resource(dev, res);
+   regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
return PTR_ERR(regs);
 
-- 
2.7.4




[PATCH -next 26/34] ASoC: meson: axg-tdm-formatter: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/meson/axg-tdm-formatter.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/meson/axg-tdm-formatter.c 
b/sound/soc/meson/axg-tdm-formatter.c
index 2e49820..21c735a 100644
--- a/sound/soc/meson/axg-tdm-formatter.c
+++ b/sound/soc/meson/axg-tdm-formatter.c
@@ -253,7 +253,6 @@ int axg_tdm_formatter_probe(struct platform_device *pdev)
struct device *dev = >dev;
const struct axg_tdm_formatter_driver *drv;
struct axg_tdm_formatter *formatter;
-   struct resource *res;
void __iomem *regs;
int ret;
 
@@ -269,8 +268,7 @@ int axg_tdm_formatter_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, formatter);
formatter->drv = drv;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   regs = devm_ioremap_resource(dev, res);
+   regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
return PTR_ERR(regs);
 
-- 
2.7.4




[PATCH -next 25/34] ASoC: meson: g12a-tohdmitx: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/meson/g12a-tohdmitx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/meson/g12a-tohdmitx.c b/sound/soc/meson/g12a-tohdmitx.c
index 707ccb1..6ae0c4f 100644
--- a/sound/soc/meson/g12a-tohdmitx.c
+++ b/sound/soc/meson/g12a-tohdmitx.c
@@ -378,12 +378,10 @@ MODULE_DEVICE_TABLE(of, g12a_tohdmitx_of_match);
 static int g12a_tohdmitx_probe(struct platform_device *pdev)
 {
struct device *dev = >dev;
-   struct resource *res;
void __iomem *regs;
struct regmap *map;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   regs = devm_ioremap_resource(dev, res);
+   regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
return PTR_ERR(regs);
 
-- 
2.7.4




[PATCH -next 24/34] ASoC: au1x: psc-i2s: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/au1x/psc-i2s.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c
index 076303f..767ce95 100644
--- a/sound/soc/au1x/psc-i2s.c
+++ b/sound/soc/au1x/psc-i2s.c
@@ -291,7 +291,7 @@ static const struct snd_soc_component_driver 
au1xpsc_i2s_component = {
 
 static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
 {
-   struct resource *iores, *dmares;
+   struct resource *dmares;
unsigned long sel;
struct au1xpsc_audio_data *wd;
 
@@ -300,8 +300,7 @@ static int au1xpsc_i2s_drvprobe(struct platform_device 
*pdev)
if (!wd)
return -ENOMEM;
 
-   iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   wd->mmio = devm_ioremap_resource(>dev, iores);
+   wd->mmio = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(wd->mmio))
return PTR_ERR(wd->mmio);
 
-- 
2.7.4




[PATCH -next 23/34] ASoC: psc-ac97: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/au1x/psc-ac97.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c
index 21e5f6a..08bc04e 100644
--- a/sound/soc/au1x/psc-ac97.c
+++ b/sound/soc/au1x/psc-ac97.c
@@ -363,7 +363,7 @@ static const struct snd_soc_component_driver 
au1xpsc_ac97_component = {
 static int au1xpsc_ac97_drvprobe(struct platform_device *pdev)
 {
int ret;
-   struct resource *iores, *dmares;
+   struct resource *dmares;
unsigned long sel;
struct au1xpsc_audio_data *wd;
 
@@ -374,8 +374,7 @@ static int au1xpsc_ac97_drvprobe(struct platform_device 
*pdev)
 
mutex_init(>lock);
 
-   iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   wd->mmio = devm_ioremap_resource(>dev, iores);
+   wd->mmio = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(wd->mmio))
return PTR_ERR(wd->mmio);
 
-- 
2.7.4




[PATCH -next 22/34] ASoC: uniphier: aio-dma: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/uniphier/aio-dma.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/uniphier/aio-dma.c b/sound/soc/uniphier/aio-dma.c
index fa001d3..862346d 100644
--- a/sound/soc/uniphier/aio-dma.c
+++ b/sound/soc/uniphier/aio-dma.c
@@ -276,12 +276,10 @@ int uniphier_aiodma_soc_register_platform(struct 
platform_device *pdev)
 {
struct uniphier_aio_chip *chip = platform_get_drvdata(pdev);
struct device *dev = >dev;
-   struct resource *res;
void __iomem *preg;
int irq, ret;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   preg = devm_ioremap_resource(dev, res);
+   preg = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(preg))
return PTR_ERR(preg);
 
-- 
2.7.4




[PATCH -next 21/34] ASoC: uniphier: evea: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/uniphier/evea.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/uniphier/evea.c b/sound/soc/uniphier/evea.c
index f9c1016..d27e9ca 100644
--- a/sound/soc/uniphier/evea.c
+++ b/sound/soc/uniphier/evea.c
@@ -451,7 +451,6 @@ static const struct regmap_config evea_regmap_config = {
 static int evea_probe(struct platform_device *pdev)
 {
struct evea_priv *evea;
-   struct resource *res;
void __iomem *preg;
int ret;
 
@@ -475,8 +474,7 @@ static int evea_probe(struct platform_device *pdev)
if (IS_ERR(evea->rst_exiv))
return PTR_ERR(evea->rst_exiv);
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   preg = devm_ioremap_resource(>dev, res);
+   preg = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(preg))
return PTR_ERR(preg);
 
-- 
2.7.4




[PATCH -next 20/34] ASoC: inno_rk3036: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/codecs/inno_rk3036.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/inno_rk3036.c b/sound/soc/codecs/inno_rk3036.c
index 7feedbb..14d8fe1 100644
--- a/sound/soc/codecs/inno_rk3036.c
+++ b/sound/soc/codecs/inno_rk3036.c
@@ -405,7 +405,6 @@ static int rk3036_codec_platform_probe(struct 
platform_device *pdev)
 {
struct rk3036_codec_priv *priv;
struct device_node *of_node = pdev->dev.of_node;
-   struct resource *res;
void __iomem *base;
struct regmap *grf;
int ret;
@@ -414,8 +413,7 @@ static int rk3036_codec_platform_probe(struct 
platform_device *pdev)
if (!priv)
return -ENOMEM;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   base = devm_ioremap_resource(>dev, res);
+   base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
 
-- 
2.7.4




[PATCH -next 19/34] ASoC: jz4740: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/codecs/jz4740.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c
index 974e17f..460aa1f 100644
--- a/sound/soc/codecs/jz4740.c
+++ b/sound/soc/codecs/jz4740.c
@@ -318,7 +318,6 @@ static int jz4740_codec_probe(struct platform_device *pdev)
 {
int ret;
struct jz4740_codec *jz4740_codec;
-   struct resource *mem;
void __iomem *base;
 
jz4740_codec = devm_kzalloc(>dev, sizeof(*jz4740_codec),
@@ -326,8 +325,7 @@ static int jz4740_codec_probe(struct platform_device *pdev)
if (!jz4740_codec)
return -ENOMEM;
 
-   mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   base = devm_ioremap_resource(>dev, mem);
+   base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
 
-- 
2.7.4




[PATCH -next 18/34] ASoC: mmp-sspa: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/pxa/mmp-sspa.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/pxa/mmp-sspa.c b/sound/soc/pxa/mmp-sspa.c
index 72f4364..e3e5425 100644
--- a/sound/soc/pxa/mmp-sspa.c
+++ b/sound/soc/pxa/mmp-sspa.c
@@ -399,7 +399,6 @@ static const struct snd_soc_component_driver 
mmp_sspa_component = {
 static int asoc_mmp_sspa_probe(struct platform_device *pdev)
 {
struct sspa_priv *priv;
-   struct resource *res;
 
priv = devm_kzalloc(>dev,
sizeof(struct sspa_priv), GFP_KERNEL);
@@ -417,8 +416,7 @@ static int asoc_mmp_sspa_probe(struct platform_device *pdev)
if (priv->dma_params == NULL)
return -ENOMEM;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   priv->sspa->mmio_base = devm_ioremap_resource(>dev, res);
+   priv->sspa->mmio_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->sspa->mmio_base))
return PTR_ERR(priv->sspa->mmio_base);
 
-- 
2.7.4




[PATCH -next 17/34] ASoC: codecs: jz4725b: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/codecs/jz4725b.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/jz4725b.c b/sound/soc/codecs/jz4725b.c
index 766354c..2567a5d 100644
--- a/sound/soc/codecs/jz4725b.c
+++ b/sound/soc/codecs/jz4725b.c
@@ -545,15 +545,13 @@ static int jz4725b_codec_probe(struct platform_device 
*pdev)
 {
struct device *dev = >dev;
struct jz_icdc *icdc;
-   struct resource *mem;
int ret;
 
icdc = devm_kzalloc(dev, sizeof(*icdc), GFP_KERNEL);
if (!icdc)
return -ENOMEM;
 
-   mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   icdc->base = devm_ioremap_resource(dev, mem);
+   icdc->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(icdc->base))
return PTR_ERR(icdc->base);
 
-- 
2.7.4




[PATCH -next 16/34] ASoC: codecs: msm8916-wcd: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/codecs/msm8916-wcd-digital.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/msm8916-wcd-digital.c 
b/sound/soc/codecs/msm8916-wcd-digital.c
index 1db7e43..9fa5d44 100644
--- a/sound/soc/codecs/msm8916-wcd-digital.c
+++ b/sound/soc/codecs/msm8916-wcd-digital.c
@@ -1143,7 +1143,6 @@ static int msm8916_wcd_digital_probe(struct 
platform_device *pdev)
struct msm8916_wcd_digital_priv *priv;
struct device *dev = >dev;
void __iomem *base;
-   struct resource *mem_res;
struct regmap *digital_map;
int ret;
 
@@ -1151,8 +1150,7 @@ static int msm8916_wcd_digital_probe(struct 
platform_device *pdev)
if (!priv)
return -ENOMEM;
 
-   mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   base = devm_ioremap_resource(>dev, mem_res);
+   base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
 
-- 
2.7.4




[PATCH -next 14/34] ASoC: xtfpga-i2s: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/xtensa/xtfpga-i2s.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/xtensa/xtfpga-i2s.c b/sound/soc/xtensa/xtfpga-i2s.c
index 9ce2c75..9da395d 100644
--- a/sound/soc/xtensa/xtfpga-i2s.c
+++ b/sound/soc/xtensa/xtfpga-i2s.c
@@ -531,7 +531,6 @@ static int xtfpga_i2s_runtime_resume(struct device *dev)
 static int xtfpga_i2s_probe(struct platform_device *pdev)
 {
struct xtfpga_i2s *i2s;
-   struct resource *mem;
int err, irq;
 
i2s = devm_kzalloc(>dev, sizeof(*i2s), GFP_KERNEL);
@@ -543,8 +542,7 @@ static int xtfpga_i2s_probe(struct platform_device *pdev)
i2s->dev = >dev;
dev_dbg(>dev, "dev: %p, i2s: %p\n", >dev, i2s);
 
-   mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   i2s->regs = devm_ioremap_resource(>dev, mem);
+   i2s->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(i2s->regs)) {
err = PTR_ERR(i2s->regs);
goto err;
-- 
2.7.4




[PATCH -next 15/34] ASoC: stm32: sai: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/stm/stm32_sai.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c
index 63f68e6..1ac5103c 100644
--- a/sound/soc/stm/stm32_sai.c
+++ b/sound/soc/stm/stm32_sai.c
@@ -152,7 +152,6 @@ static int stm32_sai_probe(struct platform_device *pdev)
 {
struct stm32_sai_data *sai;
struct reset_control *rst;
-   struct resource *res;
const struct of_device_id *of_id;
u32 val;
int ret;
@@ -161,8 +160,7 @@ static int stm32_sai_probe(struct platform_device *pdev)
if (!sai)
return -ENOMEM;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   sai->base = devm_ioremap_resource(>dev, res);
+   sai->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(sai->base))
return PTR_ERR(sai->base);
 
-- 
2.7.4




[PATCH -next 13/34] ASoC: kirkwood-i2s: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/kirkwood/kirkwood-i2s.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/kirkwood/kirkwood-i2s.c 
b/sound/soc/kirkwood/kirkwood-i2s.c
index 3446a113..5076ec4 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -523,7 +523,6 @@ static int kirkwood_i2s_dev_probe(struct platform_device 
*pdev)
struct kirkwood_asoc_platform_data *data = pdev->dev.platform_data;
struct snd_soc_dai_driver *soc_dai = kirkwood_i2s_dai;
struct kirkwood_dma_data *priv;
-   struct resource *mem;
struct device_node *np = pdev->dev.of_node;
int err;
 
@@ -533,8 +532,7 @@ static int kirkwood_i2s_dev_probe(struct platform_device 
*pdev)
 
dev_set_drvdata(>dev, priv);
 
-   mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   priv->io = devm_ioremap_resource(>dev, mem);
+   priv->io = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->io))
return PTR_ERR(priv->io);
 
-- 
2.7.4




[PATCH -next 12/34] ASoC: spear: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/spear/spdif_in.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/spear/spdif_in.c b/sound/soc/spear/spdif_in.c
index 78a6a36..4b68d6e 100644
--- a/sound/soc/spear/spdif_in.c
+++ b/sound/soc/spear/spdif_in.c
@@ -202,12 +202,11 @@ static int spdif_in_probe(struct platform_device *pdev)
 {
struct spdif_in_dev *host;
struct spear_spdif_platform_data *pdata;
-   struct resource *res, *res_fifo;
+   struct resource *res_fifo;
void __iomem *io_base;
int ret;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   io_base = devm_ioremap_resource(>dev, res);
+   io_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(io_base))
return PTR_ERR(io_base);
 
-- 
2.7.4




[PATCH -next 11/34] ASoC: mxs-saif: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/mxs/mxs-saif.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index 269b6d6..a2c7942 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -732,7 +732,6 @@ static int mxs_saif_mclk_init(struct platform_device *pdev)
 static int mxs_saif_probe(struct platform_device *pdev)
 {
struct device_node *np = pdev->dev.of_node;
-   struct resource *iores;
struct mxs_saif *saif;
int irq, ret = 0;
struct device_node *master;
@@ -786,9 +785,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
return ret;
}
 
-   iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
-   saif->base = devm_ioremap_resource(>dev, iores);
+   saif->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(saif->base))
return PTR_ERR(saif->base);
 
-- 
2.7.4




[PATCH -next 10/34] ASoC: sirf: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/sirf/sirf-usp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/sirf/sirf-usp.c b/sound/soc/sirf/sirf-usp.c
index 8bab119c..2af0c6f 100644
--- a/sound/soc/sirf/sirf-usp.c
+++ b/sound/soc/sirf/sirf-usp.c
@@ -359,7 +359,6 @@ static int sirf_usp_pcm_probe(struct platform_device *pdev)
int ret;
struct sirf_usp *usp;
void __iomem *base;
-   struct resource *mem_res;
 
usp = devm_kzalloc(>dev, sizeof(struct sirf_usp),
GFP_KERNEL);
@@ -368,8 +367,7 @@ static int sirf_usp_pcm_probe(struct platform_device *pdev)
 
platform_set_drvdata(pdev, usp);
 
-   mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   base = devm_ioremap_resource(>dev, mem_res);
+   base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
usp->regmap = devm_regmap_init_mmio(>dev, base,
-- 
2.7.4




[PATCH -next 09/34] ASoC: bcm2835-i2s: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/bcm/bcm2835-i2s.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c
index 5ef80f3..e6a12e2 100644
--- a/sound/soc/bcm/bcm2835-i2s.c
+++ b/sound/soc/bcm/bcm2835-i2s.c
@@ -828,7 +828,6 @@ static int bcm2835_i2s_probe(struct platform_device *pdev)
 {
struct bcm2835_i2s_dev *dev;
int ret;
-   struct resource *mem;
void __iomem *base;
const __be32 *addr;
dma_addr_t dma_base;
@@ -848,8 +847,7 @@ static int bcm2835_i2s_probe(struct platform_device *pdev)
}
 
/* Request ioarea */
-   mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   base = devm_ioremap_resource(>dev, mem);
+   base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
 
-- 
2.7.4




[PATCH -next 08/34] ASoC: fsl_audmix: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/fsl/fsl_audmix.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c
index 3897a54..c7e4e97 100644
--- a/sound/soc/fsl/fsl_audmix.c
+++ b/sound/soc/fsl/fsl_audmix.c
@@ -458,7 +458,6 @@ static int fsl_audmix_probe(struct platform_device *pdev)
 {
struct device *dev = >dev;
struct fsl_audmix *priv;
-   struct resource *res;
const char *mdrv;
const struct of_device_id *of_id;
void __iomem *regs;
@@ -475,8 +474,7 @@ static int fsl_audmix_probe(struct platform_device *pdev)
return -ENOMEM;
 
/* Get the addresses */
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   regs = devm_ioremap_resource(dev, res);
+   regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
return PTR_ERR(regs);
 
-- 
2.7.4




[PATCH -next 07/34] ASoC: imx-audmux: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/fsl/imx-audmux.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index b2351cd..7595f24 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -298,12 +298,10 @@ static int imx_audmux_parse_dt_defaults(struct 
platform_device *pdev,
 
 static int imx_audmux_probe(struct platform_device *pdev)
 {
-   struct resource *res;
const struct of_device_id *of_id =
of_match_device(imx_audmux_dt_ids, >dev);
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   audmux_base = devm_ioremap_resource(>dev, res);
+   audmux_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(audmux_base))
return PTR_ERR(audmux_base);
 
-- 
2.7.4




[PATCH -next 06/34] ASoC: mt6797: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c 
b/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c
index 08a6532..dea0e07 100644
--- a/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c
+++ b/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c
@@ -749,7 +749,6 @@ static int mt6797_afe_pcm_dev_probe(struct platform_device 
*pdev)
 {
struct mtk_base_afe *afe;
struct mt6797_afe_private *afe_priv;
-   struct resource *res;
struct device *dev;
int i, irq_id, ret;
 
@@ -774,9 +773,7 @@ static int mt6797_afe_pcm_dev_probe(struct platform_device 
*pdev)
}
 
/* regmap init */
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
-   afe->base_addr = devm_ioremap_resource(>dev, res);
+   afe->base_addr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(afe->base_addr))
return PTR_ERR(afe->base_addr);
 
-- 
2.7.4




[PATCH -next 05/34] ASoC: mt8173: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c 
b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
index 0382896..90bd2c9 100644
--- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
+++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
@@ -1056,7 +1056,6 @@ static int mt8173_afe_pcm_dev_probe(struct 
platform_device *pdev)
int irq_id;
struct mtk_base_afe *afe;
struct mt8173_afe_private *afe_priv;
-   struct resource *res;
 
ret = dma_set_mask_and_coherent(>dev, DMA_BIT_MASK(33));
if (ret)
@@ -1086,8 +1085,7 @@ static int mt8173_afe_pcm_dev_probe(struct 
platform_device *pdev)
return ret;
}
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   afe->base_addr = devm_ioremap_resource(>dev, res);
+   afe->base_addr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(afe->base_addr))
return PTR_ERR(afe->base_addr);
 
-- 
2.7.4




[PATCH -next 04/34] ASoC: ep93xx-i2s: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/cirrus/ep93xx-i2s.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c
index 0b4355e..7d9cf67 100644
--- a/sound/soc/cirrus/ep93xx-i2s.c
+++ b/sound/soc/cirrus/ep93xx-i2s.c
@@ -430,15 +430,13 @@ static const struct snd_soc_component_driver 
ep93xx_i2s_component = {
 static int ep93xx_i2s_probe(struct platform_device *pdev)
 {
struct ep93xx_i2s_info *info;
-   struct resource *res;
int err;
 
info = devm_kzalloc(>dev, sizeof(*info), GFP_KERNEL);
if (!info)
return -ENOMEM;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   info->regs = devm_ioremap_resource(>dev, res);
+   info->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(info->regs))
return PTR_ERR(info->regs);
 
-- 
2.7.4




[PATCH -next 03/34] ASoC: rockchip: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/codecs/rk3328_codec.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/rk3328_codec.c b/sound/soc/codecs/rk3328_codec.c
index 24f8f86..287c962 100644
--- a/sound/soc/codecs/rk3328_codec.c
+++ b/sound/soc/codecs/rk3328_codec.c
@@ -432,7 +432,6 @@ static int rk3328_platform_probe(struct platform_device 
*pdev)
 {
struct device_node *rk3328_np = pdev->dev.of_node;
struct rk3328_codec_priv *rk3328;
-   struct resource *res;
struct regmap *grf;
void __iomem *base;
int ret = 0;
@@ -482,8 +481,7 @@ static int rk3328_platform_probe(struct platform_device 
*pdev)
return ret;
}
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   base = devm_ioremap_resource(>dev, res);
+   base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
 
-- 
2.7.4




[PATCH -next 02/34] ASoC: tegra: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/tegra/tegra30_i2s.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
index ac6983c..e6d548f 100644
--- a/sound/soc/tegra/tegra30_i2s.c
+++ b/sound/soc/tegra/tegra30_i2s.c
@@ -368,7 +368,6 @@ static int tegra30_i2s_platform_probe(struct 
platform_device *pdev)
struct tegra30_i2s *i2s;
const struct of_device_id *match;
u32 cif_ids[2];
-   struct resource *mem;
void __iomem *regs;
int ret;
 
@@ -406,8 +405,7 @@ static int tegra30_i2s_platform_probe(struct 
platform_device *pdev)
goto err;
}
 
-   mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   regs = devm_ioremap_resource(>dev, mem);
+   regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs)) {
ret = PTR_ERR(regs);
goto err_clk_put;
-- 
2.7.4




[PATCH -next 01/34] ASoC: tegra20_das: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 sound/soc/tegra/tegra20_das.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/tegra/tegra20_das.c b/sound/soc/tegra/tegra20_das.c
index 10f9c3b..1070b27 100644
--- a/sound/soc/tegra/tegra20_das.c
+++ b/sound/soc/tegra/tegra20_das.c
@@ -120,7 +120,6 @@ static const struct regmap_config tegra20_das_regmap_config 
= {
 
 static int tegra20_das_probe(struct platform_device *pdev)
 {
-   struct resource *res;
void __iomem *regs;
int ret = 0;
 
@@ -134,8 +133,7 @@ static int tegra20_das_probe(struct platform_device *pdev)
}
das->dev = >dev;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   regs = devm_ioremap_resource(>dev, res);
+   regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs)) {
ret = PTR_ERR(regs);
goto err;
-- 
2.7.4




[PATCH -next 00/34] ASoC: use devm_platform_ioremap_resource() to simplify code

2019-07-27 Thread YueHaibing
devm_platform_ioremap_resource() internally have platform_get_resource()
and devm_ioremap_resource() in it. So instead of calling them separately
use devm_platform_ioremap_resource() directly.

YueHaibing (34):
  ASoC: tegra20_das: use devm_platform_ioremap_resource() to simplify
code
  ASoC: tegra: use devm_platform_ioremap_resource() to simplify code
  ASoC: rockchip: use devm_platform_ioremap_resource() to simplify code
  ASoC: ep93xx-i2s: use devm_platform_ioremap_resource() to simplify
code
  ASoC: mt8173: use devm_platform_ioremap_resource() to simplify code
  ASoC: mt6797: use devm_platform_ioremap_resource() to simplify code
  ASoC: imx-audmux: use devm_platform_ioremap_resource() to simplify
code
  ASoC: fsl_audmix: use devm_platform_ioremap_resource() to simplify
code
  ASoC: bcm2835-i2s: use devm_platform_ioremap_resource() to simplify
code
  ASoC: sirf: use devm_platform_ioremap_resource() to simplify code
  ASoC: mxs-saif: use devm_platform_ioremap_resource() to simplify code
  ASoC: spear: use devm_platform_ioremap_resource() to simplify code
  ASoC: kirkwood-i2s: use devm_platform_ioremap_resource() to simplify
code
  ASoC: xtfpga-i2s: use devm_platform_ioremap_resource() to simplify
code
  ASoC: stm32: sai: use devm_platform_ioremap_resource() to simplify
code
  ASoC: codecs: msm8916-wcd: use devm_platform_ioremap_resource() to
simplify code
  ASoC: codecs: jz4725b: use devm_platform_ioremap_resource() to
simplify code
  ASoC: mmp-sspa: use devm_platform_ioremap_resource() to simplify code
  ASoC: jz4740: use devm_platform_ioremap_resource() to simplify code
  ASoC: inno_rk3036: use devm_platform_ioremap_resource() to simplify
code
  ASoC: uniphier: evea: use devm_platform_ioremap_resource() to simplify
code
  ASoC: uniphier: aio-dma: use devm_platform_ioremap_resource() to
simplify code
  ASoC: psc-ac97: use devm_platform_ioremap_resource() to simplify code
  ASoC: au1x: psc-i2s: use devm_platform_ioremap_resource() to simplify
code
  ASoC: meson: g12a-tohdmitx: use devm_platform_ioremap_resource() to
simplify code
  ASoC: meson: axg-tdm-formatter: use devm_platform_ioremap_resource()
to simplify code
  ASoC: meson: axg-pdm: use devm_platform_ioremap_resource() to simplify
code
  ASoC: meson: axg-spdifin: use devm_platform_ioremap_resource() to
simplify code
  ASoC: meson: axg-spdifout: use devm_platform_ioremap_resource() to
simplify code
  ASoC: meson: axg-fifo: use devm_platform_ioremap_resource() to
simplify code
  ASoC: xlnx: use devm_platform_ioremap_resource() to simplify code
  ASoC: sun8i-codec-analog: use devm_platform_ioremap_resource() to
simplify code
  ASoC: sunxi: sun50i-codec-analog: use devm_platform_ioremap_resource()
to simplify code
  ASoC: sun8i-codec: use devm_platform_ioremap_resource() to simplify
code

 sound/soc/au1x/psc-ac97.c  | 5 ++---
 sound/soc/au1x/psc-i2s.c   | 5 ++---
 sound/soc/bcm/bcm2835-i2s.c| 4 +---
 sound/soc/cirrus/ep93xx-i2s.c  | 4 +---
 sound/soc/codecs/inno_rk3036.c | 4 +---
 sound/soc/codecs/jz4725b.c | 4 +---
 sound/soc/codecs/jz4740.c  | 4 +---
 sound/soc/codecs/msm8916-wcd-digital.c | 4 +---
 sound/soc/codecs/rk3328_codec.c| 4 +---
 sound/soc/fsl/fsl_audmix.c | 4 +---
 sound/soc/fsl/imx-audmux.c | 4 +---
 sound/soc/kirkwood/kirkwood-i2s.c  | 4 +---
 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 5 +
 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 4 +---
 sound/soc/meson/axg-fifo.c | 4 +---
 sound/soc/meson/axg-pdm.c  | 4 +---
 sound/soc/meson/axg-spdifin.c  | 4 +---
 sound/soc/meson/axg-spdifout.c | 4 +---
 sound/soc/meson/axg-tdm-formatter.c| 4 +---
 sound/soc/meson/g12a-tohdmitx.c| 4 +---
 sound/soc/mxs/mxs-saif.c   | 5 +
 sound/soc/pxa/mmp-sspa.c   | 4 +---
 sound/soc/sirf/sirf-usp.c  | 4 +---
 sound/soc/spear/spdif_in.c | 5 ++---
 sound/soc/stm/stm32_sai.c  | 4 +---
 sound/soc/sunxi/sun50i-codec-analog.c  | 4 +---
 sound/soc/sunxi/sun8i-codec-analog.c   | 4 +---
 sound/soc/sunxi/sun8i-codec.c  | 4 +---
 sound/soc/tegra/tegra20_das.c  | 4 +---
 sound/soc/tegra/tegra30_i2s.c  | 4 +---
 sound/soc/uniphier/aio-dma.c   | 4 +---
 sound/soc/uniphier/evea.c  | 4 +---
 sound/soc/xilinx/xlnx_i2s.c| 4 +---
 sound/soc/xilinx/xlnx_spdif.c  | 3 +--
 sound/soc/xtensa/xtfpga-i2s.c  | 4 +---
 35 files changed, 38 insertions(+), 106 deletions(-)

-- 
2.7.4




[PATCH -next] powerpc/powernv/ioda: using kfree_rcu() to simplify the code

2019-07-11 Thread YueHaibing
The callback function of call_rcu() just calls a kfree(), so we
can use kfree_rcu() instead of call_rcu() + callback function.

Signed-off-by: YueHaibing 
---
 arch/powerpc/platforms/powernv/pci-ioda-tce.c | 10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/pci-ioda-tce.c 
b/arch/powerpc/platforms/powernv/pci-ioda-tce.c
index e28f03e..05f80b1 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda-tce.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda-tce.c
@@ -332,14 +332,6 @@ long pnv_pci_ioda2_table_alloc_pages(int nid, __u64 
bus_offset,
return -ENOMEM;
 }
 
-static void pnv_iommu_table_group_link_free(struct rcu_head *head)
-{
-   struct iommu_table_group_link *tgl = container_of(head,
-   struct iommu_table_group_link, rcu);
-
-   kfree(tgl);
-}
-
 void pnv_pci_unlink_table_and_group(struct iommu_table *tbl,
struct iommu_table_group *table_group)
 {
@@ -355,7 +347,7 @@ void pnv_pci_unlink_table_and_group(struct iommu_table *tbl,
list_for_each_entry_rcu(tgl, >it_group_list, next) {
if (tgl->table_group == table_group) {
list_del_rcu(>next);
-   call_rcu(>rcu, pnv_iommu_table_group_link_free);
+   kfree_rcu(tgl, rcu);
found = true;
break;
}
-- 
2.7.4




[PATCH -next] powerpc/powernv: Make some sysbols static

2019-07-02 Thread YueHaibing
Fix sparse warnings:

arch/powerpc/platforms/powernv/opal-psr.c:20:1:
 warning: symbol 'psr_mutex' was not declared. Should it be static?
arch/powerpc/platforms/powernv/opal-psr.c:27:3:
 warning: symbol 'psr_attrs' was not declared. Should it be static?
arch/powerpc/platforms/powernv/opal-powercap.c:20:1:
 warning: symbol 'powercap_mutex' was not declared. Should it be static?
arch/powerpc/platforms/powernv/opal-sensor-groups.c:20:1:
 warning: symbol 'sg_mutex' was not declared. Should it be static?

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 arch/powerpc/platforms/powernv/opal-powercap.c  | 2 +-
 arch/powerpc/platforms/powernv/opal-psr.c   | 4 ++--
 arch/powerpc/platforms/powernv/opal-sensor-groups.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/opal-powercap.c 
b/arch/powerpc/platforms/powernv/opal-powercap.c
index dc599e7..c16d44f 100644
--- a/arch/powerpc/platforms/powernv/opal-powercap.c
+++ b/arch/powerpc/platforms/powernv/opal-powercap.c
@@ -13,7 +13,7 @@
 
 #include 
 
-DEFINE_MUTEX(powercap_mutex);
+static DEFINE_MUTEX(powercap_mutex);
 
 static struct kobject *powercap_kobj;
 
diff --git a/arch/powerpc/platforms/powernv/opal-psr.c 
b/arch/powerpc/platforms/powernv/opal-psr.c
index b6ccb30..69d7e75 100644
--- a/arch/powerpc/platforms/powernv/opal-psr.c
+++ b/arch/powerpc/platforms/powernv/opal-psr.c
@@ -13,11 +13,11 @@
 
 #include 
 
-DEFINE_MUTEX(psr_mutex);
+static DEFINE_MUTEX(psr_mutex);
 
 static struct kobject *psr_kobj;
 
-struct psr_attr {
+static struct psr_attr {
u32 handle;
struct kobj_attribute attr;
 } *psr_attrs;
diff --git a/arch/powerpc/platforms/powernv/opal-sensor-groups.c 
b/arch/powerpc/platforms/powernv/opal-sensor-groups.c
index 31f13c1..f8ae1fb 100644
--- a/arch/powerpc/platforms/powernv/opal-sensor-groups.c
+++ b/arch/powerpc/platforms/powernv/opal-sensor-groups.c
@@ -13,7 +13,7 @@
 
 #include 
 
-DEFINE_MUTEX(sg_mutex);
+static DEFINE_MUTEX(sg_mutex);
 
 static struct kobject *sg_kobj;
 
-- 
2.7.4




[PATCH net-next] defconfigs: remove obsolete CONFIG_INET_XFRM_MODE_* and CONFIG_INET6_XFRM_MODE_*

2019-06-12 Thread YueHaibing
These Kconfig options has been removed in
commit 4c145dce2601 ("xfrm: make xfrm modes builtin")
So there is no point to keep it in defconfigs any longer.

Signed-off-by: YueHaibing 
---
 arch/arc/configs/axs101_defconfig   | 3 ---
 arch/arc/configs/axs103_defconfig   | 3 ---
 arch/arc/configs/axs103_smp_defconfig   | 3 ---
 arch/arc/configs/haps_hs_defconfig  | 3 ---
 arch/arc/configs/haps_hs_smp_defconfig  | 3 ---
 arch/arc/configs/nps_defconfig  | 3 ---
 arch/arc/configs/nsimosci_hs_smp_defconfig  | 3 ---
 arch/arc/configs/tb10x_defconfig| 3 ---
 arch/arm/configs/acs5k_tiny_defconfig   | 3 ---
 arch/arm/configs/am200epdkit_defconfig  | 3 ---
 arch/arm/configs/aspeed_g4_defconfig| 6 --
 arch/arm/configs/aspeed_g5_defconfig| 6 --
 arch/arm/configs/at91_dt_defconfig  | 6 --
 arch/arm/configs/cm_x300_defconfig  | 3 ---
 arch/arm/configs/efm32_defconfig| 3 ---
 arch/arm/configs/ep93xx_defconfig   | 3 ---
 arch/arm/configs/ezx_defconfig  | 3 ---
 arch/arm/configs/h5000_defconfig| 3 ---
 arch/arm/configs/imote2_defconfig   | 3 ---
 arch/arm/configs/imx_v4_v5_defconfig| 3 ---
 arch/arm/configs/imx_v6_v7_defconfig| 3 ---
 arch/arm/configs/iop13xx_defconfig  | 3 ---
 arch/arm/configs/iop32x_defconfig   | 3 ---
 arch/arm/configs/iop33x_defconfig   | 3 ---
 arch/arm/configs/keystone_defconfig | 3 ---
 arch/arm/configs/lpc18xx_defconfig  | 3 ---
 arch/arm/configs/lpc32xx_defconfig  | 3 ---
 arch/arm/configs/lpd270_defconfig   | 3 ---
 arch/arm/configs/magician_defconfig | 3 ---
 arch/arm/configs/mini2440_defconfig | 3 ---
 arch/arm/configs/moxart_defconfig   | 3 ---
 arch/arm/configs/mps2_defconfig | 3 ---
 arch/arm/configs/mxs_defconfig  | 3 ---
 arch/arm/configs/omap1_defconfig| 3 ---
 arch/arm/configs/palmz72_defconfig  | 3 ---
 arch/arm/configs/pcm027_defconfig   | 3 ---
 arch/arm/configs/pxa3xx_defconfig   | 3 ---
 arch/arm/configs/qcom_defconfig | 3 ---
 arch/arm/configs/rpc_defconfig  | 6 --
 arch/arm/configs/s3c2410_defconfig  | 1 -
 arch/arm/configs/sama5_defconfig| 6 --
 arch/arm/configs/sunxi_defconfig| 3 ---
 arch/arm/configs/tango4_defconfig   | 3 ---
 arch/arm/configs/tegra_defconfig| 2 --
 arch/arm/configs/xcep_defconfig | 3 ---
 arch/hexagon/configs/comet_defconfig| 3 ---
 arch/m68k/configs/amcore_defconfig  | 3 ---
 arch/m68k/configs/m5208evb_defconfig| 3 ---
 arch/m68k/configs/m5249evb_defconfig| 3 ---
 arch/m68k/configs/m5272c3_defconfig | 3 ---
 arch/m68k/configs/m5275evb_defconfig| 3 ---
 arch/m68k/configs/m5307c3_defconfig | 3 ---
 arch/m68k/configs/m5407c3_defconfig | 3 ---
 arch/mips/configs/ar7_defconfig | 3 ---
 arch/mips/configs/ath25_defconfig   | 3 ---
 arch/mips/configs/ath79_defconfig   | 3 ---
 arch/mips/configs/bcm63xx_defconfig | 3 ---
 arch/mips/configs/bigsur_defconfig  | 3 ---
 arch/mips/configs/bmips_be_defconfig| 3 ---
 arch/mips/configs/bmips_stb_defconfig   | 3 ---
 arch/mips/configs/capcella_defconfig| 3 ---
 arch/mips/configs/ci20_defconfig| 3 ---
 arch/mips/configs/db1xxx_defconfig  | 1 -
 arch/mips/configs/decstation_64_defconfig   | 4 
 arch/mips/configs/decstation_defconfig  | 4 
 arch/mips/configs/decstation_r4k_defconfig  | 4 
 arch/mips/configs/fuloong2e_defconfig   | 2 --
 arch/mips/configs/gpr_defconfig | 3 ---
 arch/mips/configs/ip22_defconfig| 4 
 arch/mips/configs/ip27_defconfig| 7 ---
 arch/mips/configs/ip28_defconfig| 3 ---
 arch/mips/configs/jazz_defconfig| 2 --
 arch/mips/configs/jmr3927_defconfig | 3 ---
 arch/mips/configs/lasat_defconfig   | 3 ---
 arch/mips/configs/lemote2f_defconfig| 3 ---
 arch/mips/configs/loongson1b_defconfig  | 3 ---
 arch/mips/configs/loongson1c_defconfig  | 3 ---
 arch/mips/configs/malta_defconfig   | 2 --
 arch/mips/configs/malta_kvm_defconfig   | 2 --
 arch/mips/configs/malta_kvm_guest_defconfig | 2 --
 arch/mips/configs/maltaup_xpa_defconfig | 2 --
 arch/mips/configs/markeins_defconfig| 4 
 arch/mips/configs/mpc30x_defconfig  | 3 ---
 arch/mips/configs/mtx1_defconfig| 4 

Re: [PATCH net-next] defconfigs: remove obsolete CONFIG_INET_XFRM_MODE_* and CONFIG_INET6_XFRM_MODE_*

2019-06-12 Thread Yuehaibing
Pls ignore this, will fix and resend.

On 2019/6/12 15:06, YueHaibing wrote:
> These Kconfig options has been removed in
> commit 4c145dce2601 ("xfrm: make xfrm modes builtin")
> So there is no point to keep it in defconfigs any longer.
> 
> Signed-off-by: YueHaibing 
> ---
>  arch/arc/configs/axs101_defconfig   | 3 ---
>  arch/arc/configs/axs103_defconfig   | 3 ---
>  arch/arc/configs/axs103_smp_defconfig   | 3 ---
>  arch/arc/configs/haps_hs_defconfig  | 3 ---
>  arch/arc/configs/haps_hs_smp_defconfig  | 3 ---
>  arch/arc/configs/nps_defconfig  | 3 ---
>  arch/arc/configs/nsimosci_hs_smp_defconfig  | 3 ---
>  arch/arc/configs/tb10x_defconfig| 3 ---
>  arch/arm/configs/acs5k_tiny_defconfig   | 3 ---
>  arch/arm/configs/am200epdkit_defconfig  | 3 ---
>  arch/arm/configs/aspeed_g4_defconfig| 6 --
>  arch/arm/configs/aspeed_g5_defconfig| 6 --
>  arch/arm/configs/at91_dt_defconfig  | 6 --
>  arch/arm/configs/cm_x300_defconfig  | 3 ---
>  arch/arm/configs/efm32_defconfig| 3 ---
>  arch/arm/configs/ep93xx_defconfig   | 3 ---
>  arch/arm/configs/ezx_defconfig  | 3 ---
>  arch/arm/configs/h5000_defconfig| 3 ---
>  arch/arm/configs/imote2_defconfig   | 3 ---
>  arch/arm/configs/imx_v4_v5_defconfig| 3 ---
>  arch/arm/configs/imx_v6_v7_defconfig| 3 ---
>  arch/arm/configs/iop13xx_defconfig  | 3 ---
>  arch/arm/configs/iop32x_defconfig   | 3 ---
>  arch/arm/configs/iop33x_defconfig   | 3 ---
>  arch/arm/configs/keystone_defconfig | 3 ---
>  arch/arm/configs/lpc18xx_defconfig  | 3 ---
>  arch/arm/configs/lpc32xx_defconfig  | 3 ---
>  arch/arm/configs/lpd270_defconfig   | 3 ---
>  arch/arm/configs/magician_defconfig | 3 ---
>  arch/arm/configs/mini2440_defconfig | 3 ---
>  arch/arm/configs/moxart_defconfig   | 3 ---
>  arch/arm/configs/mps2_defconfig | 3 ---
>  arch/arm/configs/mxs_defconfig  | 3 ---
>  arch/arm/configs/omap1_defconfig| 3 ---
>  arch/arm/configs/palmz72_defconfig  | 3 ---
>  arch/arm/configs/pcm027_defconfig   | 3 ---
>  arch/arm/configs/pxa3xx_defconfig   | 3 ---
>  arch/arm/configs/qcom_defconfig | 3 ---
>  arch/arm/configs/rpc_defconfig  | 6 --
>  arch/arm/configs/s3c2410_defconfig  | 1 -
>  arch/arm/configs/sama5_defconfig| 6 --
>  arch/arm/configs/sunxi_defconfig| 3 ---
>  arch/arm/configs/tango4_defconfig   | 3 ---
>  arch/arm/configs/tegra_defconfig| 2 --
>  arch/arm/configs/xcep_defconfig | 3 ---
>  arch/hexagon/configs/comet_defconfig| 3 ---
>  arch/m68k/configs/amcore_defconfig  | 3 ---
>  arch/m68k/configs/m5208evb_defconfig| 3 ---
>  arch/m68k/configs/m5249evb_defconfig| 3 ---
>  arch/m68k/configs/m5272c3_defconfig | 3 ---
>  arch/m68k/configs/m5275evb_defconfig| 3 ---
>  arch/m68k/configs/m5307c3_defconfig | 3 ---
>  arch/m68k/configs/m5407c3_defconfig | 3 ---
>  arch/mips/configs/ar7_defconfig | 3 ---
>  arch/mips/configs/ath25_defconfig   | 3 ---
>  arch/mips/configs/ath79_defconfig   | 3 ---
>  arch/mips/configs/bcm63xx_defconfig | 3 ---
>  arch/mips/configs/bigsur_defconfig  | 3 ---
>  arch/mips/configs/bmips_be_defconfig| 3 ---
>  arch/mips/configs/bmips_stb_defconfig   | 3 ---
>  arch/mips/configs/capcella_defconfig| 3 ---
>  arch/mips/configs/ci20_defconfig| 3 ---
>  arch/mips/configs/db1xxx_defconfig  | 1 -
>  arch/mips/configs/decstation_64_defconfig   | 4 
>  arch/mips/configs/decstation_defconfig  | 4 
>  arch/mips/configs/decstation_r4k_defconfig  | 4 
>  arch/mips/configs/fuloong2e_defconfig   | 2 --
>  arch/mips/configs/gpr_defconfig | 3 ---
>  arch/mips/configs/ip22_defconfig| 4 
>  arch/mips/configs/ip27_defconfig| 7 ---
>  arch/mips/configs/ip28_defconfig| 3 ---
>  arch/mips/configs/jazz_defconfig| 2 --
>  arch/mips/configs/jmr3927_defconfig | 3 ---
>  arch/mips/configs/lasat_defconfig   | 3 ---
>  arch/mips/configs/lemote2f_defconfig| 3 ---
>  arch/mips/configs/loo

[PATCH net-next] defconfigs: remove obsolete CONFIG_INET_XFRM_MODE_* and CONFIG_INET6_XFRM_MODE_*

2019-06-12 Thread YueHaibing
These Kconfig options has been removed in
commit 4c145dce2601 ("xfrm: make xfrm modes builtin")
So there is no point to keep it in defconfigs any longer.

Signed-off-by: YueHaibing 
---
 arch/arc/configs/axs101_defconfig   | 3 ---
 arch/arc/configs/axs103_defconfig   | 3 ---
 arch/arc/configs/axs103_smp_defconfig   | 3 ---
 arch/arc/configs/haps_hs_defconfig  | 3 ---
 arch/arc/configs/haps_hs_smp_defconfig  | 3 ---
 arch/arc/configs/nps_defconfig  | 3 ---
 arch/arc/configs/nsimosci_hs_smp_defconfig  | 3 ---
 arch/arc/configs/tb10x_defconfig| 3 ---
 arch/arm/configs/acs5k_tiny_defconfig   | 3 ---
 arch/arm/configs/am200epdkit_defconfig  | 3 ---
 arch/arm/configs/aspeed_g4_defconfig| 6 --
 arch/arm/configs/aspeed_g5_defconfig| 6 --
 arch/arm/configs/at91_dt_defconfig  | 6 --
 arch/arm/configs/cm_x300_defconfig  | 3 ---
 arch/arm/configs/efm32_defconfig| 3 ---
 arch/arm/configs/ep93xx_defconfig   | 3 ---
 arch/arm/configs/ezx_defconfig  | 3 ---
 arch/arm/configs/h5000_defconfig| 3 ---
 arch/arm/configs/imote2_defconfig   | 3 ---
 arch/arm/configs/imx_v4_v5_defconfig| 3 ---
 arch/arm/configs/imx_v6_v7_defconfig| 3 ---
 arch/arm/configs/iop13xx_defconfig  | 3 ---
 arch/arm/configs/iop32x_defconfig   | 3 ---
 arch/arm/configs/iop33x_defconfig   | 3 ---
 arch/arm/configs/keystone_defconfig | 3 ---
 arch/arm/configs/lpc18xx_defconfig  | 3 ---
 arch/arm/configs/lpc32xx_defconfig  | 3 ---
 arch/arm/configs/lpd270_defconfig   | 3 ---
 arch/arm/configs/magician_defconfig | 3 ---
 arch/arm/configs/mini2440_defconfig | 3 ---
 arch/arm/configs/moxart_defconfig   | 3 ---
 arch/arm/configs/mps2_defconfig | 3 ---
 arch/arm/configs/mxs_defconfig  | 3 ---
 arch/arm/configs/omap1_defconfig| 3 ---
 arch/arm/configs/palmz72_defconfig  | 3 ---
 arch/arm/configs/pcm027_defconfig   | 3 ---
 arch/arm/configs/pxa3xx_defconfig   | 3 ---
 arch/arm/configs/qcom_defconfig | 3 ---
 arch/arm/configs/rpc_defconfig  | 6 --
 arch/arm/configs/s3c2410_defconfig  | 1 -
 arch/arm/configs/sama5_defconfig| 6 --
 arch/arm/configs/sunxi_defconfig| 3 ---
 arch/arm/configs/tango4_defconfig   | 3 ---
 arch/arm/configs/tegra_defconfig| 2 --
 arch/arm/configs/xcep_defconfig | 3 ---
 arch/hexagon/configs/comet_defconfig| 3 ---
 arch/m68k/configs/amcore_defconfig  | 3 ---
 arch/m68k/configs/m5208evb_defconfig| 3 ---
 arch/m68k/configs/m5249evb_defconfig| 3 ---
 arch/m68k/configs/m5272c3_defconfig | 3 ---
 arch/m68k/configs/m5275evb_defconfig| 3 ---
 arch/m68k/configs/m5307c3_defconfig | 3 ---
 arch/m68k/configs/m5407c3_defconfig | 3 ---
 arch/mips/configs/ar7_defconfig | 3 ---
 arch/mips/configs/ath25_defconfig   | 3 ---
 arch/mips/configs/ath79_defconfig   | 3 ---
 arch/mips/configs/bcm63xx_defconfig | 3 ---
 arch/mips/configs/bigsur_defconfig  | 3 ---
 arch/mips/configs/bmips_be_defconfig| 3 ---
 arch/mips/configs/bmips_stb_defconfig   | 3 ---
 arch/mips/configs/capcella_defconfig| 3 ---
 arch/mips/configs/ci20_defconfig| 3 ---
 arch/mips/configs/db1xxx_defconfig  | 1 -
 arch/mips/configs/decstation_64_defconfig   | 4 
 arch/mips/configs/decstation_defconfig  | 4 
 arch/mips/configs/decstation_r4k_defconfig  | 4 
 arch/mips/configs/fuloong2e_defconfig   | 2 --
 arch/mips/configs/gpr_defconfig | 3 ---
 arch/mips/configs/ip22_defconfig| 4 
 arch/mips/configs/ip27_defconfig| 7 ---
 arch/mips/configs/ip28_defconfig| 3 ---
 arch/mips/configs/jazz_defconfig| 2 --
 arch/mips/configs/jmr3927_defconfig | 3 ---
 arch/mips/configs/lasat_defconfig   | 3 ---
 arch/mips/configs/lemote2f_defconfig| 3 ---
 arch/mips/configs/loongson1b_defconfig  | 3 ---
 arch/mips/configs/loongson1c_defconfig  | 3 ---
 arch/mips/configs/malta_defconfig   | 2 --
 arch/mips/configs/malta_kvm_defconfig   | 2 --
 arch/mips/configs/malta_kvm_guest_defconfig | 2 --
 arch/mips/configs/maltaup_xpa_defconfig | 2 --
 arch/mips/configs/markeins_defconfig| 4 
 arch/mips/configs/mpc30x_defconfig  | 3 ---
 arch/mips/configs/mtx1_defconfig| 4 

Re: [PATCH v2] powerpc/pseries: Use correct event modifier in rtas_parse_epow_errlog()

2019-05-30 Thread Yuehaibing
Hi all,

Friendly ping:

Who can take this?

On 2019/4/24 10:17, Yue Haibing wrote:
> From: YueHaibing 
> 
> rtas_parse_epow_errlog() should pass 'modifier' to
> handle_system_shutdown, because event modifier only use
> bottom 4 bits.
> 
> Fixes: 55fc0c561742 ("powerpc/pseries: Parse and handle EPOW interrupts")
> Signed-off-by: YueHaibing 
> ---
> v2: fix compile issue by 'event_modifier'-->'modifier'
> ---
>  arch/powerpc/platforms/pseries/ras.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/ras.c 
> b/arch/powerpc/platforms/pseries/ras.c
> index c97d153..744604d 100644
> --- a/arch/powerpc/platforms/pseries/ras.c
> +++ b/arch/powerpc/platforms/pseries/ras.c
> @@ -285,7 +285,7 @@ static void rtas_parse_epow_errlog(struct rtas_error_log 
> *log)
>   break;
>  
>   case EPOW_SYSTEM_SHUTDOWN:
> - handle_system_shutdown(epow_log->event_modifier);
> + handle_system_shutdown(modifier);
>   break;
>  
>   case EPOW_SYSTEM_HALT:
> 



[PATCH -next] misc: ocxl: Make ocxl_remove static

2019-05-04 Thread YueHaibing
Fix sparse warning:

drivers/misc/ocxl/pci.c:44:6: warning:
 symbol 'ocxl_remove' was not declared. Should it be static?

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 drivers/misc/ocxl/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/ocxl/pci.c b/drivers/misc/ocxl/pci.c
index f2a3ef4..cb920aa 100644
--- a/drivers/misc/ocxl/pci.c
+++ b/drivers/misc/ocxl/pci.c
@@ -41,7 +41,7 @@ static int ocxl_probe(struct pci_dev *dev, const struct 
pci_device_id *id)
return 0;
 }
 
-void ocxl_remove(struct pci_dev *dev)
+static void ocxl_remove(struct pci_dev *dev)
 {
struct ocxl_fn *fn;
struct ocxl_afu *afu;
-- 
2.7.4




[PATCH -next] powerpc/book3s64: Make some symbols static

2019-05-04 Thread YueHaibing
Fix sparse warnings:

arch/powerpc/mm/book3s64/radix_pgtable.c:326:13: warning: symbol 
'radix_init_pgtable' was not declared. Should it be static?
arch/powerpc/mm/book3s64/hash_native.c:48:1: warning: symbol 
'native_tlbie_lock' was not declared. Should it be static?
arch/powerpc/mm/book3s64/hash_utils.c:988:24: warning: symbol 
'init_hash_mm_context' was not declared. Should it be static?

Signed-off-by: YueHaibing 
---
 arch/powerpc/mm/book3s64/hash_native.c   | 2 +-
 arch/powerpc/mm/book3s64/hash_utils.c| 2 +-
 arch/powerpc/mm/book3s64/radix_pgtable.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/mm/book3s64/hash_native.c 
b/arch/powerpc/mm/book3s64/hash_native.c
index aaa28fd..47caecd 100644
--- a/arch/powerpc/mm/book3s64/hash_native.c
+++ b/arch/powerpc/mm/book3s64/hash_native.c
@@ -45,7 +45,7 @@
 #define HPTE_LOCK_BIT (56+3)
 #endif
 
-DEFINE_RAW_SPINLOCK(native_tlbie_lock);
+static DEFINE_RAW_SPINLOCK(native_tlbie_lock);
 
 static inline void tlbiel_hash_set_isa206(unsigned int set, unsigned int is)
 {
diff --git a/arch/powerpc/mm/book3s64/hash_utils.c 
b/arch/powerpc/mm/book3s64/hash_utils.c
index 919a861..1ff4518 100644
--- a/arch/powerpc/mm/book3s64/hash_utils.c
+++ b/arch/powerpc/mm/book3s64/hash_utils.c
@@ -985,7 +985,7 @@ void __init hash__early_init_devtree(void)
htab_scan_page_sizes();
 }
 
-struct hash_mm_context init_hash_mm_context;
+static struct hash_mm_context init_hash_mm_context;
 void __init hash__early_init_mmu(void)
 {
 #ifndef CONFIG_PPC_64K_PAGES
diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c 
b/arch/powerpc/mm/book3s64/radix_pgtable.c
index c9bcf42..c929d31 100644
--- a/arch/powerpc/mm/book3s64/radix_pgtable.c
+++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
@@ -323,7 +323,7 @@ static int __meminit create_physical_mapping(unsigned long 
start,
return 0;
 }
 
-void __init radix_init_pgtable(void)
+static void __init radix_init_pgtable(void)
 {
unsigned long rts_field;
struct memblock_region *reg;
-- 
2.7.4




Re: [PATCH] powerpc/pseries: Use correct event modifier in rtas_parse_epow_errlog()

2019-04-23 Thread YueHaibing



On 2019/4/24 9:29, Russell Currey wrote:
> On Tue, 2019-04-23 at 22:35 +0800, Yue Haibing wrote:
>> From: YueHaibing 
>>
>> rtas_parse_epow_errlog() should pass 'modifier' to
>> handle_system_shutdown, because event modifier only use
>> bottom 4 bits.
>>
>> Fixes: 55fc0c561742 ("powerpc/pseries: Parse and handle EPOW
>> interrupts")
>> Signed-off-by: YueHaibing 
> 
> Hello,
> 
> This fails to compile.
> 
> arch/powerpc/platforms/pseries/ras.c: In function
> 'rtas_parse_epow_errlog':
> arch/powerpc/platforms/pseries/ras.c:288:26: error: 'event_modifier'
> undeclared (first use in this function); did you mean 'modifier'?
>handle_system_shutdown(event_modifier);
>   ^~
>   modifier

Yes, this should be 'modifier'

> 
> So yes, I assume you meant "modifier" instead of "event_modifier" as
> mentioned in your commit message.  Did you compile this before sending?

I am very sorry for this, this is not my compiled version,
I forgot to check again before sending.

> 
> (found by snowpatch)
> 
> - Russell
> 
> 
> .
> 



[PATCH v2 -next] powerpc/pseries: Fix platform_no_drv_owner.cocci warnings

2019-02-18 Thread YueHaibing
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: YueHaibing 
---
 arch/powerpc/platforms/pseries/papr_scm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/papr_scm.c 
b/arch/powerpc/platforms/pseries/papr_scm.c
index bba281b1fe1b..679bf2420bc1 100644
--- a/arch/powerpc/platforms/pseries/papr_scm.c
+++ b/arch/powerpc/platforms/pseries/papr_scm.c
@@ -358,7 +358,6 @@ static struct platform_driver papr_scm_driver = {
.remove = papr_scm_remove,
.driver = {
.name = "papr_scm",
-   .owner = THIS_MODULE,
.of_match_table = papr_scm_match,
},
 };





Re: [PATCH -next] powerpc/pseries: Fix platform_no_drv_owner.cocci warnings

2019-02-18 Thread YueHaibing
On 2019/2/18 20:53, Julia Lawall wrote:
> 
> 
> On Mon, 18 Feb 2019, YueHaibing wrote:
> 
>> Remove .owner field if calls are used which set it automatically
>> Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
>>
>> Signed-off-by: YueHaibing 
>> ---
>>  arch/powerpc/platforms/pseries/papr_scm.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/platforms/pseries/papr_scm.c 
>> b/arch/powerpc/platforms/pseries/papr_scm.c
>> index bba281b1fe1b..e3f5c1a01950 100644
>> --- a/arch/powerpc/platforms/pseries/papr_scm.c
>> +++ b/arch/powerpc/platforms/pseries/papr_scm.c
>> @@ -21,6 +21,7 @@
>>   (1ul << ND_CMD_GET_CONFIG_DATA) | \
>>   (1ul << ND_CMD_SET_CONFIG_DATA))
>>
>> +
> 
> No need to add a blank line.

Yes, will fix it.

> 
> julia
> 
>>  struct papr_scm_priv {
>>  struct platform_device *pdev;
>>  struct device_node *dn;
>> @@ -358,7 +359,6 @@ static struct platform_driver papr_scm_driver = {
>>  .remove = papr_scm_remove,
>>  .driver = {
>>  .name = "papr_scm",
>> -.owner = THIS_MODULE,
>>  .of_match_table = papr_scm_match,
>>  },
>>  };
>>
>>
>>
>>
> 
> .
> 



[PATCH -next] powerpc/pseries: Fix platform_no_drv_owner.cocci warnings

2019-02-18 Thread YueHaibing
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: YueHaibing 
---
 arch/powerpc/platforms/pseries/papr_scm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/papr_scm.c 
b/arch/powerpc/platforms/pseries/papr_scm.c
index bba281b1fe1b..e3f5c1a01950 100644
--- a/arch/powerpc/platforms/pseries/papr_scm.c
+++ b/arch/powerpc/platforms/pseries/papr_scm.c
@@ -21,6 +21,7 @@
 (1ul << ND_CMD_GET_CONFIG_DATA) | \
 (1ul << ND_CMD_SET_CONFIG_DATA))
 
+
 struct papr_scm_priv {
struct platform_device *pdev;
struct device_node *dn;
@@ -358,7 +359,6 @@ static struct platform_driver papr_scm_driver = {
.remove = papr_scm_remove,
.driver = {
.name = "papr_scm",
-   .owner = THIS_MODULE,
.of_match_table = papr_scm_match,
},
 };





[PATCH -next] powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init()

2019-02-18 Thread YueHaibing
There is no need to have the 'struct dentry *vpa_dir' variable static
since new value always be assigned before use it.

Signed-off-by: YueHaibing 
---
 arch/powerpc/platforms/pseries/lpar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/lpar.c 
b/arch/powerpc/platforms/pseries/lpar.c
index f2a9f0adc2d3..f649c1b652eb 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -1263,7 +1263,7 @@ static int __init vpa_debugfs_init(void)
 {
char name[16];
long i;
-   static struct dentry *vpa_dir;
+   struct dentry *vpa_dir;
 
if (!firmware_has_feature(FW_FEATURE_SPLPAR))
return 0;





  1   2   >