Re: [PATCH v3] arm64: dts: ls1088a: Add USB support

2017-10-24 Thread Yang Li
On Tue, Oct 24, 2017 at 4:31 AM,   wrote:
> From: "yinbo.zhu" 
>
> Fix the issue that usb is not detected on ls1088ardb

You can only fix issue for a function after the function has been
added previously.  So like Shawn commented, this patch is about adding
the USB support instead of fixing an issue.

>
> Signed-off-by: yinbo.zhu 
> Signed-off-by: Ran Wang 
> ---
>
> Change in v3:
> - Change status from "enable" to "disabled" then enable it on 
> dts file.
> - Add the version history.
>
>  arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts |  8 
>  arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi| 20 
>  2 files changed, 28 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts 
> b/arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts
> index 213abb72de93..6c3c3bc4b681 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts
> +++ b/arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts
> @@ -118,6 +118,14 @@
> status = "okay";
>  };
>
> +&usb0 {
> +   status = "okay";
> +};
> +
> +&usb1 {
> +   status = "okay";
> +};
> +
>  &esdhc {
> status = "okay";
>  };
> diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi 
> b/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi
> index c144d06a6e33..c23fede8cf5d 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi
> @@ -359,6 +359,26 @@
> status = "disabled";
> };
>
> +   usb0: usb3@310 {
> +   compatible = "snps,dwc3";
> +   reg = <0x0 0x310 0x0 0x1>;
> +   interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
> +   dr_mode = "host";
> +   snps,quirk-frame-length-adjustment = <0x20>;
> +   snps,dis_rxdet_inp3_quirk;
> +   status = "disabled";
> +   };
> +
> +   usb1: usb3@311 {
> +   compatible = "snps,dwc3";
> +   reg = <0x0 0x311 0x0 0x1>;
> +   interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>;
> +   dr_mode = "host";
> +   snps,quirk-frame-length-adjustment = <0x20>;
> +   snps,dis_rxdet_inp3_quirk;
> +   status = "disabled";
> +   };
> +
> sata: sata@320 {
> compatible = "fsl,ls1088a-ahci";
> reg = <0x0 0x320 0x0 0x1>,
> --
> 2.14.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch V5 01/11] Documentation: Add license-rules.rst to describe how to properly identify file licenses

2018-06-12 Thread Yang Li
On Thu, Dec 28, 2017 at 4:17 PM, Thomas Gleixner  wrote:
> On Thu, 28 Dec 2017, Thomas Gleixner wrote:
>
> Sorry for the spam. I somehow missed to refresh the patch before generating
> the mbox. Find below the correct version of that one which has ALL braces
> removed which we don't need.

Hi Thomas,

I'm not sure how we reached the conclusion that we should remove ALL
braces?  I cannot find related discussion in the archive except for
the "WITH" case.

This is conflicting with the current SPDX spec at
https://spdx.org/spdx-specification-21-web-version quoted below and
also the explenation in your own file.

Quote from SPDX spec 2.1: More expressive composite license
expressions can be constructed using "OR", "AND", and "WITH" operators
similar to constructing mathematical expressions using arithmetic
operators. For the Tag:value format, any license expression that
consists of more than one license identifier and/or LicenseRef, should
be encapsulated by parentheses: "( )".


> +
> +   A  is either an SPDX short form license
> +   identifier found on the SPDX License List, or the combination of two
> +   SPDX short form license identifiers separated by "WITH" when a license
> +   exception applies. When multiple licenses apply, an expression consists
> +   of keywords "AND", "OR" separating sub-expressions and surrounded by
> +   "(", ")" .

Conflicting with the example

> +
> +   License identifiers for licenses like [L]GPL with the 'or later' option
> +   are constructed by using a "+" for indicating the 'or later' option.::
> +
> +  // SPDX-License-Identifier: GPL-2.0+
> +  // SPDX-License-Identifier: LGPL-2.1+
> +
> +   WITH should be used when there is a modifier to a license needed.
> +   For example, the linux kernel UAPI files use the expression::
> +
> +  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
> +  // SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note
> +
> +   Other examples using WITH exceptions found in the kernel are::
> +
> +  // SPDX-License-Identifier: GPL-2.0 WITH mif-exception
> +  // SPDX-License-Identifier: GPL-2.0+ WITH GCC-exception-2.0
> +
> +   Exceptions can only be used with particular License identifiers. The
> +   valid License identifiers are listed in the tags of the exception text
> +   file. For details see the point `Exceptions`_ in the chapter `License
> +   identifiers`_.
> +
> +   OR should be used if the file is dual licensed and only one license is
> +   to be selected.  For example, some dtsi files are available under dual
> +   licenses::
> +
> +  // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
> +
> +   Examples from the kernel for license expressions in dual licensed files::
> +
> +  // SPDX-License-Identifier: GPL-2.0 OR MIT
> +  // SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
> +  // SPDX-License-Identifier: GPL-2.0 OR Apache-2.0
> +  // SPDX-License-Identifier: GPL-2.0 OR MPL-1.1
> +  // SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT
> +  // SPDX-License-Identifier: GPL-1.0+ OR BSD-3-Clause OR OpenSSL
> +
> +   AND should be used if the file has multiple licenses whose terms all
> +   apply to use the file. For example, if code is inherited from another
> +   project and permission has been given to put it in the kernel, but the
> +   original license terms need to remain in effect::
> +
> +  // SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) AND MIT
> +
> +   Another other example where both sets of license terms need to be
> +   adhered to is::
> +
> +  // SPDX-License-Identifier: GPL-1.0+ AND LGPL-2.1+
> +


Re: [patch V5 01/11] Documentation: Add license-rules.rst to describe how to properly identify file licenses

2018-06-15 Thread Yang Li
On Tue, Jun 12, 2018 at 2:27 PM, Thomas Gleixner  wrote:
> Yang,
>
> On Tue, 12 Jun 2018, Yang Li wrote:
>> On Thu, Dec 28, 2017 at 4:17 PM, Thomas Gleixner  wrote:
>> > On Thu, 28 Dec 2017, Thomas Gleixner wrote:
>> >
>> > Sorry for the spam. I somehow missed to refresh the patch before generating
>> > the mbox. Find below the correct version of that one which has ALL braces
>> > removed which we don't need.
>
>> I'm not sure how we reached the conclusion that we should remove ALL
>> braces?  I cannot find related discussion in the archive except for
>> the "WITH" case.
>
> https://lkml.kernel.org/r/caofm3uepm_tberkovqghcy+wbw0i4msnafpbrc3hyzvqjss...@mail.gmail.com

Thanks Thomas,  But this email is mostly discussing the "WITH" case as
I said, and it does mentioned that braces is (weakly) needed for other
cases.

>
>> This is conflicting with the current SPDX spec at
>> https://spdx.org/spdx-specification-21-web-version quoted below and
>> also the explenation in your own file.
>>
>> Quote from SPDX spec 2.1: More expressive composite license
>> expressions can be constructed using "OR", "AND", and "WITH" operators
>> similar to constructing mathematical expressions using arithmetic
>> operators. For the Tag:value format, any license expression that
>> consists of more than one license identifier and/or LicenseRef, should
>> be encapsulated by parentheses: "( )".
>
> This is not relevant here:
>
>For the Tag:value format, .
>
> The kernel does not generate SPDX files in Tag:value format. The kernel
> uses SPDX license identifiers to reflect the actual license of a file.

I'm not sure if I understood the Tag:value term correctly.  But it
looks like to me that the "SPDX-License-Identifier: " is a tag:value in the SPDX spec.

"The tag should appear on its own line in the source file, generally
as part of a comment.

SPDX-License-Identifier: "


>
>> > +   A  is either an SPDX short form license
>> > +   identifier found on the SPDX License List, or the combination of two
>> > +   SPDX short form license identifiers separated by "WITH" when a license
>> > +   exception applies. When multiple licenses apply, an expression consists
>> > +   of keywords "AND", "OR" separating sub-expressions and surrounded by
>> > +   "(", ")" .
>>
>> Conflicting with the example
>
> No, The keyword is 'separating sub-expressions'. It does not say license
> identifiers.

But the first sentense declared that an expression can just be a short
form license identifier.

And the examples provided in the spec also proves it:

"Examples:

SPDX-License-Identifier: (GPL-2.0 OR MIT)
SPDX-License-Identifier: (LGPL-2.1 AND BSD-2-CLAUSE)
SPDX-License-Identifier: (GPL-2.0+ WITH Bison-exception-2.2)"


>
> So these examples are completely compliant with the documentation:
>
>> > +  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
>> > +  // SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note
>> > +  // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
>
> Two license (exception) identifiers plus a operator. That's perfectly well
> defined.
>
>> > +  // SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT
>
> This is actually a case where you need parentheses and they separate the
> sub-expression 'ID with EXC'.
>
> Adding extra parentheses around any simple 'ID operator [ID|EXC]'
> expression is really overkill and does not make stuff more
> readable. Likewise in programming languages. Why would anyone write:
>
> C et al.:   a = (b || c);
> Pyhton: a = (b and c)

I think I agree with you that not having parentheses in these cases
probably make more sense.  But I think we are having a conflict with
the spec now, probably we should update the SPDX spec to be aligned?
Actually a lot of the current SPDX tags in kernel tree are following
the spec to use the parentheses.  We should do something to avoid the
confusion in the future IMO.

Regards,
Leo


[PATCH -next] fs: Fix kernel-doc comments to functions

2024-03-21 Thread Yang Li
This commit fix kernel-doc style comments with complete parameter
descriptions for the lookup_file(),lookup_dir_entry() and
lookup_file_dentry().

Signed-off-by: Yang Li 
---
 fs/tracefs/event_inode.c | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c
