Message ID | 20210409095152.2294487-1-yebin10@huawei.com (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | [-next] soc: fsl: qe: use DEFINE_SPINLOCK() for spinlock | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (f2b8ef18c8e0634e176be99dcf242e515cfdb1d3) |
snowpatch_ozlabs/build-ppc64le | success | Build succeeded |
snowpatch_ozlabs/build-ppc64be | success | Build succeeded |
snowpatch_ozlabs/build-ppc64e | success | Build succeeded |
snowpatch_ozlabs/build-pmac32 | success | Build succeeded |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 15 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
> -----Original Message----- > From: Ye Bin <yebin10@huawei.com> > Sent: Friday, April 9, 2021 4:52 AM > To: yebin10@huawei.com; Qiang Zhao <qiang.zhao@nxp.com>; Leo Li > <leoyang.li@nxp.com> > Cc: linuxppc-dev@lists.ozlabs.org; linux-arm-kernel@lists.infradead.org; > linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org; Hulk Robot > <hulkci@huawei.com> > Subject: [PATCH -next] soc: fsl: qe: use DEFINE_SPINLOCK() for spinlock > > spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than > explicitly calling spin_lock_init(). The previous version has been applied. Thanks. > > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: Ye Bin <yebin10@huawei.com> > --- > drivers/soc/fsl/qe/qe_common.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/soc/fsl/qe/qe_common.c > b/drivers/soc/fsl/qe/qe_common.c index 654e9246ce6b..a0cb8e746879 > 100644 > --- a/drivers/soc/fsl/qe/qe_common.c > +++ b/drivers/soc/fsl/qe/qe_common.c > @@ -26,7 +26,7 @@ > #include <soc/fsl/qe/qe.h> > > static struct gen_pool *muram_pool; > -static spinlock_t cpm_muram_lock; > +static DEFINE_SPINLOCK(cpm_muram_lock); > static void __iomem *muram_vbase; > static phys_addr_t muram_pbase; > > @@ -54,7 +54,6 @@ int cpm_muram_init(void) > if (muram_pbase) > return 0; > > - spin_lock_init(&cpm_muram_lock); > np = of_find_compatible_node(NULL, NULL, "fsl,cpm-muram-data"); > if (!np) { > /* try legacy bindings */
diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c index 654e9246ce6b..a0cb8e746879 100644 --- a/drivers/soc/fsl/qe/qe_common.c +++ b/drivers/soc/fsl/qe/qe_common.c @@ -26,7 +26,7 @@ #include <soc/fsl/qe/qe.h> static struct gen_pool *muram_pool; -static spinlock_t cpm_muram_lock; +static DEFINE_SPINLOCK(cpm_muram_lock); static void __iomem *muram_vbase; static phys_addr_t muram_pbase; @@ -54,7 +54,6 @@ int cpm_muram_init(void) if (muram_pbase) return 0; - spin_lock_init(&cpm_muram_lock); np = of_find_compatible_node(NULL, NULL, "fsl,cpm-muram-data"); if (!np) { /* try legacy bindings */
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Ye Bin <yebin10@huawei.com> --- drivers/soc/fsl/qe/qe_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)