Re: [PATCH] leds: tlc591xx: fix device_node_continue.cocci warnings (fwd)

2018-12-07 Thread Julia Lawall
julia > > Best regards, > Jacek Anaszewski > > On 12/6/18 9:28 PM, Julia Lawall wrote: > > Hello, > > > > The code seems to be wrong in several ways. If the continue is wanted, > > the of_node_put is not needed; it will happen on the next iteration. If >

[PATCH] leds: tlc591xx: fix device_node_continue.cocci warnings (fwd)

2018-12-06 Thread Julia Lawall
: Thu, 6 Dec 2018 19:48:54 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: [PATCH] leds: tlc591xx: fix device_node_continue.cocci warnings CC: kbuild-...@01.org TO: Jyri Sarha CC: Peter Ujfalusi CC: Jacek Anaszewski CC: Pavel Machek CC: linux-l...@vger.kernel.org CC

Re: [PATCH] locktorture: Fix assignment of boolean variables

2018-12-03 Thread Julia Lawall
On Mon, 3 Dec 2018, Peter Zijlstra wrote: > On Mon, Dec 03, 2018 at 10:20:42AM +0100, Julia Lawall wrote: > > Personally, I would prefer that assignments involving boolean variables > > use true or false. It seems more readable. Potentially better for tools > > as well.

Re: [PATCH] locktorture: Fix assignment of boolean variables

2018-12-03 Thread Julia Lawall
On Mon, 3 Dec 2018, Peter Zijlstra wrote: > On Mon, Dec 03, 2018 at 09:35:00AM +0100, Peter Zijlstra wrote: > > On Sat, Dec 01, 2018 at 12:37:01PM -0800, Paul E. McKenney wrote: > > > On Sat, Dec 01, 2018 at 04:31:49PM +0800, Wen Yang wrote: > > > > Fix the following warnings reported by

Re: [PATCH] tty: serial: qcom_geni_serial: Fix softlock

2018-11-27 Thread Julia Lawall
Hello, Since size_t is unsigned, avail will not be less than 0 on line 742. Perhaps just reorganize the computation on line 740. julia -- Forwarded message -- Date: Tue, 27 Nov 2018 16:13:53 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: Re: [PATCH

Re: [PATCH] of: add dtc annotations functionality to dtx_diff

2018-11-26 Thread Julia Lawall
Frank Rowand Tested-by: Julia Lawall > --- > > This feature depends upon commit 5667e7ef9a9a ("annotations: add the > annotation functionality") in the dtc git repository. To use the > new flags before the new version of dtc is imported to the linux > kernel, downl

[PATCH] mailbox: hi3660: constify mbox_chan_ops structure

2018-11-02 Thread Julia Lawall
The mbox_chan_ops structure can be const as it is only stored in the ops field of an mbox_controller structure and this field is const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/mailbox/hi3660-mailbox.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] ASoC: smd845: constify snd_soc_ops structure

2018-11-02 Thread Julia Lawall
The snd_soc_ops structure can be const as it is only stored in the ops field of a snd_soc_dai_link structure and this field is const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- sound/soc/qcom/sdm845.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Outreachy kernel] Re: [PATCH v2] staging: vboxvideo: Remove unnecessary parentheses

2018-10-31 Thread Julia Lawall
On Tue, 30 Oct 2018, Shayenne Moura wrote: > On 10/30, Greg Kroah-Hartman wrote: > > On Tue, Oct 23, 2018 at 02:43:04PM -0300, Shayenne da Luz Moura wrote: > > > Remove unneeded parentheses around the arguments of ||. This reduces > > > clutter and code behave in the same way. > > > Change

Re: [Outreachy kernel] [RESEND PATCH 2/2] staging: vboxvideo: Use unsigned int instead bool

2018-10-30 Thread Julia Lawall
On Tue, 30 Oct 2018, Shayenne Moura wrote: > Hi, > > > On Sun, 28 Oct 2018, Himanshu Jha wrote: > > > > > On Sun, Oct 28, 2018 at 09:47:15AM +0100, Julia Lawall wrote: > > > > > The "possible alignement issues" in CHECK report is diffic

[PATCH] thermal: broadcom: use devm_thermal_zone_of_sensor_register

2018-10-30 Thread Julia Lawall
Using devm_thermal_zone_of_sensor_register allows to simplify some error handling code, drop a label, and drop the remove function. Signed-off-by: Julia Lawall --- This patch is completely orthogonal to the recent constification patch. drivers/thermal/broadcom/brcmstb_thermal.c | 24

[PATCH 1/2] usb: gadget: uvc: constify vb2_ops structure

2018-10-30 Thread Julia Lawall
The vb2_ops structure can be const as it is only stored in the ops field of a vb2_queue structure and this field is const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/usb/gadget/function/uvc_queue.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 2/2] thermal: broadcom: constify thermal_zone_of_device_ops structure