index dc067eeb6387..894c6ca1e500 100644
--- a/fs/tracefs/event_inode.c
+++ b/fs/tracefs/event_inode.c
@@ -336,6 +336,7 @@ static void update_inode_attr(struct dentry *dentry, struct 
inode *inode,
 
 /**
  * lookup_file - look up a file in the tracefs filesystem
+ * @parent_ei: Pointer to the eventfs_inode that represents parent of the file
  * @dentry: the dentry to look up
  * @mode: the permission that the file should have.
  * @attr: saved attributes changed by user
@@ -389,6 +390,7 @@ static struct dentry *lookup_file(struct eventfs_inode 
*parent_ei,
 /**
  * lookup_dir_entry - look up a dir in the tracefs filesystem
  * @dentry: the directory to look up
+ * @pei: Pointer to the parent eventfs_inode if available
  * @ei: the eventfs_inode that represents the directory to create
  *
  * This function will look up a dentry for a directory represented by
@@ -478,16 +480,20 @@ void eventfs_d_release(struct dentry *dentry)
 
 /**
  * lookup_file_dentry - create a dentry for a file of an eventfs_inode
+ * @dentry: The parent dentry under which the new file's dentry will be created
  * @ei: the eventfs_inode that the file will be created under
  * @idx: the index into the entry_attrs[] of the @ei
- * @parent: The parent dentry of the created file.
- * @name: The name of the file to create
  * @mode: The mode of the file.
  * @data: The data to use to set the inode of the file with on open()
  * @fops: The fops of the file to be created.
  *
- * Create a dentry for a file of an eventfs_inode @ei and place it into the
- * address located at @e_dentry.
+ * This function creates a dentry for a file associated with an
+ * eventfs_inode @ei. It uses the entry attributes specified by @idx,
+ * if available. The file will have the specified @mode and its inode will be
+ * set up with @data upon open. The file operations will be set to @fops.
+ *
+ * Return: Returns a pointer to the newly created file's dentry or an error
+ * pointer.
  */
 static struct dentry *
 lookup_file_dentry(struct dentry *dentry,
-- 
2.20.1.7.g153144c




[PATCH -next] rv: Update rv_en(dis)able_monitor doc to match kernel-doc

2024-05-17 Thread Yang Li
The patch updates the function documentation comment for
rv_en(dis)able_monitor to adhere to the kernel-doc specification.

Signed-off-by: Yang Li 
---
 kernel/trace/rv/rv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/trace/rv/rv.c b/kernel/trace/rv/rv.c
index 2f68e93fff0b..df0745a42a3f 100644
--- a/kernel/trace/rv/rv.c
+++ b/kernel/trace/rv/rv.c
@@ -245,6 +245,7 @@ static int __rv_disable_monitor(struct rv_monitor_def 
*mdef, bool sync)
 
 /**
  * rv_disable_monitor - disable a given runtime monitor
+ * @mdef: Pointer to the monitor definition structure.
  *
  * Returns 0 on success.
  */
@@ -256,6 +257,7 @@ int rv_disable_monitor(struct rv_monitor_def *mdef)
 
 /**
  * rv_enable_monitor - enable a given runtime monitor
+ * @mdef: Pointer to the monitor definition structure.
  *
  * Returns 0 on success, error otherwise.
  */
-- 
2.20.1.7.g153144c




[PATCH] rv: Update rv_en(dis)able_monitor doc to match kernel-doc

2024-05-19 Thread Yang Li
The patch updates the function documentation comment for
rv_en(dis)able_monitor to adhere to the kernel-doc specification.

Signed-off-by: Yang Li 
---
 kernel/trace/rv/rv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/trace/rv/rv.c b/kernel/trace/rv/rv.c
index 2f68e93fff0b..df0745a42a3f 100644
--- a/kernel/trace/rv/rv.c
+++ b/kernel/trace/rv/rv.c
@@ -245,6 +245,7 @@ static int __rv_disable_monitor(struct rv_monitor_def 
*mdef, bool sync)
 
 /**
  * rv_disable_monitor - disable a given runtime monitor
+ * @mdef: Pointer to the monitor definition structure.
  *
  * Returns 0 on success.
  */
@@ -256,6 +257,7 @@ int rv_disable_monitor(struct rv_monitor_def *mdef)
 
 /**
  * rv_enable_monitor - enable a given runtime monitor
+ * @mdef: Pointer to the monitor definition structure.
  *
  * Returns 0 on success, error otherwise.
  */
-- 
2.20.1.7.g153144c




[PATCH -next 1/2] function_graph: Add kernel-doc comments for ftrace_graph_ret_addr() function

2024-06-07 Thread Yang Li
Added kernel-doc comments for the ftrace_graph_ret_addr() function to
improve code documentation and readability.

Reported-by: Abaci Robot 
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9299
Signed-off-by: Yang Li 
---
 kernel/trace/fgraph.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c
index a13551a023aa..4ad33e4cb8da 100644
--- a/kernel/trace/fgraph.c
+++ b/kernel/trace/fgraph.c
@@ -872,6 +872,12 @@ ftrace_graph_get_ret_stack(struct task_struct *task, int 
idx)
 /**
  * ftrace_graph_ret_addr - convert a potentially modified stack return address
  *to its original value
+ * @task: pointer to the task_struct of the task being examined
+ * @idx: pointer to a state variable, should be initialized to zero
+ *  before the first call
+ * @ret: the current return address found on the stack
+ * @retp: pointer to the return address on the stack, ignored if
+ *   HAVE_FUNCTION_GRAPH_RET_ADDR_PTR is not defined
  *
  * This function can be called by stack unwinding code to convert a found stack
  * return address ('ret') to its original value, in case the function graph
-- 
2.20.1.7.g153144c




[PATCH -next 2/2] ftrace: Add kernel-doc comments for unregister_ftrace_direct() function

2024-06-07 Thread Yang Li
Added kernel-doc comments for the unregister_ftrace_direct() function to
improve code documentation and readability.

Reported-by: Abaci Robot 
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9300
Signed-off-by: Yang Li 
---
 kernel/trace/ftrace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 4aeb1183ea9f..3b0dbd55cc05 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -5988,6 +5988,8 @@ EXPORT_SYMBOL_GPL(register_ftrace_direct);
  * unregister_ftrace_direct - Remove calls to custom trampoline
  * previously registered by register_ftrace_direct for @ops object.
  * @ops: The address of the struct ftrace_ops object
+ * @addr: The address of the direct call to remove
+ * @free_filters: Boolean indicating whether to free the filters
  *
  * This is used to remove a direct calls to @addr from the nop locations
  * of the functions registered in @ops (with by ftrace_set_filter_ip
-- 
2.20.1.7.g153144c




[PATCH -next] nvdimm/btt: Fix btt_init() kernel-doc comment

2021-12-30 Thread Yang Li
Add the description of @nd_region and remove @maxlane in
btt_init() kernel-doc comment to remove warnings found
by running scripts/kernel-doc, which is caused by using 'make W=1'.
drivers/nvdimm/btt.c:1584: warning: Function parameter or member
'nd_region' not described in 'btt_init'
drivers/nvdimm/btt.c:1584: warning: Excess function parameter 'maxlane'
description in 'btt_init'

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/nvdimm/btt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index da3f007a1211..293b8c107817 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -1567,7 +1567,7 @@ static void btt_blk_cleanup(struct btt *btt)
  * @rawsize:   raw size in bytes of the backing device
  * @lbasize:   lba size of the backing device
  * @uuid:  A uuid for the backing device - this is stored on media
- * @maxlane:   maximum number of parallel requests the device can handle
+ * @nd_region:  region id and number of lanes possible
  *
  * Initialize a Block Translation Table on a backing device to provide
  * single sector power fail atomicity.
-- 
2.20.1.7.g153144c




[PATCH -next] nvdimm: Fix some kernel-doc comments

2022-12-05 Thread Yang Li
Make the description of @nvdimm to @ndd in nvdimm_init_nsarea()
and nvdimm_allocated_dpa() to clear the below warnings:

drivers/nvdimm/dimm_devs.c:59: warning: Function parameter or member 'ndd' not 
described in 'nvdimm_init_nsarea'
drivers/nvdimm/dimm_devs.c:59: warning: Excess function parameter 'nvdimm' 
description in 'nvdimm_init_nsarea'
drivers/nvdimm/dimm_devs.c:841: warning: Function parameter or member 'ndd' not 
described in 'nvdimm_allocated_dpa'
drivers/nvdimm/dimm_devs.c:841: warning: Excess function parameter 'nvdimm' 
description in 'nvdimm_allocated_dpa'

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3361
Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/nvdimm/dimm_devs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c
index 1fc081dcf631..17b56171c2c2 100644
--- a/drivers/nvdimm/dimm_devs.c
+++ b/drivers/nvdimm/dimm_devs.c
@@ -53,7 +53,7 @@ static int validate_dimm(struct nvdimm_drvdata *ndd)
 
 /**
  * nvdimm_init_nsarea - determine the geometry of a dimm's namespace area
- * @nvdimm: dimm to initialize
+ * @ndd: dimm to initialize
  */
 int nvdimm_init_nsarea(struct nvdimm_drvdata *ndd)
 {
@@ -833,7 +833,7 @@ struct resource *nvdimm_allocate_dpa(struct nvdimm_drvdata 
*ndd,
 
 /**
  * nvdimm_allocated_dpa - sum up the dpa currently allocated to this label_id
- * @nvdimm: container of dpa-resource-root + labels
+ * @ndd: container of dpa-resource-root + labels
  * @label_id: dpa resource name of the form pmem-
  */
 resource_size_t nvdimm_allocated_dpa(struct nvdimm_drvdata *ndd,
-- 
2.20.1.7.g153144c




[PATCH -next] nvdimm: make security_show() static

2022-12-05 Thread Yang Li
This symbol is not used outside of dimm_devs.c, so marks it
static to silence missing prototype warning

drivers/nvdimm/dimm_devs.c:352:9: warning: no previous prototype for function 
'security_show'

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3362
Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/nvdimm/dimm_devs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c
index 17b56171c2c2..71fef964c5bc 100644
--- a/drivers/nvdimm/dimm_devs.c
+++ b/drivers/nvdimm/dimm_devs.c
@@ -349,7 +349,7 @@ static ssize_t available_slots_show(struct device *dev,
 }
 static DEVICE_ATTR_RO(available_slots);
 
-ssize_t security_show(struct device *dev,
+static ssize_t security_show(struct device *dev,
struct device_attribute *attr, char *buf)
 {
struct nvdimm *nvdimm = to_nvdimm(dev);
-- 
2.20.1.7.g153144c




[PATCH -next] libnvdimm: Fix some kernel-doc comments

2023-02-19 Thread Yang Li
Make the description of @nvdimm to @ndd in function
nvdimm_init_nsarea() and nvdimm_allocated_dpa () to silence the warnings:
drivers/nvdimm/dimm_devs.c:59: warning: Function parameter or member 'ndd' not 
described in 'nvdimm_init_nsarea'
drivers/nvdimm/dimm_devs.c:59: warning: Excess function parameter 'nvdimm' 
description in 'nvdimm_init_nsarea'
drivers/nvdimm/dimm_devs.c:844: warning: Function parameter or member 'ndd' not 
described in 'nvdimm_allocated_dpa'
drivers/nvdimm/dimm_devs.c:844: warning: Excess function parameter 'nvdimm' 
description in 'nvdimm_allocated_dpa

Reported-by: Abaci Robot 
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4118
Signed-off-by: Yang Li 
---
 drivers/nvdimm/dimm_devs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c
index 957f7c3d17ba..fc152e6016ca 100644
--- a/drivers/nvdimm/dimm_devs.c
+++ b/drivers/nvdimm/dimm_devs.c
@@ -53,7 +53,7 @@ static int validate_dimm(struct nvdimm_drvdata *ndd)
 
 /**
  * nvdimm_init_nsarea - determine the geometry of a dimm's namespace area
- * @nvdimm: dimm to initialize
+ * @ndd: dimm to initialize
  */
 int nvdimm_init_nsarea(struct nvdimm_drvdata *ndd)
 {
@@ -836,7 +836,7 @@ struct resource *nvdimm_allocate_dpa(struct nvdimm_drvdata 
*ndd,
 
 /**
  * nvdimm_allocated_dpa - sum up the dpa currently allocated to this label_id
- * @nvdimm: container of dpa-resource-root + labels
+ * @ndd: container of dpa-resource-root + labels
  * @label_id: dpa resource name of the form pmem-
  */
 resource_size_t nvdimm_allocated_dpa(struct nvdimm_drvdata *ndd,
-- 
2.20.1.7.g153144c




Re: [PATCH] arm: kernel: utilize hrtimer based broadcast

2019-04-02 Thread Yang Li
On Tue, Jan 5, 2016 at 3:46 AM Thomas Gleixner  wrote:
>
> On Sat, 2 Jan 2016, Russell King - ARM Linux wrote:
> > On Tue, Dec 29, 2015 at 02:54:10PM +0100, Thomas Gleixner wrote:
> > > I have no real opinion about that patch. It does no harm to 
> > > unconditionally
> > > setup the hrtimer based broadcast even if it's never used.
> > >
> > > Up to the arch maintainer to decide.
> >
> > That's really not fair to keep shovelling these kinds of decisions onto
> > architecture maintainers without any kind of explanation about how an
> > architecture maintainer should make such a decision.
> >
> > Do I roll a 6-face dice, and if it gives an odd number, I apply this
> > patch, otherwise I reject it?
> >
> > Is there a technical basis for making the decision?  If so, please
> > explain what the technical arguments are against having or not having
> > this change.
>
> The hrtimer based broadcast device is used when you have per cpu timers which
> stop in deeper power states, but you have no other timer hardware on the chip
> which can backup the per cpu timer in deep power states. The trick is that it
> emulates a timer hardware via a hrtimer and then tells the cpu idle code not
> to go into deep power states on the cpu which owns that hrtimer. All other
> cpus can go as deep as they want and still get woken up.
>
> The only downside of adding this unconditionally is extra code in case that it
> is not needed on a particular platform.
>
> Hope that helps.

Hi Russell,

This has been pending for so long time.  I assume this is an ack from
Thomas.  And given the same thing has been added for arm64 and powerpc
architecture, can you also merge this for ARM?


Regards,
Leo


Re: [PATCH v2 2/2] usb: dwc3: Add workaround for host mode VBUS glitch when boot

2019-02-25 Thread Yang Li
On Tue, Feb 19, 2019 at 1:24 AM Ran Wang  wrote:
>
> When DWC3 is set to host mode by programming register DWC3_GCTL, VBUS
> (or its control signal) will be turned on immediately on related Root Hub
> ports. Then, the VBUS is turned off for a little while(15us) when do xhci
> reset (conducted by xhci driver) and back to normal finally, we can
> observe a negative glitch of related signal happen.
>
> This VBUS glitch might cause some USB devices enumeration fail if kernel
> boot with them connected. Such as LS1012AFWRY/LS1043ARDB/LX2160AQDS
> /LS1088ARDB with Kingston 16GB USB2.0/Kingston USB3.0/JetFlash Transcend
> 4GB USB2.0 drives. The fail cases include enumerated as full-speed device
> or report wrong device descriptor, etc.
>
> One SW workaround which can fix this is by programing all xhci PORTSC[PP]
> to 0 to turn off VBUS immediately after setting host mode in DWC3 driver
> (per signal measurement result, it will be too late to do it in
> xhci-plat.c or xhci.c). Then, after xhci reset complete in xhci driver,
> PORTSC[PP]s' value will back to 1 automatically and VBUS on at that time,
> no glitch happen and normal enumeration process has no impact.
>
> Signed-off-by: Ran Wang 
> ---
> Changes in v2:
>   - Rename related property to 'snps,host-vbus-glitches'
>   - Rename related dwc member to 'host_vbus_glitches'
>   - Add member 'host_vbus_glitches' description in 'dwc3'
>
>  drivers/usb/dwc3/core.c |   47 
> +++
>  drivers/usb/dwc3/core.h |   12 +++-
>  2 files changed, 58 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index a1b126f..02d11bc 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -100,6 +100,41 @@ static int dwc3_get_dr_mode(struct dwc3 *dwc)
> return 0;
>  }
>
> +/*
> + * dwc3_power_of_all_roothub_ports - Power off all Root hub ports
> + * @dwc3: Pointer to our controller context structure
> + */
> +static void dwc3_power_off_all_roothub_ports(struct dwc3 *dwc)
> +{
> +   int i, port_num;
> +   u32 reg, op_regs_base, offset;
> +   void __iomem*xhci_regs;
> +
> +   /* xhci regs is not mapped yet, do it temperary here */
> +   if (dwc->xhci_resources[0].start) {
> +   xhci_regs = ioremap(dwc->xhci_resources[0].start,
> +   DWC3_XHCI_REGS_END);
> +   if (IS_ERR(xhci_regs)) {
> +   dev_err(dwc->dev, "Failed to ioremap xhci_regs\n");
> +   return;
> +   }
> +
> +   op_regs_base = HC_LENGTH(readl(xhci_regs));
> +   reg = readl(xhci_regs + XHCI_HCSPARAMS1);
> +   port_num = HCS_MAX_PORTS(reg);
> +
> +   for (i = 1; i <= port_num; i++) {
> +   offset = op_regs_base + XHCI_PORTSC_BASE + 0x10*(i-1);

Define the 0x10 as macro?  And why don't you have the initial value of
i loop to be 0 to avoid the (i-1) here?

> +   reg = readl(xhci_regs + offset);
> +   reg &= ~PORT_POWER;
> +   writel(reg, xhci_regs + offset);
> +   }
> +
> +   iounmap(xhci_regs);
> +   } else
> +   dev_err(dwc->dev, "xhci base reg invalid\n");
> +}
> +
>  void dwc3_set_prtcap(struct dwc3 *dwc, u32 mode)
>  {
> u32 reg;
> @@ -109,6 +144,15 @@ void dwc3_set_prtcap(struct dwc3 *dwc, u32 mode)
> reg |= DWC3_GCTL_PRTCAPDIR(mode);
> dwc3_writel(dwc->regs, DWC3_GCTL, reg);
>
> +   /*
> +* We have to power off all Root hub ports immediately after DWC3 set
> +* to host mode to avoid VBUS glitch happen when xhci get reset later.
> +*/
> +   if (dwc->host_vbus_glitches) {
> +   if (mode == DWC3_GCTL_PRTCAP_HOST)
> +   dwc3_power_off_all_roothub_ports(dwc);
> +   }
> +
> dwc->current_dr_role = mode;
>  }
>
> @@ -1306,6 +1350,9 @@ static void dwc3_get_properties(struct dwc3 *dwc)
> dwc->dis_metastability_quirk = device_property_read_bool(dev,
> "snps,dis_metastability_quirk");
>
> +   dwc->host_vbus_glitches = device_property_read_bool(dev,
> +   "snps,host-vbus-glitches");
> +
> dwc->lpm_nyet_threshold = lpm_nyet_threshold;
> dwc->tx_de_emphasis = tx_de_emphasis;
>
> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
> index df87641..9b3a7ed 100644
> --- a/drivers/usb/dwc3/core.h
> +++ b/drivers/usb/dwc3/core.h
> @@ -606,6 +606,14 @@
>  #define DWC3_OSTS_VBUSVLD  BIT(1)
>  #define DWC3_OSTS_CONIDSTS BIT(0)
>
> +/* Partial XHCI Register and Bit fields for quirk */
> +#define XHCI_HCSPARAMS10x4
> +#define XHCI_PORTSC_BASE   0x400
> +#define PORT_POWER (1 << 9)
> +#define HCS_MAX_PORTS(p)   (((p) >> 24) & 0x7f)
> +#define XHCI_HC_LENGTH(p)  (

[PATCH] gpiolib: acpi: Add missing IRQF_ONESHOT

2021-02-23 Thread Yang Li
fixed the following coccicheck:
./drivers/gpio/gpiolib-acpi.c:176:7-27: ERROR: Threaded IRQ with no
primary handler requested without IRQF_ONESHOT

Make sure threaded IRQs without a primary handler are always request
with IRQF_ONESHOT

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/gpio/gpiolib-acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index e37a57d..86efa2d 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -174,7 +174,7 @@ static void acpi_gpiochip_request_irq(struct acpi_gpio_chip 
*acpi_gpio,
int ret, value;
 
ret = request_threaded_irq(event->irq, NULL, event->handler,
-  event->irqflags, "ACPI:Event", event);
+  event->irqflags | IRQF_ONESHOT, 
"ACPI:Event", event);
if (ret) {
dev_err(acpi_gpio->chip->parent,
"Failed to setup interrupt handler for %d\n",
-- 
1.8.3.1



[PATCH] drivers: ipa: Add missing IRQF_ONESHOT

2021-02-23 Thread Yang Li
fixed the following coccicheck:
./drivers/net/ipa/ipa_smp2p.c:186:7-27: ERROR: Threaded IRQ with no
primary handler requested without IRQF_ONESHOT

Make sure threaded IRQs without a primary handler are always request
with IRQF_ONESHOT

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/net/ipa/ipa_smp2p.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ipa/ipa_smp2p.c b/drivers/net/ipa/ipa_smp2p.c
index a5f7a79..1149ed8 100644
--- a/drivers/net/ipa/ipa_smp2p.c
+++ b/drivers/net/ipa/ipa_smp2p.c
@@ -183,7 +183,7 @@ static int ipa_smp2p_irq_init(struct ipa_smp2p *smp2p, 
const char *name,
}
irq = ret;
 
-   ret = request_threaded_irq(irq, NULL, handler, 0, name, smp2p);
+   ret = request_threaded_irq(irq, NULL, handler, IRQF_ONESHOT, name, 
smp2p);
if (ret) {
dev_err(dev, "error %d requesting \"%s\" IRQ\n", ret, name);
return ret;
-- 
1.8.3.1



[PATCH] banalabs: Switch to using the new API kobj_to_dev()

2021-02-23 Thread Yang Li
fixed the following coccicheck:
./drivers/misc/habanalabs/common/sysfs.c:347:60-61: WARNING opportunity
for kobj_to_dev()

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/misc/habanalabs/common/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/habanalabs/common/sysfs.c 
b/drivers/misc/habanalabs/common/sysfs.c
index 4366d8f..79c1ddf 100644
--- a/drivers/misc/habanalabs/common/sysfs.c
+++ b/drivers/misc/habanalabs/common/sysfs.c
@@ -344,7 +344,7 @@ static ssize_t eeprom_read_handler(struct file *filp, 
struct kobject *kobj,
struct bin_attribute *attr, char *buf, loff_t offset,
size_t max_size)
 {
-   struct device *dev = container_of(kobj, struct device, kobj);
+   struct device *dev = kobj_to_dev(kobj);
struct hl_device *hdev = dev_get_drvdata(dev);
char *data;
int rc;
-- 
1.8.3.1



[PATCH] hwmon: Switch to using the new API kobj_to_dev()

2021-02-23 Thread Yang Li
fixed the following coccicheck:
./drivers/hwmon/hwmon.c:82:60-61: WARNING opportunity for kobj_to_dev()

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/hwmon/hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
index 6c68405..fd47ab4 100644
--- a/drivers/hwmon/hwmon.c
+++ b/drivers/hwmon/hwmon.c
@@ -79,7 +79,7 @@ struct hwmon_thermal_data {
 static umode_t hwmon_dev_name_is_visible(struct kobject *kobj,
 struct attribute *attr, int n)
 {
-   struct device *dev = container_of(kobj, struct device, kobj);
+   struct device *dev = kobj_to_dev(kobj);
 
if (to_hwmon_device(dev)->name == NULL)
return 0;
-- 
1.8.3.1



[PATCH] power: supply: Switch to using the new API kobj_to_dev()

2021-02-23 Thread Yang Li
fixed the following coccicheck:
./drivers/power/supply/ds2760_battery.c:201:60-61: WARNING opportunity
for kobj_to_dev()

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/power/supply/ds2760_battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/ds2760_battery.c 
b/drivers/power/supply/ds2760_battery.c
index 695bb67..5f50da5 100644
--- a/drivers/power/supply/ds2760_battery.c
+++ b/drivers/power/supply/ds2760_battery.c
@@ -198,7 +198,7 @@ static ssize_t w1_slave_read(struct file *filp, struct 
kobject *kobj,
 struct bin_attribute *bin_attr, char *buf,
 loff_t off, size_t count)
 {
-   struct device *dev = container_of(kobj, struct device, kobj);
+   struct device *dev = kobj_to_dev(kobj);
return w1_ds2760_read(dev, buf, off, count);
 }
 
-- 
1.8.3.1



[PATCH] pcmcia: Switch to using the new API kobj_to_dev()

2021-02-23 Thread Yang Li
fixed the following coccicheck:
./drivers/pcmcia/cistpl.c:1584:53-54: WARNING opportunity for
kobj_to_dev()

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/pcmcia/cistpl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
index cf109d9..7b296ba 100644
--- a/drivers/pcmcia/cistpl.c
+++ b/drivers/pcmcia/cistpl.c
@@ -1581,7 +1581,7 @@ static ssize_t pccard_store_cis(struct file *filp, struct 
kobject *kobj,
if (error)
return error;
 
-   s = to_socket(container_of(kobj, struct device, kobj));
+   s = to_socket(kobj_to_dev(kobj));
 
if (off)
return -EINVAL;
-- 
1.8.3.1



[PATCH] mfd: lm3533: Switch to using the new API kobj_to_dev()

2021-02-23 Thread Yang Li
fixed the following coccicheck:
./drivers/mfd/lm3533-core.c:361:60-61: WARNING opportunity for
kobj_to_dev()

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/mfd/lm3533-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/lm3533-core.c b/drivers/mfd/lm3533-core.c
index 22fdffd..5690768 100644
--- a/drivers/mfd/lm3533-core.c
+++ b/drivers/mfd/lm3533-core.c
@@ -358,7 +358,7 @@ static ssize_t store_output(struct device *dev,
 static umode_t lm3533_attr_is_visible(struct kobject *kobj,
 struct attribute *attr, int n)
 {
-   struct device *dev = container_of(kobj, struct device, kobj);
+   struct device *dev = kobj_to_dev(kobj);
struct lm3533 *lm3533 = dev_get_drvdata(dev);
struct device_attribute *dattr = to_dev_attr(attr);
struct lm3533_device_attribute *lattr = to_lm3533_dev_attr(dattr);
-- 
1.8.3.1



[PATCH] mips: cavium: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-02-24 Thread Yang Li
Fix the following coccicheck warning:
./arch/mips/cavium-octeon/oct_ilm.c:65:0-23: WARNING:
reset_statistics_ops should be defined with DEFINE_DEBUGFS_ATTRIBUTE

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/mips/cavium-octeon/oct_ilm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/cavium-octeon/oct_ilm.c 
b/arch/mips/cavium-octeon/oct_ilm.c
index 99e2715..6a46945 100644
--- a/arch/mips/cavium-octeon/oct_ilm.c
+++ b/arch/mips/cavium-octeon/oct_ilm.c
@@ -62,7 +62,7 @@ static int reset_statistics(void *data, u64 value)
return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(reset_statistics_ops, NULL, reset_statistics, 
"%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(reset_statistics_ops, NULL, reset_statistics, 
"%llu\n");
 
 static void init_debugfs(void)
 {
-- 
1.8.3.1



[PATCH] x86: platform: iosf_mbi: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-02-24 Thread Yang Li
Fix the following coccicheck warning:
./arch/x86/platform/intel/iosf_mbi.c:482:0-23: WARNING: iosf_mcr_fops
should be defined with DEFINE_DEBUGFS_ATTRIBUTE

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/x86/platform/intel/iosf_mbi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/platform/intel/iosf_mbi.c 
b/arch/x86/platform/intel/iosf_mbi.c
index 526f70f..ba70597 100644
--- a/arch/x86/platform/intel/iosf_mbi.c
+++ b/arch/x86/platform/intel/iosf_mbi.c
@@ -479,7 +479,7 @@ static int mcr_set(void *data, u64 val)
 
return err;
 }
-DEFINE_SIMPLE_ATTRIBUTE(iosf_mcr_fops, mcr_get, mcr_set , "%llx\n");
+DEFINE_DEBUGFS_ATTRIBUTE(iosf_mcr_fops, mcr_get, mcr_set, "%llx\n");
 
 static struct dentry *iosf_dbg;
 
-- 
1.8.3.1



[PATCH] remoteproc: pru: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-02-24 Thread Yang Li
Fix the following coccicheck warning:
./drivers/remoteproc/pru_rproc.c:247:0-23: WARNING:
pru_rproc_debug_ss_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/remoteproc/pru_rproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c
index 2667919..04a9d99 100644
--- a/drivers/remoteproc/pru_rproc.c
+++ b/drivers/remoteproc/pru_rproc.c
@@ -244,7 +244,7 @@ static int pru_rproc_debug_ss_get(void *data, u64 *val)
 
return 0;
 }
-DEFINE_SIMPLE_ATTRIBUTE(pru_rproc_debug_ss_fops, pru_rproc_debug_ss_get,
+DEFINE_DEBUGFS_ATTRIBUTE(pru_rproc_debug_ss_fops, pru_rproc_debug_ss_get,
pru_rproc_debug_ss_set, "%llu\n");
 
 /*
-- 
1.8.3.1



[PATCH] ocfs2: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-02-24 Thread Yang Li
Fix the following coccicheck warning:
./fs/ocfs2/blockcheck.c:232:0-23: WARNING: blockcheck_fops should be
defined with DEFINE_DEBUGFS_ATTRIBUTE

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 fs/ocfs2/blockcheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/blockcheck.c b/fs/ocfs2/blockcheck.c
index 6e07ddb..dabfef9 100644
--- a/fs/ocfs2/blockcheck.c
+++ b/fs/ocfs2/blockcheck.c
@@ -229,7 +229,7 @@ static int blockcheck_u64_get(void *data, u64 *val)
*val = *(u64 *)data;
return 0;
 }
-DEFINE_SIMPLE_ATTRIBUTE(blockcheck_fops, blockcheck_u64_get, NULL, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(blockcheck_fops, blockcheck_u64_get, NULL, "%llu\n");
 
 static void ocfs2_blockcheck_debug_remove(struct ocfs2_blockcheck_stats *stats)
 {
-- 
1.8.3.1



[PATCH] Input: edt-ft5x06: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-02-24 Thread Yang Li
Fix the following coccicheck warning:
./drivers/input/touchscreen/edt-ft5x06.c:697:0-23: WARNING:
debugfs_mode_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/input/touchscreen/edt-ft5x06.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/edt-ft5x06.c 
b/drivers/input/touchscreen/edt-ft5x06.c
index 2eefbc2..12bbc58 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -694,7 +694,7 @@ static int edt_ft5x06_debugfs_mode_set(void *data, u64 mode)
return retval;
 };
 
-DEFINE_SIMPLE_ATTRIBUTE(debugfs_mode_fops, edt_ft5x06_debugfs_mode_get,
+DEFINE_DEBUGFS_ATTRIBUTE(debugfs_mode_fops, edt_ft5x06_debugfs_mode_get,
edt_ft5x06_debugfs_mode_set, "%llu\n");
 
 static ssize_t edt_ft5x06_debugfs_raw_data_read(struct file *file,
-- 
1.8.3.1



[PATCH] PM: AVS: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-02-24 Thread Yang Li
Fix the following coccicheck warning:
./drivers/soc/ti/smartreflex.c:820:0-23: WARNING: pm_sr_fops should be
defined with DEFINE_DEBUGFS_ATTRIBUTE

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/soc/ti/smartreflex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/ti/smartreflex.c b/drivers/soc/ti/smartreflex.c
index 5376f3d..b3c7460 100644
--- a/drivers/soc/ti/smartreflex.c
+++ b/drivers/soc/ti/smartreflex.c
@@ -817,7 +817,7 @@ static int omap_sr_autocomp_store(void *data, u64 val)
return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(pm_sr_fops, omap_sr_autocomp_show,
+DEFINE_DEBUGFS_ATTRIBUTE(pm_sr_fops, omap_sr_autocomp_show,
omap_sr_autocomp_store, "%llu\n");
 
 static int omap_sr_probe(struct platform_device *pdev)
-- 
1.8.3.1



[PATCH] drm/amd/display: Simplify bool conversion

2021-02-18 Thread Yang Li
Fix the following coccicheck warning:
./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8142:16-21: WARNING:
conversion to bool not needed here

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 961abf1..f163e54 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -8138,8 +8138,7 @@ static void amdgpu_dm_atomic_commit_tail(struct 
drm_atomic_state *state)
hdcp_update_display(
adev->dm.hdcp_workqueue, 
aconnector->dc_link->link_index, aconnector,
new_con_state->hdcp_content_type,
-   new_con_state->content_protection == 
DRM_MODE_CONTENT_PROTECTION_DESIRED ? true
-   
 : false);
+   new_con_state->content_protection == 
DRM_MODE_CONTENT_PROTECTION_DESIRED);
}
 #endif
 
-- 
1.8.3.1



[PATCH] selftests: timers: set-timer-lat: remove unneeded semicolon

2021-02-18 Thread Yang Li
Eliminate the following coccicheck warning:
./tools/testing/selftests/timers/set-timer-lat.c:83:2-3: Unneeded
semicolon
./tools/testing/selftests/timers/nsleep-lat.c:75:2-3: Unneeded semicolon
./tools/testing/selftests/timers/nanosleep.c:75:2-3: Unneeded semicolon
./tools/testing/selftests/timers/inconsistency-check.c:75:2-3: Unneeded
semicolon
./tools/testing/selftests/timers/alarmtimer-suspend.c:82:2-3: Unneeded
semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 tools/testing/selftests/timers/alarmtimer-suspend.c  | 2 +-
 tools/testing/selftests/timers/inconsistency-check.c | 2 +-
 tools/testing/selftests/timers/nanosleep.c   | 2 +-
 tools/testing/selftests/timers/nsleep-lat.c  | 2 +-
 tools/testing/selftests/timers/set-timer-lat.c   | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/timers/alarmtimer-suspend.c 
b/tools/testing/selftests/timers/alarmtimer-suspend.c
index 4da09db..54da4b08 100644
--- a/tools/testing/selftests/timers/alarmtimer-suspend.c
+++ b/tools/testing/selftests/timers/alarmtimer-suspend.c
@@ -79,7 +79,7 @@ char *clockstring(int clockid)
return "CLOCK_BOOTTIME_ALARM";
case CLOCK_TAI:
return "CLOCK_TAI";
-   };
+   }
return "UNKNOWN_CLOCKID";
 }
 
diff --git a/tools/testing/selftests/timers/inconsistency-check.c 
b/tools/testing/selftests/timers/inconsistency-check.c
index 022d3ff..e6756d9 100644
--- a/tools/testing/selftests/timers/inconsistency-check.c
+++ b/tools/testing/selftests/timers/inconsistency-check.c
@@ -72,7 +72,7 @@ char *clockstring(int clockid)
return "CLOCK_BOOTTIME_ALARM";
case CLOCK_TAI:
return "CLOCK_TAI";
-   };
+   }
return "UNKNOWN_CLOCKID";
 }
 
diff --git a/tools/testing/selftests/timers/nanosleep.c 
b/tools/testing/selftests/timers/nanosleep.c
index 71b5441..433a096 100644
--- a/tools/testing/selftests/timers/nanosleep.c
+++ b/tools/testing/selftests/timers/nanosleep.c
@@ -72,7 +72,7 @@ char *clockstring(int clockid)
return "CLOCK_BOOTTIME_ALARM";
case CLOCK_TAI:
return "CLOCK_TAI";
-   };
+   }
return "UNKNOWN_CLOCKID";
 }
 
diff --git a/tools/testing/selftests/timers/nsleep-lat.c 
b/tools/testing/selftests/timers/nsleep-lat.c
index eb3e79e..a7ca982 100644
--- a/tools/testing/selftests/timers/nsleep-lat.c
+++ b/tools/testing/selftests/timers/nsleep-lat.c
@@ -72,7 +72,7 @@ char *clockstring(int clockid)
return "CLOCK_BOOTTIME_ALARM";
case CLOCK_TAI:
return "CLOCK_TAI";
-   };
+   }
return "UNKNOWN_CLOCKID";
 }
 
diff --git a/tools/testing/selftests/timers/set-timer-lat.c 
b/tools/testing/selftests/timers/set-timer-lat.c
index 50da454..d60bbca 100644
--- a/tools/testing/selftests/timers/set-timer-lat.c
+++ b/tools/testing/selftests/timers/set-timer-lat.c
@@ -80,7 +80,7 @@ char *clockstring(int clockid)
return "CLOCK_BOOTTIME_ALARM";
case CLOCK_TAI:
return "CLOCK_TAI";
-   };
+   }
return "UNKNOWN_CLOCKID";
 }
 
-- 
1.8.3.1



[PATCH] drm/radeon/dpm: fix non-restricted types with le16_to_cpu()

2021-02-18 Thread Yang Li
Fix the following sparse warnings:
drivers/gpu/drm/radeon/rv6xx_dpm.c:1798:21: warning: cast to restricted
__le32
drivers/gpu/drm/radeon/rv6xx_dpm.c:1799:22: warning: cast to restricted
__le16
drivers/gpu/drm/radeon/rv6xx_dpm.c:1800:23: warning: cast to restricted
__le16

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/gpu/drm/radeon/rv6xx_dpm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/rv6xx_dpm.c 
b/drivers/gpu/drm/radeon/rv6xx_dpm.c
index 69d380f..e6ab99e 100644
--- a/drivers/gpu/drm/radeon/rv6xx_dpm.c
+++ b/drivers/gpu/drm/radeon/rv6xx_dpm.c
@@ -1795,9 +1795,9 @@ static void rv6xx_parse_pplib_non_clock_info(struct 
radeon_device *rdev,
 struct radeon_ps *rps,
 struct _ATOM_PPLIB_NONCLOCK_INFO 
*non_clock_info)
 {
-   rps->caps = le32_to_cpu(non_clock_info->ulCapsAndSettings);
-   rps->class = le16_to_cpu(non_clock_info->usClassification);
-   rps->class2 = le16_to_cpu(non_clock_info->usClassification2);
+   rps->caps = le32_to_cpu((__le32 
__force)non_clock_info->ulCapsAndSettings);
+   rps->class = le16_to_cpu((__le16 
__force)non_clock_info->usClassification);
+   rps->class2 = le16_to_cpu((__le16 
__force)non_clock_info->usClassification2);
 
if (r600_is_uvd_state(rps->class, rps->class2)) {
rps->vclk = RV6XX_DEFAULT_VCLK_FREQ;
-- 
1.8.3.1



[PATCH] scsi: lpfc: Fix different base types in assignment

2021-02-19 Thread Yang Li
Fix the following sparse warnings:
drivers/scsi/lpfc/lpfc_nvme.c:833:22: warning: incorrect type in
assignment (different base types)

cpu_to_le32() returns __le32, but sgl->sge_len is uint32_t type.

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/scsi/lpfc/lpfc_nvme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 39d147e..b916a20 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -833,7 +833,7 @@
 * operation.
 */
sgl = lpfc_ncmd->dma_sgl;
-   sgl->sge_len = cpu_to_le32(nCmd->cmdlen);
+   sgl->sge_len = (__force uint32_t)cpu_to_le32(nCmd->cmdlen);
if (phba->cfg_nvme_embed_cmd) {
sgl->addr_hi = 0;
sgl->addr_lo = 0;
-- 
1.8.3.1



[PATCH] xfrm: Fix incorrect types in assignment

2021-02-19 Thread Yang Li
Fix the following sparse warnings:
net/xfrm/xfrm_policy.c:1303:22: warning: incorrect type in assignment
(different address spaces)

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 net/xfrm/xfrm_policy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index b74f28c..5c67407 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1225,7 +1225,7 @@ static void xfrm_hash_rebuild(struct work_struct *work)
struct xfrm_policy *pol;
struct xfrm_policy *policy;
struct hlist_head *chain;
-   struct hlist_head *odst;
+   struct hlist_head __rcu *odst;
struct hlist_node *newpos;
int i;
int dir;
-- 
1.8.3.1



[PATCH] drm/msm/dpu: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:752:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index 374b0e8..5a8e3e1 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -749,7 +749,7 @@ static void _dpu_kms_set_encoder_mode(struct msm_kms *kms,
case DRM_MODE_ENCODER_TMDS:
info.num_of_h_tiles = 1;
break;
-   };
+   }
 
rc = dpu_encoder_setup(encoder->dev, encoder, &info);
if (rc)
-- 
1.8.3.1



[PATCH] ntfs: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./fs/ntfs/super.c:1615:2-3: Unneeded semicolon
./fs/ntfs/super.c:1684:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 fs/ntfs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c
index 0d7e948..a45e06f 100644
--- a/fs/ntfs/super.c
+++ b/fs/ntfs/super.c
@@ -1612,7 +1612,7 @@ static bool load_and_init_attrdef(ntfs_volume *vol)
memcpy((u8*)vol->attrdef + (index++ << PAGE_SHIFT),
page_address(page), size);
ntfs_unmap_page(page);
-   };
+   }
if (size == PAGE_SIZE) {
size = i_size & ~PAGE_MASK;
if (size)
@@ -1681,7 +1681,7 @@ static bool load_and_init_upcase(ntfs_volume *vol)
memcpy((char*)vol->upcase + (index++ << PAGE_SHIFT),
page_address(page), size);
ntfs_unmap_page(page);
-   };
+   }
if (size == PAGE_SIZE) {
size = i_size & ~PAGE_MASK;
if (size)
-- 
1.8.3.1



[PATCH] scsi: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/scsi/qlogicpti.c:1153:3-4: Unneeded semicolon
./drivers/scsi/pmcraid.c:5090:2-3: Unneeded semicolon
./drivers/scsi/ipr.h:1979:2-3: Unneeded semicolon
./drivers/scsi/aha1542.c:287:2-3: Unneeded semicolon
./drivers/scsi/aha1542.c:327:3-4: Unneeded semicolon
./drivers/scsi/aha1542.c:389:2-3: Unneeded semicolon
./drivers/scsi/aha1542.c:487:3-4: Unneeded semicolon
./drivers/scsi/aha1542.c:498:2-3: Unneeded semicolon
./drivers/scsi/aha1542.c:533:2-3: Unneeded semicolon
./drivers/scsi/aha1542.c:548:2-3: Unneeded semicolon
./drivers/scsi/aha1542.c:575:2-3: Unneeded semicolon
./drivers/scsi/aha1542.c:598:2-3: Unneeded semicolon
./drivers/scsi/aha1542.c:631:2-3: Unneeded semicolon
./drivers/scsi/aha1542.c:649:2-3: Unneeded semicolon
./drivers/scsi/aha1542.c:667:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/scsi/aha1542.c   | 24 
 drivers/scsi/ipr.h   |  2 +-
 drivers/scsi/pmcraid.c   |  2 +-
 drivers/scsi/qlogicpti.c |  2 +-
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index dc5667a..e322347 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -284,7 +284,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
if (flag & SCRD)
printk("SCRD ");
printk("status %02x\n", inb(STATUS(sh->io_port)));
-   };
+   }
 #endif
number_serviced = 0;
 
@@ -324,7 +324,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
if (!number_serviced)
shost_printk(KERN_WARNING, sh, "interrupt 
received, but no mail.\n");
return IRQ_HANDLED;
-   };
+   }
 
mbo = (scsi2int(mb[mbi].ccbptr) - (unsigned 
long)aha1542->ccb_handle) / sizeof(struct ccb);
mbistatus = mb[mbi].status;
@@ -386,7 +386,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
   far as queuecommand is 
concerned */
my_done(tmp_cmd);
number_serviced++;
-   };
+   }
 }
 
 static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
@@ -484,7 +484,7 @@ static int aha1542_queuecommand(struct Scsi_Host *sh, 
struct scsi_cmnd *cmd)
scsi_for_each_sg(cmd, sg, sg_count, i) {
any2scsi(acmd->chain[i].dataptr, sg_dma_address(sg));
any2scsi(acmd->chain[i].datalen, sg_dma_len(sg));
-   };
+   }
any2scsi(ccb[mbo].datalen, sg_count * sizeof(struct chain));
any2scsi(ccb[mbo].dataptr, acmd->chain_handle);
 #ifdef DEBUG
@@ -495,7 +495,7 @@ static int aha1542_queuecommand(struct Scsi_Host *sh, 
struct scsi_cmnd *cmd)
ccb[mbo].op = 0;/* SCSI Initiator Command */
any2scsi(ccb[mbo].datalen, 0);
any2scsi(ccb[mbo].dataptr, 0);
-   };
+   }
ccb[mbo].idlun = (target & 7) << 5 | direction | (lun & 7); /*SCSI 
Target Id */
ccb[mbo].rsalen = 16;
ccb[mbo].linkptr[0] = ccb[mbo].linkptr[1] = ccb[mbo].linkptr[2] = 0;
@@ -530,7 +530,7 @@ static void setup_mailboxes(struct Scsi_Host *sh)
any2scsi(aha1542->mb[i].ccbptr,
 aha1542->ccb_handle + i * sizeof(struct ccb));
aha1542->mb[AHA1542_MAILBOXES + i].status = 0;
-   };
+   }
aha1542_intr_reset(sh->io_port);/* reset interrupts, so they 
don't block */
any2scsi(mb_cmd + 2, aha1542->mb_handle);
if (aha1542_out(sh->io_port, mb_cmd, 5))
@@ -545,7 +545,7 @@ static int aha1542_getconfig(struct Scsi_Host *sh)
i = inb(STATUS(sh->io_port));
if (i & DF) {
i = inb(DATA(sh->io_port));
-   };
+   }
aha1542_outb(sh->io_port, CMD_RETCONF);
aha1542_in(sh->io_port, inquiry_result, 3, 0);
if (!wait_mask(INTRFLAGS(sh->io_port), INTRMASK, HACC, 0, 0))
@@ -572,7 +572,7 @@ static int aha1542_getconfig(struct Scsi_Host *sh)
default:
shost_printk(KERN_ERR, sh, "Unable to determine DMA 
channel.\n");
return -1;
-   };
+   }
switch (inquiry_result[1]) {
case 0x40:
sh->irq = 15;
@@ -595,7 +595,7 @@ static int aha1542_getconfig(struct Scsi_Host *sh)
default:
shost_printk(KERN_ERR, sh, "Unable to determine IRQ level.\n");
return -1;
-   };
+   }
sh->this_id = inquiry_result[2] & 7;
return 0;
 }
@@ -628,7 +628,7 @@ static int aha1542_mbenable(struct Scsi_Host *sh)
 
if (aha1542_out(sh->

[PATCH] scsi: target: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/target/sbp/sbp_target.c:1009:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/target/sbp/sbp_target.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c
index e4a9b9f..2a6165f 100644
--- a/drivers/target/sbp/sbp_target.c
+++ b/drivers/target/sbp/sbp_target.c
@@ -1006,7 +1006,7 @@ static void tgt_agent_fetch_work(struct work_struct *work)
agent->state = AGENT_STATE_SUSPENDED;
 
spin_unlock_bh(&agent->lock);
-   };
+   }
 }
 
 static struct sbp_target_agent *sbp_target_agent_register(
-- 
1.8.3.1



[PATCH] soc: fsl: guts: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/soc/fsl/guts.c:120:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/soc/fsl/guts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c
index 34810f9..d5e9a5f 100644
--- a/drivers/soc/fsl/guts.c
+++ b/drivers/soc/fsl/guts.c
@@ -117,7 +117,7 @@ static const struct fsl_soc_die_attr *fsl_soc_die_match(
if (matches->svr == (svr & matches->mask))
return matches;
matches++;
-   };
+   }
return NULL;
 }
 
-- 
1.8.3.1



[PATCH] octeontx2-af: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c:272:2-3:
Unneeded semicolon
./drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c:1809:3-4:
Unneeded semicolon
./drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c:1788:3-4:
Unneeded semicolon
./drivers/net/ethernet/marvell/octeontx2/af/rvu.c:1326:2-3: Unneeded
semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 +-
 drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c | 4 ++--
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c 
b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
index e8fd712..0b6bf9f 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
@@ -1323,7 +1323,7 @@ static int rvu_get_attach_blkaddr(struct rvu *rvu, int 
blktype,
break;
default:
return rvu_get_blkaddr(rvu, blktype, 0);
-   };
+   }
 
if (is_block_implemented(rvu->hw, blkaddr))
return blkaddr;
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c 
b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
index d27543c..b5b5032 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
@@ -1785,7 +1785,7 @@ static void rvu_dbg_npc_mcam_show_action(struct seq_file 
*s,
break;
default:
break;
-   };
+   }
} else {
switch (rule->rx_action.op) {
case NIX_RX_ACTIONOP_DROP:
@@ -1806,7 +1806,7 @@ static void rvu_dbg_npc_mcam_show_action(struct seq_file 
*s,
break;
default:
break;
-   };
+   }
}
 }
 
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c 
b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
index 14832b6..f72c795 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
@@ -269,7 +269,7 @@ static void npc_scan_parse_result(struct npc_mcam *mcam, u8 
bit_number,
break;
default:
return;
-   };
+   }
npc_set_kw_masks(mcam, type, nr_bits, kwi, offset, intf);
 }
 