2018-10-30 Thread Julia Lawall
The thermal_zone_of_device_ops structure can be const as it is only passed as the last argument of thermal_zone_of_sensor_register and the corresponding parameter is declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- Unrelated to this change

[PATCH 1/2] thermal: armada: constify thermal_zone_of_device_ops structure

2018-10-30 Thread Julia Lawall
The thermal_zone_of_device_ops structure can be const as it is only passed as the last argument of devm_thermal_zone_of_sensor_register and the corresponding parameter is declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/thermal/armada_thermal.c

[PATCH 0/2] constify thermal_zone_of_device_ops structures

2018-10-30 Thread Julia Lawall
The thermal_zone_of_device_ops structures can be const as they are only passed as the last argument of a thermal_zone_of_sensor_register function and the corresponding parameter is declared as const. Done with the help of Coccinelle. --- drivers/thermal/armada_thermal.c |2 +-

Re: [PATCH 2/8] ARM: vexpress/spc: constify clk_ops structure

2018-10-29 Thread Julia Lawall
On Mon, 29 Oct 2018, Liviu Dudau wrote: > On Sat, Oct 27, 2018 at 07:47:36AM +0200, Julia Lawall wrote: > > The clk_ops structure is only stored in the ops field of a > > clk_init_data structure. This field is const, so the clk_ops > > structure can be const as wel

Re: [Outreachy kernel] [RESEND PATCH 2/2] staging: vboxvideo: Use unsigned int instead bool

2018-10-28 Thread Julia Lawall
On Sun, 28 Oct 2018, Himanshu Jha wrote: > On Sun, Oct 28, 2018 at 09:47:15AM +0100, Julia Lawall wrote: > > > The "possible alignement issues" in CHECK report is difficult to figure > > > out by just doing a glance analysis. :) > > > > > > Linu

Re: [Outreachy kernel] [RESEND PATCH 2/2] staging: vboxvideo: Use unsigned int instead bool

2018-10-28 Thread Julia Lawall
> The "possible alignement issues" in CHECK report is difficult to figure > out by just doing a glance analysis. :) > > Linus also suggested to use bool as the base type i.e., `bool x:1` but > again sizeof(_Bool) is implementation defined ranging from 1-4 bytes. If bool x:1 has the size of bool,

[PATCH] ASoC: AMD: constify regulator_desc structure

2018-10-28 Thread Julia Lawall
The regulator_desc structure can be const as it is only passed as the second argument of devm_regulator_register and the corresponding parameter is declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- sound/soc/amd/acp-da7219-max98357a.c |2 +- 1 file

Re: [Outreachy kernel] [RESEND PATCH 2/2] staging: vboxvideo: Use unsigned int instead bool

2018-10-27 Thread Julia Lawall
On Sat, 27 Oct 2018, Joe Perches wrote: > On Fri, 2018-10-26 at 22:54 +0200, Julia Lawall wrote: > > [Adding Joe Perches] > > > > On Fri, 26 Oct 2018, Sasha Levin wrote: > > > > > On Fri, Oct 26, 2018 at 04:04:45PM -0300, Shayenne da Luz Moura wrot

[PATCH] PCI: histb: constify dw_pcie_host_ops structure

2018-10-27 Thread Julia Lawall
The dw_pcie_host_ops structure is only stored in the ops field of a pcie_port structure, and this field is const, so make the dw_pcie_host_ops structure const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/pci/controller/dwc/pcie-histb.c |2 +- 1 file

[PATCH 3/3] ASoC: codecs: constify snd_soc_dai_ops structures

2018-10-27 Thread Julia Lawall
The snd_soc_dai_ops structures are only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- sound/soc/codecs/ak4458.c |2 +- sound/soc/codecs/ak5558.c |2

[PATCH 1/3] soundwire: intel: constify snd_soc_dai_ops structures

2018-10-27 Thread Julia Lawall
The snd_soc_dai_ops structures are only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/soundwire/intel.c |4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 0/3] constify snd_soc_dai_ops structures

2018-10-27 Thread Julia Lawall
The snd_soc_dai_ops structures are only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structures const as well. Done with the help of Coccinelle. --- drivers/soundwire/intel.c|4 ++-- sound/soc/codecs/ak4458.c|2 +-

[PATCH 2/3] ASoC: qdsp6: q6afe-dai: constify snd_soc_dai_ops structures

2018-10-27 Thread Julia Lawall
The snd_soc_dai_ops structures are only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structures const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- sound/soc/qcom/qdsp6/q6afe-dai.c |8 1 file changed, 4

[PATCH 3/8] clk: palmas: constify clk_ops structure

2018-10-27 Thread Julia Lawall
The clk_ops structure is only stored in the ops field of clk_init_data structures. This field is const, so the clk_ops structure can be const as well. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall --- drivers/clk/clk-palmas.c |2 +- 1 file changed, 1 insertion

[PATCH 6/8] clk: s2mps11: constify clk_ops structure