-- 
1.8.3.1



[PATCH] media: i2c: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/media/i2c/ov02a10.c:703:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/media/i2c/ov02a10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov02a10.c b/drivers/media/i2c/ov02a10.c
index 8683ffd..e0f7d69 100644
--- a/drivers/media/i2c/ov02a10.c
+++ b/drivers/media/i2c/ov02a10.c
@@ -700,7 +700,7 @@ static int ov02a10_set_ctrl(struct v4l2_ctrl *ctrl)
default:
ret = -EINVAL;
break;
-   };
+   }
 
pm_runtime_put(&client->dev);
 
-- 
1.8.3.1



[PATCH] ide: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/ide/ide-taskfile.c:167:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/ide/ide-taskfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index d016cbe..60d8fa1 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -164,7 +164,7 @@ static ide_startstop_t task_no_data_intr(ide_drive_t *drive)
if ((stat & ATA_BUSY) == 0 || retries-- == 0)
break;
udelay(10);
-   };
+   }
 
if (!OK_STAT(stat, ATA_DRDY, BAD_STAT)) {
if (custom && tf->command == ATA_CMD_SET_MULTI) {
-- 
1.8.3.1



[PATCH] Input: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/input/touchscreen/zinitix.c:164:31-32: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/input/touchscreen/zinitix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/zinitix.c 
b/drivers/input/touchscreen/zinitix.c
index a3e3adb..f64d881 100644
--- a/drivers/input/touchscreen/zinitix.c
+++ b/drivers/input/touchscreen/zinitix.c
@@ -161,7 +161,7 @@ static int zinitix_read_data(struct i2c_client *client,
 
ret = i2c_master_recv(client, (u8 *)values, length);
if (ret != length)
-   return ret < 0 ? ret : -EIO; ;
+   return ret < 0 ? ret : -EIO;
 
return 0;
 }
-- 
1.8.3.1



[PATCH] mt76: mt7915: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/net/wireless/mediatek/mt76/mt7915/mac.c:1694:2-3: Unneeded
semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c 
b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index f504eeb..a24d5b7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -1691,7 +1691,7 @@ void mt7915_mac_work(struct work_struct *work)
if (++phy->sta_work_count == 10) {
phy->sta_work_count = 0;
mt7915_mac_sta_stats_work(phy);
-   };
+   }
 
mutex_unlock(&mdev->mutex);
 
-- 
1.8.3.1



[PATCH] remoteproc: qcom_wcnss: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/remoteproc/qcom_wcnss.c:573:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/remoteproc/qcom_wcnss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index f958542..2a6a23c 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -570,7 +570,7 @@ static int wcnss_probe(struct platform_device *pdev)
if (IS_ERR(mmio)) {
ret = PTR_ERR(mmio);
goto free_rproc;
-   };
+   }
 
ret = wcnss_alloc_memory_region(wcnss);
if (ret)
-- 
1.8.3.1



[PATCH] pwm: lpc18xx-sct: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/pwm/pwm-lpc18xx-sct.c:292:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/pwm/pwm-lpc18xx-sct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-lpc18xx-sct.c b/drivers/pwm/pwm-lpc18xx-sct.c
index dc5133b..7ef4024 100644
--- a/drivers/pwm/pwm-lpc18xx-sct.c
+++ b/drivers/pwm/pwm-lpc18xx-sct.c
@@ -289,7 +289,7 @@ static int lpc18xx_pwm_request(struct pwm_chip *chip, 
struct pwm_device *pwm)
dev_err(lpc18xx_pwm->dev,
"maximum number of simultaneous channels reached\n");
return -EBUSY;
-   };
+   }
 
set_bit(event, &lpc18xx_pwm->event_map);
lpc18xx_data->duty_event = event;
-- 
1.8.3.1



[PATCH] power: vexpress: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/power/reset/vexpress-poweroff.c:136:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/power/reset/vexpress-poweroff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/reset/vexpress-poweroff.c 
b/drivers/power/reset/vexpress-poweroff.c
index 1fdbcbd..447ffda 100644
--- a/drivers/power/reset/vexpress-poweroff.c
+++ b/drivers/power/reset/vexpress-poweroff.c
@@ -133,7 +133,7 @@ static int vexpress_reset_probe(struct platform_device 
*pdev)
case FUNC_REBOOT:
ret = _vexpress_register_restart_handler(&pdev->dev);
break;
-   };
+   }
 
return ret;
 }
-- 
1.8.3.1



[PATCH] phy: phy-brcm-sata: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/phy/broadcom/phy-brcm-sata.c:654:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/phy/broadcom/phy-brcm-sata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/broadcom/phy-brcm-sata.c 
b/drivers/phy/broadcom/phy-brcm-sata.c
index 3ecf413..769c707 100644
--- a/drivers/phy/broadcom/phy-brcm-sata.c
+++ b/drivers/phy/broadcom/phy-brcm-sata.c
@@ -651,7 +651,7 @@ static int brcm_dsl_sata_init(struct brcm_sata_port *port)
break;
msleep(20);
try--;
-   };
+   }
 
if (!try) {
/* PLL did not lock; give up */
-- 
1.8.3.1



[PATCH] drm/msm/dp: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/gpu/drm/msm/dp/dp_ctrl.c:1161:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/gpu/drm/msm/dp/dp_ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
index e3462f5..61ed67b 100644
--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -1158,7 +1158,7 @@ static int dp_ctrl_link_rate_down_shift(struct 
dp_ctrl_private *ctrl)
default:
ret = -EINVAL;
break;
-   };
+   }
 
if (!ret)
DRM_DEBUG_DP("new rate=0x%x\n", ctrl->link->link_params.rate);
-- 
1.8.3.1



[PATCH] samples: bpf: remove unneeded semicolon

2021-02-02 Thread Yang Li
Eliminate the following coccicheck warning:
./samples/bpf/cookie_uid_helper_example.c:316:3-4: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 samples/bpf/cookie_uid_helper_example.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/samples/bpf/cookie_uid_helper_example.c 
b/samples/bpf/cookie_uid_helper_example.c
index deb0e3e..f364eaa 100644
--- a/samples/bpf/cookie_uid_helper_example.c
+++ b/samples/bpf/cookie_uid_helper_example.c
@@ -313,7 +313,7 @@ int main(int argc, char *argv[])
print_table();
printf("\n");
sleep(1);
-   };
+   }
} else if (cfg_test_cookie) {
udp_client();
}
-- 
1.8.3.1



[PATCH] phy: cpcap-usb: Simplify bool conversion

2021-01-28 Thread Yang Li
Fix the following coccicheck warning:
./drivers/phy/motorola/phy-cpcap-usb.c:146:31-36: WARNING: conversion to
bool not needed here

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/phy/motorola/phy-cpcap-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/motorola/phy-cpcap-usb.c 
b/drivers/phy/motorola/phy-cpcap-usb.c
index 4728e2b..6ee478b 100644
--- a/drivers/phy/motorola/phy-cpcap-usb.c
+++ b/drivers/phy/motorola/phy-cpcap-usb.c
@@ -143,7 +143,7 @@ static bool cpcap_usb_vbus_valid(struct cpcap_phy_ddata 
*ddata)
 
error = iio_read_channel_processed(ddata->vbus, &value);
if (error >= 0)
-   return value > 3900 ? true : false;
+   return value > 3900;
 
dev_err(ddata->dev, "error reading VBUS: %i\n", error);
 
-- 
1.8.3.1



[PATCH] power: supply: Simplify bool conversion

2021-01-29 Thread Yang Li
Fix the following coccicheck warning:
./drivers/power/supply/cpcap-charger.c:416:31-36: WARNING: conversion to
bool not needed here

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/power/supply/cpcap-charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/cpcap-charger.c 
b/drivers/power/supply/cpcap-charger.c
index c0d452e..c70a761 100644
--- a/drivers/power/supply/cpcap-charger.c
+++ b/drivers/power/supply/cpcap-charger.c
@@ -413,7 +413,7 @@ static bool cpcap_charger_vbus_valid(struct 
cpcap_charger_ddata *ddata)
 
error = iio_read_channel_processed(channel, &value);
if (error >= 0)
-   return value > 3900 ? true : false;
+   return value > 3900;
 
dev_err(ddata->dev, "error reading VBUS: %i\n", error);
 
-- 
1.8.3.1



[PATCH] misc: rtsx: Remove unneeded return variable

2021-01-31 Thread Yang Li
This patch removes unneeded return variables, using only
'0' instead.
It fixes the following warning detected by coccinelle:
./drivers/misc/cardreader/rtsx_pcr.c:1808:5-8: Unneeded variable: "ret".
Return "0" on line 1833.

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/misc/cardreader/rtsx_pcr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/misc/cardreader/rtsx_pcr.c 
b/drivers/misc/cardreader/rtsx_pcr.c
index 5a491d2..7dc7780 100644
--- a/drivers/misc/cardreader/rtsx_pcr.c
+++ b/drivers/misc/cardreader/rtsx_pcr.c
@@ -1805,7 +1805,6 @@ static int rtsx_pci_runtime_resume(struct device *device)
struct pci_dev *pcidev = to_pci_dev(device);
struct pcr_handle *handle;
struct rtsx_pcr *pcr;
-   int ret = 0;
 
handle = pci_get_drvdata(pcidev);
pcr = handle->pcr;
@@ -1830,7 +1829,7 @@ static int rtsx_pci_runtime_resume(struct device *device)
schedule_delayed_work(&pcr->idle_work, msecs_to_jiffies(200));
 
mutex_unlock(&pcr->pcr_mutex);
-   return ret;
+   return 0;
 }
 
 #else /* CONFIG_PM */
-- 
1.8.3.1



[PATCH] perf metricgroup: remove unneeded semicolon

2021-01-31 Thread Yang Li
Eliminate the following coccicheck warning:
./tools/perf/util/metricgroup.c:382:3-4: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 tools/perf/util/metricgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index e6d3452..26c990e 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -379,7 +379,7 @@ static int metricgroup__setup_events(struct list_head 
*groups,
metric_refs[i].metric_expr = ref->metric_expr;
i++;
}
-   };
+   }
 
expr->metric_refs = metric_refs;
expr->metric_expr = m->metric_expr;
-- 
1.8.3.1



[PATCH] treewide: remove unneeded semicolon

2021-01-31 Thread Yang Li
Eliminate the following coccicheck warning:
./tools/virtio/virtio-trace/trace-agent-ctl.c:78:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 tools/virtio/virtio-trace/trace-agent-ctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virtio/virtio-trace/trace-agent-ctl.c 
b/tools/virtio/virtio-trace/trace-agent-ctl.c
index 73d253d..39860be 100644
--- a/tools/virtio/virtio-trace/trace-agent-ctl.c
+++ b/tools/virtio/virtio-trace/trace-agent-ctl.c
@@ -75,7 +75,7 @@ static int wait_order(int ctl_fd)
 
if (ret)
break;
-   };
+   }
 
return ret;
 
-- 
1.8.3.1



[PATCH] ASoC: Intel: catpt: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./sound/soc/intel/catpt/pcm.c:355:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 sound/soc/intel/catpt/pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/catpt/pcm.c b/sound/soc/intel/catpt/pcm.c
index e5d54bb..88a0879 100644
--- a/sound/soc/intel/catpt/pcm.c
+++ b/sound/soc/intel/catpt/pcm.c
@@ -352,7 +352,7 @@ static int catpt_dai_apply_usettings(struct snd_soc_dai 
*dai,
break;
default:
return 0;
-   };
+   }
 
list_for_each_entry(pos, &component->card->snd_card->controls, list) {
if (pos->private_data == component &&
-- 
1.8.3.1



[PATCH] ASoC: fsl_xcvr: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./sound/soc/fsl/fsl_xcvr.c:739:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 sound/soc/fsl/fsl_xcvr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c
index 3d58c88..65b388a 100644
--- a/sound/soc/fsl/fsl_xcvr.c
+++ b/sound/soc/fsl/fsl_xcvr.c
@@ -736,7 +736,7 @@ static int fsl_xcvr_load_firmware(struct fsl_xcvr *xcvr)
/* clean current page, including data memory */
memset_io(xcvr->ram_addr, 0, size);
}
-   };
+   }
 
 err_firmware:
release_firmware(fw);
-- 
1.8.3.1



[PATCH] gcc-plugins: Remove unneeded return variable

2021-02-01 Thread Yang Li
This patch removes unneeded return variables, using only
'0' instead.
It fixes the following warning detected by coccinelle:
./scripts/gcc-plugins/structleak_plugin.c:173:14-17: Unneeded variable:
"ret". Return "0" on line 203

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 scripts/gcc-plugins/structleak_plugin.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/scripts/gcc-plugins/structleak_plugin.c 
b/scripts/gcc-plugins/structleak_plugin.c
index 29b480c..d7190e4 100644
--- a/scripts/gcc-plugins/structleak_plugin.c
+++ b/scripts/gcc-plugins/structleak_plugin.c
@@ -170,7 +170,6 @@ static void initialize(tree var)
 static unsigned int structleak_execute(void)
 {
basic_block bb;
-   unsigned int ret = 0;
tree var;
unsigned int i;
 
@@ -200,7 +199,7 @@ static unsigned int structleak_execute(void)
initialize(var);
}
 
-   return ret;
+   return 0;
 }
 
 #define PASS_NAME structleak
-- 
1.8.3.1



[PATCH] gcc-plugins: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./scripts/gcc-plugins/latent_entropy_plugin.c:527:2-3: Unneeded
semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 scripts/gcc-plugins/latent_entropy_plugin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gcc-plugins/latent_entropy_plugin.c 
b/scripts/gcc-plugins/latent_entropy_plugin.c
index 9dced66..589454b 100644
--- a/scripts/gcc-plugins/latent_entropy_plugin.c
+++ b/scripts/gcc-plugins/latent_entropy_plugin.c
@@ -524,7 +524,7 @@ static unsigned int latent_entropy_execute(void)
while (bb != EXIT_BLOCK_PTR_FOR_FN(cfun)) {
perturb_local_entropy(bb, local_entropy);
bb = bb->next_bb;
-   };
+   }
 
/* 4. mix local entropy into the global entropy variable */
perturb_latent_entropy(local_entropy);
-- 
1.8.3.1