2018-10-27 Thread Julia Lawall
The clk_ops structure is only stored in the ops fields of clk_init_data structures. This field is const, so the clk_ops structure can be const as well. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall --- drivers/clk/clk-s2mps11.c |2 +- 1 file changed, 1

[PATCH 5/8] clk: pxa: constify clk_ops structures

2018-10-27 Thread Julia Lawall
These clk_ops structures are only passed to a call to clk_register_composite where the corresponding parameters are const, so the clk_ops structure can be const as well. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall --- drivers/clk/pxa/clk-pxa.c |4 ++-- 1 file

[PATCH 0/8] constify clk_ops structure

2018-10-27 Thread Julia Lawall
Declare as const clk_ops structures that are only stored in const fields or passed to functions with const parameters. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall --- arch/arm/mach-vexpress/spc.c |2 +- drivers/clk/clk-max77686.c

[PATCH 2/8] ARM: vexpress/spc: constify clk_ops structure

2018-10-27 Thread Julia Lawall
The clk_ops structure is only stored in the ops field of a clk_init_data structure. This field is const, so the clk_ops structure can be const as well. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall --- arch/arm/mach-vexpress/spc.c |2 +- 1 file changed, 1

[PATCH 1/8] clk: max77686: constify clk_ops structure

2018-10-27 Thread Julia Lawall
The clk_ops structure is only stored in the ops field of a clk_init_data structure. This field is const, so the clk_ops structure can be const as well. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall --- drivers/clk/clk-max77686.c |2 +- 1 file changed, 1

[PATCH 7/8] drm/imx: imx-tve: constify clk_ops structure

2018-10-27 Thread Julia Lawall
The clk_ops structure is only stored in the ops field of a clk_init_data structure. This field is const, so the clk_ops structure can be const as well. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/imx/imx-tve.c |2 +- 1 file changed, 1

[PATCH 4/8] clk: pistachio: constify clk_ops structures

2018-10-27 Thread Julia Lawall
These clk_ops structures are only stored in the ops field of a clk_init_data structure. This field is const, so the clk_ops structures can be const as well. Identified and transformed using Coccinelle. Signed-off-by: Julia Lawall --- drivers/clk/pistachio/clk-pll.c |8 1 file

Re: [Outreachy kernel] [RESEND PATCH 2/2] staging: vboxvideo: Use unsigned int instead bool

2018-10-26 Thread Julia Lawall
[Adding Joe Perches] On Fri, 26 Oct 2018, Sasha Levin wrote: > On Fri, Oct 26, 2018 at 04:04:45PM -0300, Shayenne da Luz Moura wrote: > > This change was suggested by checkpath.pl. Use unsigned int with bitfield > > allocate only one bit to the boolean variable. > > > > CHECK: Avoid using bool

Re: [PATCH] mm: convert totalram_pages, totalhigh_pages and managed_pages to atomic.

2018-10-23 Thread Julia Lawall
On Tue, 23 Oct 2018, Michal Hocko wrote: > [Trimmed CC list + Julia - there is indeed no need to CC everybody maintain a > file you are updating for the change like this] > > On Tue 23-10-18 10:16:51, Arun Sudhilal wrote: > > On Mon, Oct 22, 2018 at 11:41 PM Michal Hocko wrote: > > > > > > On

Re: [Outreachy kernel] [PATCH] staging: vboxvideo: Removed unnecessary parentheses

2018-10-22 Thread Julia Lawall
On Mon, 22 Oct 2018, Shayenne da Luz Moura wrote: > This patch fixes the checkpatch.pl check: > > vbox_main.c:119: CHECK: Unnecessary parentheses around 'rects[i].x2 < > crtc->x' > vbox_main.c:119: CHECK: Unnecessary parentheses around 'rects[i].y2 < > crtc->y' Please use the imperative, in

Re: [PATCH 2/2] tty: serial: add driver for the SiFive UART (fwd)

2018-10-19 Thread Julia Lawall
Hello, It looks like an unlock is needed before the return on line 562. julia -- Forwarded message -- Date: Fri, 19 Oct 2018 18:12:04 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: Re: [PATCH 2/2] tty: serial: add driver for the SiFive UART CC

Re: [PATCH 1/2] eeprom: eeprom_93xx46: use resource management (fwd)

2018-09-10 Thread Julia Lawall
Line 494 should be dropped. The whole fail label could be dropped as well. julia -- Forwarded message -- Date: Mon, 10 Sep 2018 20:27:41 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: Re: [PATCH 1/2] eeprom: eeprom_93xx46: use resource management

drivers/gpu/drm/amd/display/dc/core/dc_resource.c:352:1-14: code aligned with following code on line 354 (fwd)

2018-09-06 Thread Julia Lawall
It looks like line 352 needs to be indented more. julia -- Forwarded message -- Date: Fri, 7 Sep 2018 05:47:25 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: drivers/gpu/drm/amd/display/dc/core/dc_resource.c:352:1-14: code aligned with following