[PATCH] arm: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./arch/arm/mach-artpec/board-artpec6.c:42:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/arm/mach-artpec/board-artpec6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-artpec/board-artpec6.c 
b/arch/arm/mach-artpec/board-artpec6.c
index d3cf3e8..c27e7bb 100644
--- a/arch/arm/mach-artpec/board-artpec6.c
+++ b/arch/arm/mach-artpec/board-artpec6.c
@@ -39,7 +39,7 @@ static void __init artpec6_init_machine(void)
 */
regmap_write(regmap, ARTPEC6_DMACFG_REGNUM,
 ARTPEC6_DMACFG_UARTS_BURST);
-   };
+   }
 }
 
 static void artpec6_l2c310_write_sec(unsigned long val, unsigned reg)
-- 
1.8.3.1



[PATCH] KVM: MIPS: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./arch/mips/kvm/mips.c:151:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/mips/kvm/mips.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
index 3d6a7f5..58a8812 100644
--- a/arch/mips/kvm/mips.c
+++ b/arch/mips/kvm/mips.c
@@ -148,7 +148,7 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
default:
/* Unsupported KVM type */
return -EINVAL;
-   };
+   }
 
/* Allocate page table to map GPA -> RPA */
kvm->arch.gpa_mm.pgd = kvm_pgd_alloc();
-- 
1.8.3.1



[PATCH] MIPS: malta-time: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./arch/mips/mti-malta/malta-time.c:141:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/mips/mti-malta/malta-time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c
index 7efcfe0..5677203 100644
--- a/arch/mips/mti-malta/malta-time.c
+++ b/arch/mips/mti-malta/malta-time.c
@@ -138,7 +138,7 @@ int get_c0_fdc_int(void)
case CPU_INTERAPTIV:
case CPU_PROAPTIV:
return -1;
-   };
+   }
 
if (cpu_has_veic)
return -1;
-- 
1.8.3.1



[PATCH] crypto: powerpc: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./arch/powerpc/crypto/sha256-spe-glue.c:132:2-3: Unneeded
semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/powerpc/crypto/sha256-spe-glue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/crypto/sha256-spe-glue.c 
b/arch/powerpc/crypto/sha256-spe-glue.c
index a6e650a..ffedea7 100644
--- a/arch/powerpc/crypto/sha256-spe-glue.c
+++ b/arch/powerpc/crypto/sha256-spe-glue.c
@@ -129,7 +129,7 @@ static int ppc_spe_sha256_update(struct shash_desc *desc, 
const u8 *data,
 
src += bytes;
len -= bytes;
-   };
+   }
 
memcpy((char *)sctx->buf, src, len);
return 0;
-- 
1.8.3.1



[PATCH] powerpc/eeh: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./arch/powerpc/kernel/eeh.c:782:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/powerpc/kernel/eeh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 813713c..02c058d 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -779,7 +779,7 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum 
pcie_reset_state stat
default:
eeh_pe_state_clear(pe, EEH_PE_ISOLATED | EEH_PE_CFG_BLOCKED, 
true);
return -EINVAL;
-   };
+   }
 
return 0;
 }
-- 
1.8.3.1



[PATCH] powerpc/prom_init: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./arch/powerpc/kernel/prom_init.c:2990:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/powerpc/kernel/prom_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index e9d4eb6..2d111bb 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2987,7 +2987,7 @@ static void __init fixup_device_tree_efika_add_phy(void)
" 0x3 encode-int encode+"
" s\" interrupts\" property"
" finish-device");
-   };
+   }
 
/* Check for a PHY device node - if missing then create one and
 * give it's phandle to the ethernet node */
-- 
1.8.3.1



[PATCH] KVM: PPC: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./arch/powerpc/kvm/booke.c:701:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/powerpc/kvm/booke.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 288a982..f38ae3e 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -698,7 +698,7 @@ int kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu)
 
kvmppc_set_exit_type(vcpu, EMULATED_MTMSRWE_EXITS);
r = 1;
-   };
+   }
 
return r;
 }
-- 
1.8.3.1



[PATCH] powerpc/64s: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./arch/powerpc/platforms/powernv/setup.c:160:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/powerpc/platforms/powernv/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/powernv/setup.c 
b/arch/powerpc/platforms/powernv/setup.c
index 4426a10..167d6ed 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -157,7 +157,7 @@ static void __init pnv_check_guarded_cores(void)
for_each_node_by_type(dn, "cpu") {
if (of_property_match_string(dn, "status", "bad") >= 0)
bad_count++;
-   };
+   }
 
if (bad_count) {
printk("  _ ___\n");
-- 
1.8.3.1



[PATCH] dma-mapping: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./arch/powerpc/platforms/ps3/system-bus.c:606:2-3: Unneeded semicolon
./arch/powerpc/platforms/ps3/system-bus.c:765:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/powerpc/platforms/ps3/system-bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/ps3/system-bus.c 
b/arch/powerpc/platforms/ps3/system-bus.c
index b431f41..5c73926 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -603,7 +603,7 @@ static dma_addr_t ps3_ioc0_map_page(struct device *_dev, 
struct page *page,
default:
/* not happned */
BUG();
-   };
+   }
result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size,
 &bus_addr, iopte_flag);
 
@@ -762,7 +762,7 @@ int ps3_system_bus_device_register(struct 
ps3_system_bus_device *dev)
break;
default:
BUG();
-   };
+   }
 
dev->core.of_node = NULL;
set_dev_node(&dev->core, 0);
-- 
1.8.3.1



[PATCH] powerpc/book3s64: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./arch/powerpc/platforms/pseries/lpar.c:1632:2-3: Unneeded semicolon
./arch/powerpc/platforms/pseries/lpar.c:1663:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/powerpc/platforms/pseries/lpar.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/lpar.c 
b/arch/powerpc/platforms/pseries/lpar.c
index 764170f..24889b8 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -1629,7 +1629,7 @@ static int pseries_lpar_resize_hpt(unsigned long shift)
}
msleep(delay);
rc = plpar_resize_hpt_prepare(0, shift);
-   };
+   }
 
switch (rc) {
case H_SUCCESS:
@@ -1663,7 +1663,7 @@ static int pseries_lpar_resize_hpt(unsigned long shift)
pr_warn("Unexpected error %d from 
H_RESIZE_HPT_COMMIT\n",
state.commit_rc);
return -EIO;
-   };
+   }
}
 
pr_info("HPT resize to shift %lu complete (%lld ms / %lld ms)\n",
-- 
1.8.3.1



[PATCH] riscv: kasan: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./arch/riscv/mm/kasan_init.c:103:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/riscv/mm/kasan_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/mm/kasan_init.c b/arch/riscv/mm/kasan_init.c
index a8a2ffd..fac437a 100644
--- a/arch/riscv/mm/kasan_init.c
+++ b/arch/riscv/mm/kasan_init.c
@@ -100,7 +100,7 @@ void __init kasan_init(void)
break;
 
populate(kasan_mem_to_shadow(start), kasan_mem_to_shadow(end));
-   };
+   }
 
for (i = 0; i < PTRS_PER_PTE; i++)
set_pte(&kasan_early_shadow_pte[i],
-- 
1.8.3.1



[PATCH] s390/cpum_cf: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./arch/s390/kernel/perf_cpum_cf.c:272:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/s390/kernel/perf_cpum_cf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c
index 0eb1d1c..b3beef6 100644
--- a/arch/s390/kernel/perf_cpum_cf.c
+++ b/arch/s390/kernel/perf_cpum_cf.c
@@ -269,7 +269,7 @@ static int __hw_perf_event_init(struct perf_event *event, 
unsigned int type)
case CPUMF_CTR_SET_MAX:
/* The counter could not be associated to a counter set */
return -EINVAL;
-   };
+   }
 
/* Initialize for using the CPU-measurement counter facility */
if (!atomic_inc_not_zero(&num_events)) {
-- 
1.8.3.1



[PATCH] firmware: ti_sci: rm: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/firmware/ti_sci.c:1762:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/firmware/ti_sci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 235c7e7..5ae2040 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -1759,7 +1759,7 @@ static int ti_sci_get_resource_range(const struct 
ti_sci_handle *handle,
desc->num = resp->range_num;
desc->start_sec = resp->range_start_sec;
desc->num_sec = resp->range_num_sec;
-   };
+   }
 
 fail:
ti_sci_put_one_xfer(&info->minfo, xfer);
-- 
1.8.3.1



[PATCH] psci: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/firmware/psci/psci.c:141:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/firmware/psci/psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index f5fc429..35b355e 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -138,7 +138,7 @@ static int psci_to_linux_errno(int errno)
return -EINVAL;
case PSCI_RET_DENIED:
return -EPERM;
-   };
+   }
 
return -EINVAL;
 }
-- 
1.8.3.1



[PATCH] dmaengine: qcom: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/dma/qcom/gpi.c:1703:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/dma/qcom/gpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
index 1a0bf6b0..f20b557 100644
--- a/drivers/dma/qcom/gpi.c
+++ b/drivers/dma/qcom/gpi.c
@@ -1700,7 +1700,7 @@ static int gpi_create_i2c_tre(struct gchan *chan, struct 
gpi_desc *desc,
 
tre->dword[3] = u32_encode_bits(TRE_TYPE_DMA, TRE_FLAGS_TYPE);
tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_IEOT);
-   };
+   }
 
for (i = 0; i < tre_idx; i++)
dev_dbg(dev, "TRE:%d %x:%x:%x:%x\n", i, desc->tre[i].dword[0],
-- 
1.8.3.1



[PATCH] apei: erst: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/acpi/apei/erst.c:691:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/acpi/apei/erst.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
index 2e0b0fc..b959721 100644
--- a/drivers/acpi/apei/erst.c
+++ b/drivers/acpi/apei/erst.c
@@ -688,7 +688,7 @@ static int __erst_read_from_storage(u64 record_id, u64 
offset)
break;
if (erst_timedout(&timeout, SPIN_UNIT))
return -EIO;
-   };
+   }
rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS);
if (rc)
return rc;
-- 
1.8.3.1



[PATCH] PM / devfreq: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/devfreq/rk3399_dmc.c:403:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/devfreq/rk3399_dmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
index 2e91216..9e9d3b4c 100644
--- a/drivers/devfreq/rk3399_dmc.c
+++ b/drivers/devfreq/rk3399_dmc.c
@@ -400,7 +400,7 @@ static int rk3399_dmcfreq_probe(struct platform_device 
*pdev)
default:
ret = -EINVAL;
goto err_edev;
-   };
+   }
 
 no_pmu:
arm_smccc_smc(ROCKCHIP_SIP_DRAM_FREQ, 0, 0,
-- 
1.8.3.1



[PATCH] bus: ti-sysc: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/bus/ti-sysc.c:1595:2-3: Unneeded semicolon
./drivers/bus/ti-sysc.c:2833:3-4: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/bus/ti-sysc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index a27d751..8b8aa9c 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -1592,7 +1592,7 @@ static u32 sysc_quirk_dispc(struct sysc *ddata, int 
dispc_offset,
case SOC_UNKNOWN:
default:
return 0;
-   };
+   }
 
/* Remap the whole module range to be able to reset dispc outputs */
devm_iounmap(ddata->dev, ddata->module_va);
@@ -2830,7 +2830,7 @@ static int sysc_init_soc(struct sysc *ddata)
break;
default:
break;
-   };
+   }
}
 
match = soc_device_match(sysc_soc_feat_match);
-- 
1.8.3.1



[PATCH] drm/kmb: remove unneeded semicolon

2021-02-01 Thread Yang Li
Eliminate the following coccicheck warning:
./drivers/gpu/drm/kmb/kmb_dsi.c:281:3-4: Unneeded semicolon
./drivers/gpu/drm/kmb/kmb_dsi.c:301:3-4: Unneeded semicolon
./drivers/gpu/drm/kmb/kmb_dsi.c:318:3-4: Unneeded semicolon
./drivers/gpu/drm/kmb/kmb_dsi.c:337:3-4: Unneeded semicolon
./drivers/gpu/drm/kmb/kmb_dsi.c:361:2-3: Unneeded semicolon

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/gpu/drm/kmb/kmb_dsi.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c
index 4b5d82a..231041b 100644
--- a/drivers/gpu/drm/kmb/kmb_dsi.c
+++ b/drivers/gpu/drm/kmb/kmb_dsi.c
@@ -281,7 +281,7 @@ static u32 mipi_get_datatype_params(u32 data_type, u32 
data_mode,
default:
DRM_ERROR("DSI: Invalid data_mode %d\n", data_mode);
return -EINVAL;
-   };
+   }
break;
case DSI_LP_DT_PPS_YCBCR422_16B:
data_type_param.size_constraint_pixels = 2;
@@ -301,7 +301,7 @@ static u32 mipi_get_datatype_params(u32 data_type, u32 
data_mode,
default:
DRM_ERROR("DSI: Invalid data_mode %d\n", data_mode);
return -EINVAL;
-   };
+   }
break;
case DSI_LP_DT_LPPS_YCBCR422_20B:
case DSI_LP_DT_PPS_YCBCR422_24B:
@@ -318,7 +318,7 @@ static u32 mipi_get_datatype_params(u32 data_type, u32 
data_mode,
default:
DRM_ERROR("DSI: Invalid data_mode %d\n", data_mode);
return -EINVAL;
-   };
+   }
break;
case DSI_LP_DT_PPS_RGB565_16B:
data_type_param.size_constraint_pixels = 1;
@@ -337,7 +337,7 @@ static u32 mipi_get_datatype_params(u32 data_type, u32 
data_mode,
default:
DRM_ERROR("DSI: Invalid data_mode %d\n", data_mode);
return -EINVAL;
-   };
+   }
break;
case DSI_LP_DT_PPS_RGB666_18B:
data_type_param.size_constraint_pixels = 4;
@@ -361,7 +361,7 @@ static u32 mipi_get_datatype_params(u32 data_type, u32 
data_mode,
default:
DRM_ERROR("DSI: Invalid data_type %d\n", data_type);
return -EINVAL;
-   };
+   }
 
*params = data_type_param;
return 0;
-- 
1.8.3.1



[PATCH] ocfs2: Remove unneeded return variable

2021-02-03 Thread Yang Li
This patch removes unneeded return variables, using only
'0' instead.
It fixes the following warning detected by coccinelle:
./fs/ocfs2/stack_o2cb.c:69:5-16: Unneeded variable: "o2dlm_flags".
Return "0" on line 84

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 fs/ocfs2/stack_o2cb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c
index dbf8b57..2da9633 100644
--- a/fs/ocfs2/stack_o2cb.c
+++ b/fs/ocfs2/stack_o2cb.c
@@ -66,8 +66,6 @@ static inline int mode_to_o2dlm(int mode)
}
 static int flags_to_o2dlm(u32 flags)
 {
-   int o2dlm_flags = 0;
-
map_flag(DLM_LKF_NOQUEUE, LKM_NOQUEUE);
map_flag(DLM_LKF_CANCEL, LKM_CANCEL);
map_flag(DLM_LKF_CONVERT, LKM_CONVERT);
@@ -81,7 +79,7 @@ static int flags_to_o2dlm(u32 flags)
/* map_flag() should have cleared every flag passed in */
BUG_ON(flags != 0);
 
-   return o2dlm_flags;
+   return 0;
 }
 #undef map_flag
 
-- 
1.8.3.1



[PATCH] jfs: Remove unneeded return variable

2021-02-03 Thread Yang Li
This patch removes unneeded return variables, using only
'0' instead.
It fixes the following warning detected by coccinelle:
./fs/jfs/jfs_txnmgr.c:1370:5-7: Unneeded variable: "rc". Return "0" on
line 1417

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 fs/jfs/jfs_txnmgr.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
index dca8edd..87ef2a2 100644
--- a/fs/jfs/jfs_txnmgr.c
+++ b/fs/jfs/jfs_txnmgr.c
@@ -1367,7 +1367,6 @@ int txCommit(tid_t tid,   /* transaction 
identifier */
  */
 static int txLog(struct jfs_log * log, struct tblock * tblk, struct commit * 
cd)
 {
-   int rc = 0;
struct inode *ip;
lid_t lid;
struct tlock *tlck;
@@ -1414,7 +1413,7 @@ static int txLog(struct jfs_log * log, struct tblock * 
tblk, struct commit * cd)
}
}
 
-   return rc;
+   return 0;
 }
 
 /*
@@ -1425,7 +1424,6 @@ static int txLog(struct jfs_log * log, struct tblock * 
tblk, struct commit * cd)
 static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
 struct tlock * tlck, struct commit * cd)
 {
-   int rc = 0;
struct metapage *mp;
pxd_t *pxd;
struct pxd_lock *pxdlock;
@@ -1527,7 +1525,7 @@ static int diLog(struct jfs_log * log, struct tblock * 
tblk, struct lrd * lrd,
}
 #endif /* _JFS_WIP */
 
-   return rc;
+   return 0;
 }
 
 /*
-- 
1.8.3.1



[PATCH] btrfs: Remove unneeded return variable

2021-02-03 Thread Yang Li
This patch removes unneeded return variables, using only
'0' instead.
It fixes the following warning detected by coccinelle:
./fs/btrfs/extent_map.c:299:5-8: Unneeded variable: "ret". Return "0" on
line 331
./fs/btrfs/disk-io.c:4402:5-8: Unneeded variable: "ret". Return "0" on
line 4410

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 fs/btrfs/disk-io.c| 5 ++---
 fs/btrfs/extent_map.c | 3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 6b35b7e..e951da7 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -4399,7 +4399,6 @@ static int btrfs_destroy_delayed_refs(struct 
btrfs_transaction *trans,
struct rb_node *node;
struct btrfs_delayed_ref_root *delayed_refs;
struct btrfs_delayed_ref_node *ref;
-   int ret = 0;
 
delayed_refs = &trans->delayed_refs;
 
@@ -4407,7 +4406,7 @@ static int btrfs_destroy_delayed_refs(struct 
btrfs_transaction *trans,
if (atomic_read(&delayed_refs->num_entries) == 0) {
spin_unlock(&delayed_refs->lock);
btrfs_debug(fs_info, "delayed_refs has NO entry");
-   return ret;
+   return 0;
}
 
while ((node = rb_first_cached(&delayed_refs->href_root)) != NULL) {
@@ -4473,7 +4472,7 @@ static int btrfs_destroy_delayed_refs(struct 
btrfs_transaction *trans,
 
spin_unlock(&delayed_refs->lock);
 
-   return ret;
+   return 0;
 }
 
 static void btrfs_destroy_delalloc_inodes(struct btrfs_root *root)
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index bd6229f..bac7eba 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -296,7 +296,6 @@ static void try_merge_map(struct extent_map_tree *tree, 
struct extent_map *em)
 int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len,
   u64 gen)
 {
-   int ret = 0;
struct extent_map *em;
bool prealloc = false;
 
@@ -328,7 +327,7 @@ int unpin_extent_cache(struct extent_map_tree *tree, u64 
start, u64 len,
free_extent_map(em);
 out:
write_unlock(&tree->lock);
-   return ret;
+   return 0;
 
 }
 
-- 
1.8.3.1



[PATCH] media: atomisp: Remove unneeded return variable

2021-02-03 Thread Yang Li
This patch removes unneeded return variables, using only
'0' instead.
It fixes the following warning detected by coccinelle:
./drivers/staging/media/atomisp/pci/sh_css_mipi.c:39:5-8: Unneeded
variable: "err". Return "0" on line 44

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/staging/media/atomisp/pci/sh_css_mipi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/sh_css_mipi.c 
b/drivers/staging/media/atomisp/pci/sh_css_mipi.c
index d5ae7f0..de8ee45 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_mipi.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_mipi.c
@@ -36,12 +36,10 @@
 int
 ia_css_mipi_frame_specify(const unsigned int size_mem_words,
  const bool contiguous) {
-   int err = 0;
-
my_css.size_mem_words = size_mem_words;
(void)contiguous;
 
-   return err;
+   return 0;
 }
 
 /*
-- 
1.8.3.1



[PATCH] media: atomisp: Remove unneeded return variable

2021-02-03 Thread Yang Li
This patch removes unneeded return variables, using only
'0' instead.
It fixes the following warning detected by coccinelle:
./drivers/staging/media/atomisp/pci/sh_css_mipi.c:39:5-8: Unneeded
variable: "err". Return "0" on line 44

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/staging/media/atomisp/pci/sh_css_mipi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/sh_css_mipi.c 
b/drivers/staging/media/atomisp/pci/sh_css_mipi.c
index d5ae7f0..de8ee45 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_mipi.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_mipi.c
@@ -36,12 +36,10 @@
 int
 ia_css_mipi_frame_specify(const unsigned int size_mem_words,
  const bool contiguous) {
-   int err = 0;
-
my_css.size_mem_words = size_mem_words;
(void)contiguous;
 
-   return err;
+   return 0;
 }
 
 /*
-- 
1.8.3.1



[PATCH] scsi: qla4xxx: Remove unneeded return variable

2021-02-03 Thread Yang Li
This patch removes unneeded return variables, using only
'0' instead.
It fixes the following warning detected by coccinelle:
./drivers/scsi/qla4xxx/ql4_os.c:3642:5-7: Unneeded variable: "rc".
Return "0" on line 3741

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/scsi/qla4xxx/ql4_os.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index a4b014e..ed92534 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -3639,7 +3639,6 @@ static int qla4xxx_copy_to_fwddb_param(struct 
iscsi_bus_flash_session *sess,
   struct dev_db_entry *fw_ddb_entry)
 {
uint16_t options;
-   int rc = 0;
 
options = le16_to_cpu(fw_ddb_entry->options);
SET_BITVAL(conn->is_fw_assigned_ipv6,  options, BIT_11);
@@ -3738,7 +3737,7 @@ static int qla4xxx_copy_to_fwddb_param(struct 
iscsi_bus_flash_session *sess,
 
COPY_ISID(fw_ddb_entry->isid, sess->isid);
 
-   return rc;
+   return 0;
 }
 
 static void qla4xxx_copy_to_sess_conn_params(struct iscsi_conn *conn,
-- 
1.8.3.1



[PATCH] scsi: ipr: Remove unneeded return variable

2021-02-03 Thread Yang Li
This patch removes unneeded return variables, using only
'0' instead.
It fixes the following warning detected by coccinelle:
./drivers/scsi/ipr.c:9508:5-7: Unneeded variable: "rc". Return "0" on
line 9524

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/scsi/ipr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index e451102..8eced7c 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -9505,7 +9505,6 @@ static pci_ers_result_t ipr_pci_error_detected(struct 
pci_dev *pdev,
  **/
 static int ipr_probe_ioa_part2(struct ipr_ioa_cfg *ioa_cfg)
 {
-   int rc = 0;
unsigned long host_lock_flags = 0;
 
ENTER;
@@ -9521,7 +9520,7 @@ static int ipr_probe_ioa_part2(struct ipr_ioa_cfg 
*ioa_cfg)
spin_unlock_irqrestore(ioa_cfg->host->host_lock, host_lock_flags);
 
LEAVE;
-   return rc;
+   return 0;
 }
 
 /**
-- 
1.8.3.1



[PATCH] scsi: lpfc: Remove unneeded return variable

2021-02-03 Thread Yang Li
This patch removes unneeded return variables, using only
'1' instead.
It fixes the following warning detected by coccinelle:

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/scsi/lpfc/lpfc_sli.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 95caad7..31f97f6 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -3376,7 +3376,6 @@ struct lpfc_hbq_init *lpfc_hbq_defs[] = {
  struct lpfc_iocbq *saveq)
 {
struct lpfc_iocbq *cmdiocbp;
-   int rc = 1;
unsigned long iflag;
 
cmdiocbp = lpfc_sli_iocbq_lookup(phba, pring, saveq);
@@ -3501,7 +3500,7 @@ struct lpfc_hbq_init *lpfc_hbq_defs[] = {
}
}
 
-   return rc;
+   return 1;
 }
 
 /**
-- 
1.8.3.1



[PATCH] scsi: isci: Remove redundant initialization of variable 'status'

2021-02-03 Thread Yang Li
This patch removes unneeded return variables.
It fixes the following warning detected by coccinelle:
./drivers/scsi/isci/request.c:1483:17-23: Unneeded variable: "status".
Return "SCI_SUCCESS" on line 1503
./drivers/scsi/isci/request.c:2157:17-23: Unneeded variable: "status".
Return "SCI_SUCCESS" on line 2177

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/scsi/isci/request.c | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index 6e08179..8676282 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -1480,8 +1480,6 @@ static enum sci_status 
sci_stp_request_pio_data_in_copy_data(
 stp_request_pio_await_h2d_completion_tc_event(struct isci_request *ireq,
  u32 completion_code)
 {
-   enum sci_status status = SCI_SUCCESS;
-
switch (SCU_GET_COMPLETION_TL_STATUS(completion_code)) {
case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_GOOD):
ireq->scu_status = SCU_TASK_DONE_GOOD;
@@ -1500,7 +1498,7 @@ static enum sci_status 
sci_stp_request_pio_data_in_copy_data(
break;
}
 
-   return status;
+   return SCI_SUCCESS;
 }
 
 static enum sci_status
@@ -2154,8 +2152,6 @@ static enum sci_status 
stp_request_udma_await_tc_event(struct isci_request *ireq
 static enum sci_status atapi_raw_completion(struct isci_request *ireq, u32 
completion_code,
  enum sci_base_request_states 
next)
 {
-   enum sci_status status = SCI_SUCCESS;
-
switch (SCU_GET_COMPLETION_TL_STATUS(completion_code)) {
case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_GOOD):
ireq->scu_status = SCU_TASK_DONE_GOOD;
@@ -2174,7 +2170,7 @@ static enum sci_status atapi_raw_completion(struct 
isci_request *ireq, u32 compl
break;
}
 
-   return status;
+   return SCI_SUCCESS;
 }
 
 static enum sci_status atapi_data_tc_completion_handler(struct isci_request 
*ireq,
-- 
1.8.3.1



[PATCH] ARM: OMAP2+: add missing call to of_node_put()

2021-02-25 Thread Yang Li
In one of the error paths of the for_each_child_of_node() loop,
add missing call to of_node_put().

Fix the following coccicheck warning:
./arch/arm/mach-omap2/omap_hwmod.c:2132:1-23: WARNING: Function
"for_each_child_of_node" should have of_node_put() before return around
line 2140.

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/arm/mach-omap2/omap_hwmod.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 2310cd5..007e91e 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2137,6 +2137,7 @@ static int of_dev_hwmod_lookup(struct device_node *np,
if (res == 0) {
*found = fc;
*index = i;
+   of_node_put(np0);
return 0;
}
}
-- 
1.8.3.1



[PATCH] crypto/nx: add missing call to of_node_put()

2021-02-25 Thread Yang Li
In one of the error paths of the for_each_child_of_node() loop,
add missing call to of_node_put().

Fix the following coccicheck warning:
./drivers/crypto/nx/nx-common-powernv.c:927:1-23: WARNING: Function
"for_each_child_of_node" should have of_node_put() before return around
line 936.

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/crypto/nx/nx-common-powernv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/nx/nx-common-powernv.c 
b/drivers/crypto/nx/nx-common-powernv.c
index 13c65de..b43c457 100644
--- a/drivers/crypto/nx/nx-common-powernv.c
+++ b/drivers/crypto/nx/nx-common-powernv.c
@@ -933,6 +933,7 @@ static int __init nx_powernv_probe_vas(struct device_node 
*pn)
NX_CT_GZIP, "ibm,p9-nx-gzip", &ct_gzip);
 
if (ret)
+   of_node_put(dn);
return ret;
}
 
-- 
1.8.3.1



[PATCH] direct-io: Using kmem_cache_zalloc() instead of kmem_cache_alloc() and memset()

2021-02-25 Thread Yang Li
Fix the following coccicheck warning:
./fs/direct-io.c:1155:7-23: WARNING: kmem_cache_zalloc should be used
for dio, instead of kmem_cache_alloc/memset

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 fs/direct-io.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/direct-io.c b/fs/direct-io.c
index 0957e1b..6ec2935 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -1152,7 +1152,7 @@ static inline int drop_refcount(struct dio *dio)
if (iov_iter_rw(iter) == READ && !count)
return 0;
 
-   dio = kmem_cache_alloc(dio_cache, GFP_KERNEL);
+   dio = kmem_cache_zalloc(dio_cache, GFP_KERNEL);
if (!dio)
return -ENOMEM;
/*
@@ -1160,8 +1160,6 @@ static inline int drop_refcount(struct dio *dio)
 * performance regression in a database benchmark.  So, we take
 * care to only zero out what's needed.
 */