net/sctp/socket.c:2681:6-11: ERROR: invalid reference to the index variable of the iterator on line 2661 (fwd)

2018-08-29 Thread Julia Lawall
22:02:39 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: net/sctp/socket.c:2681:6-11: ERROR: invalid reference to the index variable of the iterator on line 2661 CC: kbuild-...@01.org CC: linux-kernel@vger.kernel.org TO: Xin Long tree: https://git.kernel.org/pub

Re: [PATCH] net: sched: Fix memory exposure from short TCA_U32_SEL

2018-08-26 Thread Julia Lawall
On Mon, 27 Aug 2018, Al Viro wrote: > On Sun, Aug 26, 2018 at 11:35:17PM -0400, Julia Lawall wrote: > > > * x = \(kmalloc\|kzalloc\|devm_kmalloc\|devm_kzalloc\)(...) > > I can name several you've missed right off the top of my head - > vmalloc, kvmalloc, kmem_cache_all

Re: [PATCH] net: sched: Fix memory exposure from short TCA_U32_SEL

2018-08-26 Thread Julia Lawall
On Mon, 27 Aug 2018, Al Viro wrote: > On Sun, Aug 26, 2018 at 10:00:46PM -0400, Julia Lawall wrote: > > > > > > On Sun, 26 Aug 2018, Al Viro wrote: > > > > > On Sun, Aug 26, 2018 at 03:26:54PM -0700, Joe Perches wrote: > > > > On Sun, 2018-08-26

Re: [PATCH] net: sched: Fix memory exposure from short TCA_U32_SEL

2018-08-26 Thread Julia Lawall
On Sun, 26 Aug 2018, Al Viro wrote: > On Sun, Aug 26, 2018 at 03:26:54PM -0700, Joe Perches wrote: > > On Sun, 2018-08-26 at 22:24 +0100, Al Viro wrote: > > > On Sun, Aug 26, 2018 at 11:57:57AM -0700, Joe Perches wrote: > > > > > > > > That, BTW, is why I hate the use of sizeof(*p) in kmalloc,

Re: [PATCH] net: sched: Fix memory exposure from short TCA_U32_SEL

2018-08-26 Thread Julia Lawall
On Sun, 26 Aug 2018, Joe Perches wrote: > On Sun, 2018-08-26 at 22:24 +0100, Al Viro wrote: > > On Sun, Aug 26, 2018 at 11:57:57AM -0700, Joe Perches wrote: > > > > > > That, BTW, is why I hate the use of sizeof(*p) in kmalloc, etc. > > > > arguments. typeof is even worse in that respect. > >

Re: [PATCH] Coccinelle: remove pci_alloc_consistent semantic to dectect in zalloc-simple.cocci

2018-08-18 Thread Julia Lawall
On Sat, 18 Aug 2018, zhong jiang wrote: > On 2018/8/18 20:52, Himanshu Jha wrote: > > On Sat, Aug 18, 2018 at 08:01:40PM +0800, zhong jiang wrote: > >> Because pci_alloc_consistent has been deprecated. We prefer to use > >> dam_alloc_coherent directly. Therefore, we should remove > >>

Re: [PATCH] Coccinelle: remove pci_alloc_consistent semantic to dectect in zalloc-simple.cocci

2018-08-18 Thread Julia Lawall
gestion. Acked-by: Julia Lawall > --- > scripts/coccinelle/api/alloc/zalloc-simple.cocci | 41 > +--- > 1 file changed, 1 insertion(+), 40 deletions(-) > > diff --git a/scripts/coccinelle/api/alloc/zalloc-simple.cocci > b/scripts/coccinelle/api/alloc/zalloc-s

Re: [PATCH] fix ifnullfree.cocci warnings

2018-08-14 Thread Julia Lawall
On Tue, 14 Aug 2018, Mark Brown wrote: > On Tue, Aug 14, 2018 at 12:57:57PM +0200, Julia Lawall wrote: > > From: kbuild test robot > > > > NULL check before some freeing functions is not needed. > > > > Based on checkpatch warning > > &quo

[PATCH] fix ifnullfree.cocci warnings

2018-08-14 Thread Julia Lawall
From: kbuild test robot NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci Fixes: 00

Re: [PATCH v2] coccicheck: return proper error code on fail

2018-08-10 Thread Julia Lawall
ot;coccicheck failed"' > which is almost always equals to zero, thus failing the original intention > of alerting about a problem. This patch fixes the code. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Denis Efremov OK, I g

Re: [PATCH] coccicheck: return proper error code on check fail

2018-08-10 Thread Julia Lawall
On Fri, 10 Aug 2018, Denis Efremov wrote: > > Do you mean that there is an error in the behavior of coccicheck or that > > coccicheck finds an error in the source code? > > An error in the source code. > > Here is an example of how the patch changes the behavior of 'make > coccicheck' (my

Re: [PATCH] coccicheck: return proper error code on check fail

2018-08-10 Thread Julia Lawall
On Fri, 10 Aug 2018, efre...@linux.com wrote: > If coccicheck finds errors, What do you mean by finds errors? Do you mean that there is an error in the behavior of coccicheck or that coccicheck finds an error in the source code? To put it another way, can you give an example of the kind of

Re: [PATCH] rtmutex: Drop pointless static qualifier in rt_mutex_adjust_prio_chain()

2018-08-07 Thread Julia Lawall
On Tue, 7 Aug 2018, Mao Wenan wrote: > There is no need to have the 'T *v' variable static > since new value always be assigned before use it. The code is: static int prev_max; /* * Print this only once. If the admin changes the limit,

Re: [PATCH] Staging: rtlwifi: base: Fixed line ending with parentheses

2018-08-04 Thread Julia Lawall
On Sat, 4 Aug 2018, Sohil Ladhani wrote: > This patch fixes the "Lines should not end with a '('" problem reported by > checkpatch There is still no v2 in the subject line, or explanation of what has changed under the --- (I assume this is still the same place and the same code; I didn't keep

Re: [PATCH] Staging: rtlwifi: base: fixed a brace coding style issue

2018-08-04 Thread Julia Lawall
On Sat, 4 Aug 2018, Sohil Ladhani wrote: > Fixed a coding style issue This seems to fix the header problem. But it is a patch on the same code at the same place doing the same thing as the previous message. So you should say [PATCH v2] in the subject line, and then below the --- explain

Re: [RFC PATCH] checkpatch: check for function calls with struct or union on stack

2018-07-28 Thread Julia Lawall
On Sat, 28 Jul 2018, Joe Perches wrote: > On Sat, 2018-07-28 at 08:25 +0200, Julia Lawall wrote: > > On Fri, 27 Jul 2018, Joe Perches wrote: > [] > > > It might make sense for this sort of check to be > > > added to coccinelle or maybe as a compiler warning > &

Re: [RFC PATCH] checkpatch: check for function calls with struct or union on stack

2018-07-28 Thread Julia Lawall
On Fri, 27 Jul 2018, Joe Perches wrote: > On Fri, 2018-07-27 at 10:21 +, David Laight wrote: > > From: Joe Perches Sent: 27 July 2018 11:09 > > > On Fri, 2018-07-27 at 10:04 +, David Laight wrote: > > > > From: Andrew Morton Sent: 26 July 2018 20:28 > > > > > On Thu, 26 Jul 2018

[PATCH] NTB: fix debugfs_simple_attr.cocci warnings

2018-07-21 Thread Julia Lawall
by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Fixes: c75153197d20 ("NTB: Introduce NTB MSI Test Client") Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- I don't know much about this issue, beyondwhat is explained by the semantic patch. Please check if the c

Re: [PATCH] checkpatch: Add warnings for use of mdelay()

2018-07-06 Thread Julia Lawall
On Thu, 5 Jul 2018, Dan Carpenter wrote: > Neither Smatch nor Coccinelle do a good job tracking when you're in > atomic context. I've wanted to add this to Smatch but even then it > would be to warn that "We're holding a spinlock so we can't sleep". > It's trickier to say for sure when you're

RE: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version()

2018-07-04 Thread Julia Lawall
On Wed, 4 Jul 2018, Winkler, Tomas wrote: > > > On Wed, Jul 04, 2018 at 01:57:44PM +, Winkler, Tomas wrote: > > > > > > > > On Wed, Jul 04, 2018 at 01:59:14PM +0200, Julia Lawall wrote: > > > > > > > > > > > > &g

Re: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version()

2018-07-04 Thread Julia Lawall
On Wed, 4 Jul 2018, Dan Carpenter wrote: > We accidentally removed the check for negative returns without > considering the issue of type promotion. The "if_version_length" > variable is type size_t so if __mei_cl_recv() returns a negative then > "bytes_recv" is type promoted to a high

Re: [PATCH] MIPS: Remove no-op cast in show_regs()

2018-07-02 Thread Julia Lawall
On Mon, 2 Jul 2018, Ralf Baechle wrote: > On Fri, Jun 22, 2018 at 11:07:03AM -0700, Paul Burton wrote: > > > In show_regs() we have a regs argument of type struct pt_regs *, and we > > explicitly cast it to that same type as part of calling __show_regs(). > > > > Casting regs to the same type

[PATCH 0/3] cast sizeof to int for comparison

2018-07-01 Thread Julia Lawall
Comparing an int to a size, which is unsigned, causes the int to become unsigned, giving the wrong result. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @safe disable not_int2@ int x; position p; binary operator op = {<,<=}; expression e; @@ ( x < 0

[PATCH 1/3] Input: elan_i2c_smbus - cast sizeof to int for comparison

2018-07-01 Thread Julia Lawall
: (http://coccinelle.lip6.fr/) // @@ int x; expression e,e1; identifier f; @@ *x = f(...); ... when != x = e1 when != if (x < 0 || ...) { ... return ...; } *x < sizeof(e) // Signed-off-by: Julia Lawall --- drivers/input/mouse/elan_i2c_smbus.c |2 +- 1 file changed, 1 insertion

Re: [PATCH v3 12/16] treewide: Use array_size() for kmalloc()-family

2018-07-01 Thread Julia Lawall
> > // 2-factor product with sizeof(variable) > > @@ > > identifier alloc =~ "kmalloc|kzalloc|kvmalloc|kvzalloc"; > > * This regular expression could be optimised to the specification > “kv?[mz]alloc”. > Extensions will be useful for further function names. > > * The repetition of such a

Re: [PATCH] platform/x86: dell-smbios: make a function and a pointer static

2018-06-23 Thread Julia Lawall
On Fri, 22 Jun 2018, Darren Hart wrote: > On Thu, Jun 21, 2018 at 07:15:24PM +0100, Colin King wrote: > > From: Colin Ian King > > > > The function dell_smbios_smm_call and pointer platform_device are > > local to the source and do not need to be in global scope, so make > > them static. > >

Re: [PATCH v3 2/2] IB/mad: Use ID allocator routines to allocate agent number (fwd)

2018-06-17 Thread Julia Lawall
On Sun, 17 Jun 2018, jackm wrote: > On Sat, 16 Jun 2018 18:04:41 +0200 (CEST) > Julia Lawall wrote: > > > ib_mad_client_id is declared as u32, so it will not be < 0 (line 382). > > > > julia > > > Julia, your are correct. > However, I was under the im

Re: [PATCH v3 2/2] IB/mad: Use ID allocator routines to allocate agent number (fwd)

2018-06-16 Thread Julia Lawall
ib_mad_client_id is declared as u32, so it will not be < 0 (line 382). julia -- Forwarded message -- Date: Fri, 8 Jun 2018 08:49:57 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: Re: [PATCH v3 2/2] IB/mad: Use ID allocator routines to allocate ag

Re: [PATCH] staging: rtl8192u: fix line over 80 characters

2018-06-16 Thread Julia Lawall
On Sat, 16 Jun 2018, Hyunil Kim wrote: > *fix checkpatch.pl warnings: > WARNING: line over 80 characters Describe what you do and why, rather than just saying "Fix". Often something can be fixed in multiple ways. julia > > Signed-off-by: Hyunil Kim > --- >

[PATCH] RFC: bus: fix of_table.cocci warnings

2018-06-15 Thread Julia Lawall
From: kbuild test robot Make sure (of/i2c/platform)_device_id tables are NULL terminated Generated by: scripts/coccinelle/misc/of_table.cocci Fixes: 7d8c3a62781b ("RFC: bus: 96boards Low-Speed Connector") Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- t

[PATCH] RFC: bus: fix semicolon.cocci warnings

2018-06-15 Thread Julia Lawall
From: kbuild test robot Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 7d8c3a62781b ("RFC: bus: 96boards Low-Speed Connector") Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: https://git.kernel.org/pub/scm/linux/

[PATCH] mfd: kempld-core: constify variables that point to const structure

2018-06-12 Thread Julia Lawall
is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier i,j; @@ const struct i j = { ... }; @ok@ identifier r.i; position p; @@ const struct i@p * @@ identifier r.i; position p != ok.p; @@ * struct i@p * // Signed-off-by: Julia Lawall --- drivers/mfd/kempld-core.c | 15 --- 1

[PATCH] parport: sunbpp: fix error return code

2018-06-10 Thread Julia Lawall
Return an error code on failure. Change leading spaces to tab on the first if. Problem found using Coccinelle. Signed-off-by: Julia Lawall --- drivers/parport/parport_sunbpp.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/parport/parport_sunbpp.c b

[PATCH] clocksource/drivers/stm32: fix error return code

2018-06-10 Thread Julia Lawall
Return an error code on failure. Problem found using Coccinelle. Signed-off-by: Julia Lawall --- drivers/clocksource/timer-stm32.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/timer-stm32.c b/drivers/clocksource/timer-stm32.c index e5cdc3a

[PATCH] staging: rtl8723bs: drop test

2018-06-06 Thread Julia Lawall
: (http://coccinelle.lip6.fr/) // @@ expression e,e1; @@ * e ? e1 : e1 // Signed-off-by: Julia Lawall --- drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c b/drivers

Re: unnecessary test?

2018-06-06 Thread Julia Lawall
On Wed, 6 Jun 2018, Takashi Iwai wrote: > On Wed, 06 Jun 2018 14:39:05 +0200, > Julia Lawall wrote: > > > > In the file sound/pci/ctxfi/cthw20k1.c, the function daio_mgr_dao_init > > contains: > > > > set_field(>spoctl, SPOCTL_OS << (idx*8), >

Re: unnecessary test?

2018-06-06 Thread Julia Lawall
On Wed, 6 Jun 2018, Julia Lawall wrote: > In the file sound/pci/ctxfi/cthw20k1.c, the function daio_mgr_dao_init > contains: > > set_field(>spoctl, SPOCTL_OS << (idx*8), > ((conf >> 3) & 0x1) ? 2 : 2); /* Raw */ > > Could the second argument j

unnecessary test?

2018-06-06 Thread Julia Lawall
In the file sound/pci/ctxfi/cthw20k1.c, the function daio_mgr_dao_init contains: set_field(>spoctl, SPOCTL_OS << (idx*8), ((conf >> 3) & 0x1) ? 2 : 2); /* Raw */ Could the second argument just be 2? It's true that the preceeding call contains conf >> ..., but in a more useful way, so

Re: [PATCH] fsl/qe: ucc: copy and paste bug in ucc_get_tdm_sync_shift()

2018-06-04 Thread Julia Lawall
On Mon, 4 Jun 2018, Dan Carpenter wrote: > There is a copy and paste bug so we accidentally use the RX_ shift when > we're in TX_ mode. > > Fixes: bb8b2062aff3 ("fsl/qe: setup clock source for TDM mode") > Signed-off-by: Dan Carpenter > --- > Static analysis work. Not tested. This affects

[PATCH] udmabuf: fix odd_ptr_err.cocci warnings

2018-05-25 Thread Julia Lawall
From: kbuild test robot drivers/dma-buf/udmabuf.c:167:6-12: inconsistent IS_ERR and PTR_ERR on line 168. PTR_ERR should access the value just tested by IS_ERR Semantic patch information: There can be false positives in the patch case, where it is the call to IS_ERR

[PATCH 2/5] phy: add missing of_node_put

2018-05-23 Thread Julia Lawall
for_each_child_of_node; @@ for_each_child_of_node(root, child) { ... when != of_node_put(child) when != e = child + of_node_put(child); ? break; ... } ... when != child // Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- drivers/phy/hisilicon/phy-hisi-inno-usb2.c

[PATCH 1/5] pinctrl: at91-pio4: add missing of_node_put

2018-05-23 Thread Julia Lawall
; @@ for_each_child_of_node(root, child) { ... when != of_node_put(child) when != e = child + of_node_put(child); ? break; ... } ... when != child // Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- drivers/pinctrl/pinctrl-at91-pio4.c |4 +++- 1 file changed, 3 inse

[PATCH 5/5] drm/rockchip: lvds: add missing of_node_put

2018-05-23 Thread Julia Lawall
; @@ for_each_child_of_node(root, child) { ... when != of_node_put(child) when != e = child + of_node_put(child); ? break; ... } ... when != child // Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- drivers/gpu/drm/rockchip/rockchip_lvds.c |4 +++- 1 file chan

[PATCH 3/5] soc: ti: knav_dma: add missing of_node_put

2018-05-23 Thread Julia Lawall
; @@ for_each_child_of_node(root, child) { ... when != of_node_put(child) when != e = child + of_node_put(child); ? break; ... } ... when != child // Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- drivers/soc/ti/knav_dma.c |1 + 1 file changed, 1 insertion(+)

[PATCH 0/5] add missing of_node_put

2018-05-23 Thread Julia Lawall
The device node iterators perform an of_node_get on each iteration, so a jump out of the loop requires an of_node_put. --- drivers/gpu/drm/rockchip/rockchip_lvds.c |4 +++- drivers/pci/hotplug/pnv_php.c |8 ++-- drivers/phy/hisilicon/phy-hisi-inno-usb2.c |9

[PATCH 4/5] pci/hotplug/pnv-php: add missing of_node_put

2018-05-23 Thread Julia Lawall
; @@ for_each_child_of_node(root, child) { ... when != of_node_put(child) when != e = child + of_node_put(child); ? break; ... } ... when != child // Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- drivers/pci/hotplug/pnv_php.c |8 ++-- 1 file changed, 6 inse

[PATCH 1/3] i2c: mux: pca954x: merge calls to of_match_device and of_device_get_match_data

2018-05-21 Thread Julia Lawall
// Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- drivers/i2c/muxes/i2c-mux-pca954x.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index 09bafd3..ced840f 100644 --- a/drivers/i2c

[PATCH 0/3] merge calls to of_match_device and of_device_get_match_data

2018-05-21 Thread Julia Lawall
of_device_get_match_data calls of_match_device and fails if the latter fails, so both calls aren't needed. --- drivers/i2c/muxes/i2c-mux-pca954x.c |7 ++- drivers/iio/adc/max1363.c |8 ++-- drivers/iio/potentiometer/max5481.c |7 ++-

[PATCH 3/3] iio: potentiometer: merge calls to of_match_device and of_device_get_match_data

2018-05-21 Thread Julia Lawall
// Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- drivers/iio/potentiometer/max5481.c |7 ++- drivers/iio/potentiometer/mcp4018.c |7 ++- drivers/iio/potentiometer/mcp4531.c |7 ++- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/drive

[PATCH] coccinelle: deref_null: improve performance

2018-05-21 Thread Julia Lawall
tested expression. Collecting them just once is sufficient and more efficient. Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- scripts/coccinelle/null/deref_null.cocci | 40 +++ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/s

[PATCH] coccinelle: mini_lock: improve performance

2018-05-21 Thread Julia Lawall
Replace <+... ...+> by ... when any. <+... ...+> is slow, and in some obscure cases involving backward jumps it doesn't force the unlock to actually come after the end of the if. Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- scripts/coccinelle/locks/mini_lock.cocc

drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c:1001:52-53: asic_setup: first occurrence line 1004, second occurrence line 1031 (fwd)

2018-05-18 Thread Julia Lawall
The structure has two initializations of the field asic_setup. julia -- Forwarded message -- Date: Sat, 19 May 2018 02:35:04 +0800 From: kbuild test robot <l...@intel.com> To: kbu...@01.org Cc: Julia Lawall <julia.law...@lip6.fr> Subject: drivers/gpu/drm/amd/pow

[PATCH] drm/nouveau/kms/nv50-: fix drm-get-put.cocci warnings

2018-05-18 Thread Julia Lawall
0/") Signed-off-by: kbuild test robot <fengguang...@intel.com> Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- tree: https://github.com/skeggsb/linux linux-4.18 head: 6c46d01f25bcf74608d09645c27c35c3f3940ebe commit: 30ed49b55b6e44e004c3095671e74fea93ee84cb [105/165] drm/

Re: [PATCH 2/3] media: staging: atomisp: Fix an error handling path in 'lm3554_probe()'

2018-05-11 Thread Julia Lawall
On Fri, 11 May 2018, Christophe JAILLET wrote: > The use of 'fail1' and 'fail2' is not correct. Reorder these calls to > branch at the right place of the error handling path. Maybe it would be good to improve the names at the same time? julia > > Signed-off-by: Christophe JAILLET

[PATCH] leds: lm3601x: fix semicolon.cocci warnings

2018-05-09 Thread Julia Lawall
...@intel.com> Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- url: https://github.com/0day-ci/linux/commits/Dan-Murphy/dt-bindings-lm3601x-Introduce-the-lm3601x-driver/20180509-033939 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next :: branch date:

[PATCH v2] [media] pvrusb2: delete unneeded include

2018-05-06 Thread Julia Lawall
pvrusb2-video-v4l.h only declares pvr2_saa7115_subdev_update and includes pvrusb2-hdw-internal.h. pvrusb2-cx2584x-v4l.c does not use pvr2_saa7115_subdev_update and it explicitly includes pvrusb2-hdw-internal.h. Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- v2: Make the subjec

[PATCH] [media] media: delete unneeded include

2018-05-06 Thread Julia Lawall
pvrusb2-video-v4l.h only declares pvr2_saa7115_subdev_update and includes pvrusb2-hdw-internal.h. pvrusb2-cx2584x-v4l.c does not use pvr2_saa7115_subdev_update and it explicitly includes pvrusb2-hdw-internal.h. Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- drivers/media/usb/p

[PATCH] mwifiex: delete unneeded include

2018-05-06 Thread Julia Lawall
Nothing that is defined in 11ac.h is referenced in cmdevt.c. Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- drivers/net/wireless/marvell/mwifiex/cmdevt.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/m

Re: [PATCH 2/2] mm: Add kvmalloc_ab_c and kvzalloc_struct

2018-05-01 Thread Julia Lawall
On Tue, 1 May 2018, Kees Cook wrote: > On Mon, Apr 30, 2018 at 2:29 PM, Rasmus Villemoes > wrote: > > On 2018-04-30 22:16, Matthew Wilcox wrote: > >> On Mon, Apr 30, 2018 at 12:02:14PM -0700, Kees Cook wrote: > >>> > >>> Getting the constant ordering right could be

Re: bug-introducing patches (or: -rc cycles suck)

2018-04-30 Thread Julia Lawall
On Mon, 30 Apr 2018, Sasha Levin wrote: > Working on AUTOSEL, it became even more obvious to me how difficult it is for > a patch to get a proper review. Maintainers found it difficult to keep up > with the upstream work for their subsystem, and reviewing additional -stable > patches put

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-29 Thread Julia Lawall
Here are some improved results, also taking into account the pci functions. julia too small: drivers/gpu/drm/i915/i915_drv.c:1138: 30 too small: drivers/hwtracing/coresight/coresight-tmc.c:335: 0 too small: drivers/media/pci/sta2x11/sta2x11_vip.c:859: 29 too small:

  1   2   3   4   5   6   7   8   9   10   >