-   memset(dio, 0, offsetof(struct dio, pages));
-
dio->flags = flags;
if (dio->flags & DIO_LOCKING && iov_iter_rw(iter) == READ) {
/* will be released by direct_io_worker */
-- 
1.8.3.1



[PATCH] drm/amdgpu: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-02-25 Thread Yang Li
Fix the following coccicheck warning:
./drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1589:0-23: WARNING:
fops_ib_preempt should be defined with DEFINE_DEBUGFS_ATTRIBUTE
./drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1592:0-23: WARNING:
fops_sclk_set should be defined with DEFINE_DEBUGFS_ATTRIBUTE

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 0a25fec..52ef488 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -1586,10 +1586,10 @@ static int amdgpu_debugfs_sclk_set(void *data, u64 val)
return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(fops_ib_preempt, NULL,
+DEFINE_DEBUGFS_ATTRIBUTE(fops_ib_preempt, NULL,
amdgpu_debugfs_ib_preempt, "%llu\n");
 
-DEFINE_SIMPLE_ATTRIBUTE(fops_sclk_set, NULL,
+DEFINE_DEBUGFS_ATTRIBUTE(fops_sclk_set, NULL,
amdgpu_debugfs_sclk_set, "%llu\n");
 
 int amdgpu_debugfs_init(struct amdgpu_device *adev)
-- 
1.8.3.1



[PATCH] media: exynos4-is: add missing call to of_node_put()

2021-02-25 Thread Yang Li
In one of the error paths of the for_each_child_of_node() loop in
fimc_md_parse_one_endpoint, add missing call to of_node_put().

Fix the following coccicheck warning:
./drivers/media/platform/exynos4-is/media-dev.c:489:1-23: WARNING:
Function "for_each_child_of_node" should have of_node_put() before
return around line 492.

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/media/platform/exynos4-is/media-dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/exynos4-is/media-dev.c 
b/drivers/media/platform/exynos4-is/media-dev.c
index 8e1e892..467bc69 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -489,6 +489,7 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
for_each_child_of_node(port, ep) {
ret = fimc_md_parse_one_endpoint(fmd, ep);
if (ret < 0)
+   of_node_put(ep);
return ret;
}
 
-- 
1.8.3.1



[PATCH] memory: tegra: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-02-25 Thread Yang Li
Fix the following coccicheck warning:
./drivers/memory/tegra/tegra124-emc.c:1207:0-23: WARNING:
tegra_emc_debug_min_rate_fops should be defined with
DEFINE_DEBUGFS_ATTRIBUTE
./drivers/memory/tegra/tegra124-emc.c:1237:0-23: WARNING:
tegra_emc_debug_max_rate_fops should be defined with
DEFINE_DEBUGFS_ATTRIBUTE

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/memory/tegra/tegra124-emc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/memory/tegra/tegra124-emc.c 
b/drivers/memory/tegra/tegra124-emc.c
index bee8d9f..874e1a0 100644
--- a/drivers/memory/tegra/tegra124-emc.c
+++ b/drivers/memory/tegra/tegra124-emc.c
@@ -1204,7 +1204,7 @@ static int tegra_emc_debug_min_rate_set(void *data, u64 
rate)
return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(tegra_emc_debug_min_rate_fops,
+DEFINE_DEBUGFS_ATTRIBUTE(tegra_emc_debug_min_rate_fops,
tegra_emc_debug_min_rate_get,
tegra_emc_debug_min_rate_set, "%llu\n");
 
@@ -1234,7 +1234,7 @@ static int tegra_emc_debug_max_rate_set(void *data, u64 
rate)
return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(tegra_emc_debug_max_rate_fops,
+DEFINE_DEBUGFS_ATTRIBUTE(tegra_emc_debug_max_rate_fops,
tegra_emc_debug_max_rate_get,
tegra_emc_debug_max_rate_set, "%llu\n");
 
-- 
1.8.3.1



[PATCH] regulator: add missing call to of_node_put()

2021-02-25 Thread Yang Li
In one of the error paths of the for_each_child_of_node() loop,
add missing call to of_node_put().

Fix the following coccicheck warning:
./drivers/regulator/scmi-regulator.c:343:1-23: WARNING: Function
"for_each_child_of_node" should have of_node_put() before return around
line 347.

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/regulator/scmi-regulator.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/regulator/scmi-regulator.c 
b/drivers/regulator/scmi-regulator.c
index 0e8b3ca..a41bb06 100644
--- a/drivers/regulator/scmi-regulator.c
+++ b/drivers/regulator/scmi-regulator.c
@@ -344,6 +344,7 @@ static int scmi_regulator_probe(struct scmi_device *sdev)
ret = process_scmi_regulator_of_node(sdev, child, rinfo);
/* abort on any mem issue */
if (ret == -ENOMEM)
+   of_node_put(child);
return ret;
}
 
-- 
1.8.3.1



[PATCH] powerpc: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-02-25 Thread Yang Li
Fix the following coccicheck warning:
./arch/powerpc/kernel/setup_64.c:1143:0-23: WARNING: fops_rfi_flush
should be defined with DEFINE_DEBUGFS_ATTRIBUTE
./arch/powerpc/kernel/setup_64.c:1169:0-23: WARNING: fops_entry_flush
should be defined with DEFINE_DEBUGFS_ATTRIBUTE
./arch/powerpc/kernel/setup_64.c:1195:0-23: WARNING: fops_uaccess_flush
should be defined with DEFINE_DEBUGFS_ATTRIBUTE
./arch/powerpc/platforms/powernv/memtrace.c:311:0-23: WARNING:
memtrace_init_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE
./arch/powerpc/xmon/xmon.c:3997:0-23: WARNING: xmon_dbgfs_ops should be
defined with DEFINE_DEBUGFS_ATTRIBUTE

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 arch/powerpc/kernel/setup_64.c| 6 +++---
 arch/powerpc/platforms/powernv/memtrace.c | 4 ++--
 arch/powerpc/xmon/xmon.c  | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 560ed8b..6a030b0 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -1140,7 +1140,7 @@ static int rfi_flush_get(void *data, u64 *val)
return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(fops_rfi_flush, rfi_flush_get, rfi_flush_set, 
"%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(fops_rfi_flush, rfi_flush_get, rfi_flush_set, 
"%llu\n");
 
 static int entry_flush_set(void *data, u64 val)
 {
@@ -1166,7 +1166,7 @@ static int entry_flush_get(void *data, u64 *val)
return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(fops_entry_flush, entry_flush_get, entry_flush_set, 
"%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(fops_entry_flush, entry_flush_get, entry_flush_set, 
"%llu\n");
 
 static int uaccess_flush_set(void *data, u64 val)
 {
@@ -1192,7 +1192,7 @@ static int uaccess_flush_get(void *data, u64 *val)
return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(fops_uaccess_flush, uaccess_flush_get, 
uaccess_flush_set, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(fops_uaccess_flush, uaccess_flush_get, 
uaccess_flush_set, "%llu\n");
 
 static __init int rfi_flush_debugfs_init(void)
 {
diff --git a/arch/powerpc/platforms/powernv/memtrace.c 
b/arch/powerpc/platforms/powernv/memtrace.c
index 019669e..731be02 100644
--- a/arch/powerpc/platforms/powernv/memtrace.c
+++ b/arch/powerpc/platforms/powernv/memtrace.c
@@ -308,8 +308,8 @@ static int memtrace_enable_get(void *data, u64 *val)
return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(memtrace_init_fops, memtrace_enable_get,
-   memtrace_enable_set, "0x%016llx\n");
+DEFINE_DEBUGFS_ATTRIBUTE(memtrace_init_fops, memtrace_enable_get,
+memtrace_enable_set, "0x%016llx\n");
 
 static int memtrace_init(void)
 {
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 3fe3749..6d54767 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -3994,7 +3994,7 @@ static int xmon_dbgfs_get(void *data, u64 *val)
return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(xmon_dbgfs_ops, xmon_dbgfs_get,
+DEFINE_DEBUGFS_ATTRIBUTE(xmon_dbgfs_ops, xmon_dbgfs_get,
xmon_dbgfs_set, "%llu\n");
 
 static int __init setup_xmon_dbgfs(void)
-- 
1.8.3.1



[PATCH] pinctrl: ingenic: add missing call to of_node_put()

2021-02-25 Thread Yang Li
In one of the error paths of the for_each_child_of_node() loop in
ingenic_gpio_probe, add missing call to of_node_put().

Fix the following coccicheck warning:
./drivers/pinctrl/pinctrl-ingenic.c:2485:1-23: WARNING: Function
"for_each_child_of_node" should have of_node_put() before return around
line 2489.

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/pinctrl/pinctrl-ingenic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/pinctrl-ingenic.c 
b/drivers/pinctrl/pinctrl-ingenic.c
index f274612..b7294a2 100644
--- a/drivers/pinctrl/pinctrl-ingenic.c
+++ b/drivers/pinctrl/pinctrl-ingenic.c
@@ -2486,6 +2486,7 @@ static int __init ingenic_pinctrl_probe(struct 
platform_device *pdev)
if (of_match_node(ingenic_gpio_of_match, node)) {
err = ingenic_gpio_probe(jzpc, node);
if (err)
+   of_node_put(node);
return err;
}
}
-- 
1.8.3.1



[PATCH] phy: ti: j721e-wiz: add missing call to of_node_put()

2021-02-25 Thread Yang Li
In one of the error paths of the for_each_child_of_node() loop in
of_property_read_u32, add missing call to of_node_put().

Fix the following coccicheck warning:
./drivers/phy/ti/phy-j721e-wiz.c:786:1-23: WARNING: Function
"for_each_child_of_node" should have of_node_put() before return around
line 795.

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---
 drivers/phy/ti/phy-j721e-wiz.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c
index c9cfafe..448d8d1 100644
--- a/drivers/phy/ti/phy-j721e-wiz.c
+++ b/drivers/phy/ti/phy-j721e-wiz.c
@@ -789,6 +789,7 @@ static int wiz_get_lane_phy_types(struct device *dev, 
struct wiz *wiz)
 
ret = of_property_read_u32(subnode, "reg", ®);
if (ret) {
+   of_node_put(subnode);
dev_err(dev,
"%s: Reading \"reg\" from \"%s\" failed: %d\n",
__func__, subnode->name, ret);
-- 
1.8.3.1



[PATCH v2] crypto/nx: add missing call to of_node_put()

2021-02-25 Thread Yang Li
In one of the error paths of the for_each_child_of_node() loop,
add missing call to of_node_put().

Fix the following coccicheck warning:
./drivers/crypto/nx/nx-common-powernv.c:927:1-23: WARNING: Function
"for_each_child_of_node" should have of_node_put() before return around
line 936.

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---

Changes in v2:
-add braces for if

 drivers/crypto/nx/nx-common-powernv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/nx/nx-common-powernv.c 
b/drivers/crypto/nx/nx-common-powernv.c
index 13c65de..446f611 100644
--- a/drivers/crypto/nx/nx-common-powernv.c
+++ b/drivers/crypto/nx/nx-common-powernv.c
@@ -932,8 +932,10 @@ static int __init nx_powernv_probe_vas(struct device_node 
*pn)
ret = find_nx_device_tree(dn, chip_id, vasid,
NX_CT_GZIP, "ibm,p9-nx-gzip", &ct_gzip);
 
-   if (ret)
+   if (ret) {
+   of_node_put(dn);
return ret;
+   }
}
 
if (!ct_842 || !ct_gzip) {
-- 
1.8.3.1



[PATCH v2] media: exynos4-is: add missing call to of_node_put()

2021-02-25 Thread Yang Li
In one of the error paths of the for_each_child_of_node() loop in
fimc_md_parse_one_endpoint, add missing call to of_node_put().

Fix the following coccicheck warning:
./drivers/media/platform/exynos4-is/media-dev.c:489:1-23: WARNING:
Function "for_each_child_of_node" should have of_node_put() before
return around line 492.

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---

Changes in v2:
-add braces for if

 drivers/media/platform/exynos4-is/media-dev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/exynos4-is/media-dev.c 
b/drivers/media/platform/exynos4-is/media-dev.c
index 8e1e892..a6ee2a3 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -488,8 +488,10 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
 
for_each_child_of_node(port, ep) {
ret = fimc_md_parse_one_endpoint(fmd, ep);
-   if (ret < 0)
+   if (ret < 0) {
+   of_node_put(ep);
return ret;
+   }
}
 
return 0;
-- 
1.8.3.1



[PATCH v2] pinctrl: ingenic: add missing call to of_node_put()

2021-02-25 Thread Yang Li
In one of the error paths of the for_each_child_of_node() loop in
ingenic_gpio_probe, add missing call to of_node_put().

Fix the following coccicheck warning:
./drivers/pinctrl/pinctrl-ingenic.c:2485:1-23: WARNING: Function
"for_each_child_of_node" should have of_node_put() before return around
line 2489.

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---

Changes in v2:
-add braces for if

 drivers/pinctrl/pinctrl-ingenic.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-ingenic.c 
b/drivers/pinctrl/pinctrl-ingenic.c
index f274612..c8ecd01 100644
--- a/drivers/pinctrl/pinctrl-ingenic.c
+++ b/drivers/pinctrl/pinctrl-ingenic.c
@@ -2485,8 +2485,10 @@ static int __init ingenic_pinctrl_probe(struct 
platform_device *pdev)
for_each_child_of_node(dev->of_node, node) {
if (of_match_node(ingenic_gpio_of_match, node)) {
err = ingenic_gpio_probe(jzpc, node);
-   if (err)
+   if (err) {
+   of_node_put(node);
return err;
+   }
}
}
 
-- 
1.8.3.1



[PATCH v2] regulator: add missing call to of_node_put()

2021-02-25 Thread Yang Li
In one of the error paths of the for_each_child_of_node() loop,
add missing call to of_node_put().

Fix the following coccicheck warning:
./drivers/regulator/scmi-regulator.c:343:1-23: WARNING: Function
"for_each_child_of_node" should have of_node_put() before return around
line 347.

Reported-by: Abaci Robot 
Signed-off-by: Yang Li 
---

Changes in v2:
-add braces for if

 drivers/regulator/scmi-regulator.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/scmi-regulator.c 
b/drivers/regulator/scmi-regulator.c
index 0e8b3ca..a917c81 100644
--- a/drivers/regulator/scmi-regulator.c
+++ b/drivers/regulator/scmi-regulator.c
@@ -343,8 +343,10 @@ static int scmi_regulator_probe(struct scmi_device *sdev)
for_each_child_of_node(np, child) {
ret = process_scmi_regulator_of_node(sdev, child, rinfo);
/* abort on any mem issue */
-   if (ret == -ENOMEM)
+   if (ret == -ENOMEM) {
+   of_node_put(child);
return ret;
+   }
}
 
/*
-- 
1.8.3.1



[PATCH] scsi: mpt3sas: style: Simplify bool comparison

2021-01-11 Thread YANG LI
Fix the following coccicheck warning:
./drivers/scsi/mpt3sas/mpt3sas_base.c:2424:5-20: WARNING: Comparison of
0/1 to bool variable

Signed-off-by: YANG LI 
Reported-by: Abaci Robot
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c 
b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 6e23dc3..f5582c8 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -2505,8 +2505,8 @@ static u32 base_mod64(u64 dividend, u32 divisor)
}
 
/* Check if we need to build a native SG list. */
-   if (base_is_prp_possible(ioc, pcie_device,
-   scmd, sges_left) == 0) {
+   if (!base_is_prp_possible(ioc, pcie_device,
+   scmd, sges_left)) {
/* We built a native SG list, just return. */
goto out;
}
-- 
1.8.3.1



  1   2   3   >