[RESEND PATCH 1/1] Coccinelle: array_size: report even if include is missing

2017-12-29 Thread Jérémy Lefaure
Rule r does not depend on rule i (which is the include of linux/kernel.h) so the output should not depend on i in org and report mode. Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> Acked-by: Julia Lawall <julia.law...@lip6.fr> --- scripts/coccinelle/misc/array_si

[RESEND PATCH 1/1] Coccinelle: array_size: report even if include is missing

2017-12-29 Thread Jérémy Lefaure
Rule r does not depend on rule i (which is the include of linux/kernel.h) so the output should not depend on i in org and report mode. Signed-off-by: Jérémy Lefaure Acked-by: Julia Lawall --- scripts/coccinelle/misc/array_size.cocci | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Re: [PATCH 1/1] Coccinelle: array_size: report even if include is missing

2017-12-29 Thread Jérémy Lefaure
Hi, On Thu, 14 Sep 2017 13:21:13 +0200 (CEST) Julia Lawall <julia.law...@lip6.fr> wrote: > On Wed, 13 Sep 2017, Jérémy Lefaure wrote: > > > Rule r does not depend on rule i (which is the include of > > linux/kernel.h) so the output should not depend on i in

Re: [PATCH 1/1] Coccinelle: array_size: report even if include is missing

2017-12-29 Thread Jérémy Lefaure
Hi, On Thu, 14 Sep 2017 13:21:13 +0200 (CEST) Julia Lawall wrote: > On Wed, 13 Sep 2017, Jérémy Lefaure wrote: > > > Rule r does not depend on rule i (which is the include of > > linux/kernel.h) so the output should not depend on i in > > org and report mode. >

Re: [PATCH AUTOSEL for 3.18 16/16] EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro

2017-11-29 Thread Jérémy Lefaure
On Wed, 29 Nov 2017 17:22:22 + alexander.le...@verizon.com wrote: > From: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> > > [ Upstream commit e61555c29c28a4a3b6ba6207f4a0883ee236004d ] > > The MTR_DRAM_WIDTH macro returns the data width. It is sometimes used > as

Re: [PATCH AUTOSEL for 3.18 16/16] EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro

2017-11-29 Thread Jérémy Lefaure
On Wed, 29 Nov 2017 17:22:22 + alexander.le...@verizon.com wrote: > From: Jérémy Lefaure > > [ Upstream commit e61555c29c28a4a3b6ba6207f4a0883ee236004d ] > > The MTR_DRAM_WIDTH macro returns the data width. It is sometimes used > as if it returned a boolean true if t

[tip:x86/cleanups] x86: Use ARRAY_SIZE

2017-10-19 Thread tip-bot for Jérémy Lefaure
Commit-ID: 0cfe5b5fc0277463fa795dea312a3a2fd5e8bac2 Gitweb: https://git.kernel.org/tip/0cfe5b5fc0277463fa795dea312a3a2fd5e8bac2 Author: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> AuthorDate: Sun, 1 Oct 2017 15:30:50 -0400 Committer: Thomas Gleixner <t...@linutronix.de> Com

[tip:x86/cleanups] x86: Use ARRAY_SIZE

2017-10-19 Thread tip-bot for Jérémy Lefaure
Commit-ID: 0cfe5b5fc0277463fa795dea312a3a2fd5e8bac2 Gitweb: https://git.kernel.org/tip/0cfe5b5fc0277463fa795dea312a3a2fd5e8bac2 Author: Jérémy Lefaure AuthorDate: Sun, 1 Oct 2017 15:30:50 -0400 Committer: Thomas Gleixner CommitDate: Thu, 19 Oct 2017 16:15:47 +0200 x86: Use ARRAY_SIZE

[PATCH] drm/via: use ARRAY_SIZE

2017-10-15 Thread Jérémy Lefaure
Reding <tred...@nvidia.com> Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- This patch was part of a bigger patch [1] reviewed by Thierry Reding before it was split in several patches. [1]: https://patchwork.kernel.org/patch/9979843/ drivers/gpu/drm/via/via_ver

[PATCH] drm/via: use ARRAY_SIZE

2017-10-15 Thread Jérémy Lefaure
Reding Signed-off-by: Jérémy Lefaure --- This patch was part of a bigger patch [1] reviewed by Thierry Reding before it was split in several patches. [1]: https://patchwork.kernel.org/patch/9979843/ drivers/gpu/drm/via/via_verifier.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions

[PATCH] drm/nouveau/bios/init: use ARRAY_SIZE

2017-10-15 Thread Jérémy Lefaure
/sizeof(T)) ) Reviewed-by: Thierry Reding <tred...@nvidia.com> Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- This patch was part of a bigger patch [1] reviewed by Thierry Reding before it was split in several patches. [1]: https://patchwork.kernel.org/patch/997984

[PATCH] drm/nouveau/bios/init: use ARRAY_SIZE

2017-10-15 Thread Jérémy Lefaure
/sizeof(T)) ) Reviewed-by: Thierry Reding Signed-off-by: Jérémy Lefaure --- This patch was part of a bigger patch [1] reviewed by Thierry Reding before it was split in several patches. [1]: https://patchwork.kernel.org/patch/9979843/ drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 7

[PATCH] drm/i915/gvt: use ARRAY_SIZE

2017-10-15 Thread Jérémy Lefaure
)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- This patch was part of a bigger patch [1]. [1]: https://patchwork.kernel.org/patch/9979843/ drivers/gpu/drm/i915/gvt/vgpu.c | 9 - 1 file chan

[PATCH] drm/i915/gvt: use ARRAY_SIZE

2017-10-15 Thread Jérémy Lefaure
)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure --- This patch was part of a bigger patch [1]. [1]: https://patchwork.kernel.org/patch/9979843/ drivers/gpu/drm/i915/gvt/vgpu.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff

[PATCH] drm/gma500: use ARRAY_SIZE

2017-10-15 Thread Jérémy Lefaure
/sizeof(T)) ) Reviewed-by: Thierry Reding <tred...@nvidia.com> Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- This patch was part of a bigger patch [1] reviewed by Thierry Reding before it was split in several patches. [1]: https://patchwork.kernel.org/patch/997984

[PATCH] drm/gma500: use ARRAY_SIZE

2017-10-15 Thread Jérémy Lefaure
/sizeof(T)) ) Reviewed-by: Thierry Reding Signed-off-by: Jérémy Lefaure --- This patch was part of a bigger patch [1] reviewed by Thierry Reding before it was split in several patches. [1]: https://patchwork.kernel.org/patch/9979843/ drivers/gpu/drm/gma500/psb_intel_sdvo.c | 9 - 1

[PATCH] drm/amdgpu: use ARRAY_SIZE

2017-10-15 Thread Jérémy Lefaure
Reding <tred...@nvidia.com> Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- This patch was part of a bigger patch [1] reviewed by Thierry Reding before it was split in several patches. [1]: https://patchwork.kernel.org/patch/9979843/ drivers/gpu/drm/amd/amdgpu/gf

[PATCH] drm/amdgpu: use ARRAY_SIZE

2017-10-15 Thread Jérémy Lefaure
Reding Signed-off-by: Jérémy Lefaure --- This patch was part of a bigger patch [1] reviewed by Thierry Reding before it was split in several patches. [1]: https://patchwork.kernel.org/patch/9979843/ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 9 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9

[PATCH v2] tracing/filter: use ARRAY_SIZE

2017-10-15 Thread Jérémy Lefaure
)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- Changes since v1: - keep DATA_CNT as suggested by Steven Rostedt kernel/trace/trace_events_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/trace/trace_events_filter.c b/kernel

[PATCH v2] tracing/filter: use ARRAY_SIZE

2017-10-15 Thread Jérémy Lefaure
)) ) Signed-off-by: Jérémy Lefaure --- Changes since v1: - keep DATA_CNT as suggested by Steven Rostedt kernel/trace/trace_events_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index 61e7f0678d33

[PATCH v2] ALSA: hda/ca0132 - use ARRAY_SIZE

2017-10-12 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH v2] ALSA: hda/ca0132 - use ARRAY_SIZE

2017-10-12 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

Re: [PATCH 13/18] tpm: use ARRAY_SIZE

2017-10-10 Thread Jérémy Lefaure
On Wed, 4 Oct 2017 15:14:49 +0300 Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> wrote: > On Sun, Oct 01, 2017 at 03:30:51PM -0400, Jérémy Lefaure wrote: > > Using the ARRAY_SIZE macro improves the readability of the code. > > > > Found with Coccinelle with t

Re: [PATCH 13/18] tpm: use ARRAY_SIZE

2017-10-10 Thread Jérémy Lefaure
On Wed, 4 Oct 2017 15:14:49 +0300 Jarkko Sakkinen wrote: > On Sun, Oct 01, 2017 at 03:30:51PM -0400, Jérémy Lefaure wrote: > > Using the ARRAY_SIZE macro improves the readability of the code. > > > > Found with Coccinelle with the following semantic patch: > > @

Re: [PATCH 15/18] acpi: use ARRAY_SIZE

2017-10-02 Thread Jérémy Lefaure
On Mon, 02 Oct 2017 14:27:52 +0200 "Rafael J. Wysocki" wrote: > ACPICA is soewhat special code, though and I'm not taking or ACKing patches > for it directly as a rule. > > For one, I'm not sure if ACPICA can use ARRAY_SIZE at all. Why is it special code that can't use

Re: [PATCH 15/18] acpi: use ARRAY_SIZE

2017-10-02 Thread Jérémy Lefaure
On Mon, 02 Oct 2017 14:27:52 +0200 "Rafael J. Wysocki" wrote: > ACPICA is soewhat special code, though and I'm not taking or ACKing patches > for it directly as a rule. > > For one, I'm not sure if ACPICA can use ARRAY_SIZE at all. Why is it special code that can't use ARRAY_SIZE ? Is it

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 15:22:24 -0400 bfie...@fieldses.org (J. Bruce Fields) wrote: > Mainly I'd just like to know which you're asking for. Do you want me to > apply this, or to ACK it so someone else can? If it's sent as a series > I tend to assume the latter. > > But in this case I'm assuming

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 15:22:24 -0400 bfie...@fieldses.org (J. Bruce Fields) wrote: > Mainly I'd just like to know which you're asking for. Do you want me to > apply this, or to ACK it so someone else can? If it's sent as a series > I tend to assume the latter. > > But in this case I'm assuming

Re: [PATCH 05/18] net: use ARRAY_SIZE

2017-10-02 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 16:07:36 +0300 Andy Shevchenko wrote: > > + {_lut_core0_rev0, ARRAY_SIZE(gainctrl_lut_core0_rev0), 26, > > 192, > > +32}, > > For all such cases I would rather put on one line disregard checkpatch > warning for better readability. I

Re: [PATCH 05/18] net: use ARRAY_SIZE

2017-10-02 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 16:07:36 +0300 Andy Shevchenko wrote: > > + {_lut_core0_rev0, ARRAY_SIZE(gainctrl_lut_core0_rev0), 26, > > 192, > > +32}, > > For all such cases I would rather put on one line disregard checkpatch > warning for better readability. I agree that it would be

Re: [PATCH 01/18] sound: use ARRAY_SIZE

2017-10-02 Thread Jérémy Lefaure
On Sun, 01 Oct 2017 21:16:19 -0700 Joe Perches wrote: > These sorts of changes are OK, but for many > uses, it's more readable to use ARRAY_SIZE(foo) > in each location rather than using a temporary. You're right, I missed that one. I will send a v2. Thank you for your

Re: [PATCH 01/18] sound: use ARRAY_SIZE

2017-10-02 Thread Jérémy Lefaure
On Sun, 01 Oct 2017 21:16:19 -0700 Joe Perches wrote: > These sorts of changes are OK, but for many > uses, it's more readable to use ARRAY_SIZE(foo) > in each location rather than using a temporary. You're right, I missed that one. I will send a v2. Thank you for your review, Jérémy

Re: [PATCH 05/18] net: use ARRAY_SIZE

2017-10-02 Thread Jérémy Lefaure
On Mon, 02 Oct 2017 16:46:29 +0300 Kalle Valo wrote: > We have a tree for wireless so usually it's better to submit wireless > changes on their own but here I assume Dave will apply this to his tree. > If not, please resubmit the wireless part in a separate patch. Ok, I

Re: [PATCH 05/18] net: use ARRAY_SIZE

2017-10-02 Thread Jérémy Lefaure
On Mon, 02 Oct 2017 16:46:29 +0300 Kalle Valo wrote: > We have a tree for wireless so usually it's better to submit wireless > changes on their own but here I assume Dave will apply this to his tree. > If not, please resubmit the wireless part in a separate patch. Ok, I note that. I'll wait

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-01 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 09:01:31 +1100 "Tobin C. Harding" wrote: > > In order to reduce the size of the To: and Cc: lines, each patch of the > > series is sent only to the maintainers and lists concerned by the patch. > > This cover letter is sent to every list concerned by this

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-01 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 09:01:31 +1100 "Tobin C. Harding" wrote: > > In order to reduce the size of the To: and Cc: lines, each patch of the > > series is sent only to the maintainers and lists concerned by the patch. > > This cover letter is sent to every list concerned by this series. > > Why

[PATCH 04/18] IB/mlx5: Use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 04/18] IB/mlx5: Use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 05/18] net: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
/sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- drivers/net/ethernet/emulex/benet/be_cmds.c| 4 +- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 3 +- drivers/net/ethernet/intel/

[PATCH 05/18] net: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
/sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure --- drivers/net/ethernet/emulex/benet/be_cmds.c| 4 +- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 3 +- drivers/net/ethernet/intel/i40evf/i40e_adminq.h| 3

[PATCH 06/18] drm: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 9 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

[PATCH 06/18] drm: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 9 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9 + drivers/gpu/drm

[PATCH 14/18] ipmi: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
/sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- drivers/char/ipmi/ipmi_poweroff.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/cha

[PATCH 10/18] orangefs: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 14/18] ipmi: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
/sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure --- drivers/char/ipmi/ipmi_poweroff.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c index

[PATCH 10/18] orangefs: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 08/18] ecryptfs: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 08/18] ecryptfs: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 13/18] tpm: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 15/18] acpi: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- drivers/acpi/acpica/rsdumpinfo.c | 66 drivers/acpi/acpica/tbfadt.c

[PATCH 13/18] tpm: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 15/18] acpi: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure --- drivers/acpi/acpica/rsdumpinfo.c | 66 drivers/acpi/acpica/tbfadt.c | 13 +++- 2 files changed, 37

[PATCH 12/18] x86: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
/sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- arch/x86/boot/video-vga.c| 6 +++--- arch/x86/entry/vdso/vdso2c.c | 3 ++- ar

[PATCH 12/18] x86: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
/sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure --- arch/x86/boot/video-vga.c| 6 +++--- arch/x86/entry/vdso/vdso2c.c | 3 ++- arch/x86/platform/intel-mid/device_libs

[PATCH 07/18] scsi: bfa: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 18/18] staging: rtlwifi: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- drivers/staging/rtlwifi/phydm/phydm_debug.c| 4 ++-- drivers/staging/rtlwifi/phydm/rtl8822b/halhwimg8822b_bb.c | 10 -- drivers/s

[PATCH 17/18] staging: rtl8723bs: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
/sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 5 +- drivers/staging/rtl8723bs/core/rtw_rf.c | 7 +-- drivers/staging/rtl8723

[PATCH 11/18] dm space map metadata: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 07/18] scsi: bfa: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 18/18] staging: rtlwifi: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure --- drivers/staging/rtlwifi/phydm/phydm_debug.c| 4 ++-- drivers/staging/rtlwifi/phydm/rtl8822b/halhwimg8822b_bb.c | 10 -- drivers/staging/rtlwifi/phydm/rtl8822b

[PATCH 11/18] dm space map metadata: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 17/18] staging: rtl8723bs: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
/sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 5 +- drivers/staging/rtl8723bs/core/rtw_rf.c | 7 +-- drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 9 ++- drivers

[PATCH 03/18] media: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
/sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- drivers/media/common/saa7146/saa7146_video.c | 9 - drivers/media/dvb-frontends/cxd2841er.c | 7 +++ drivers/media/pci/s

[PATCH 09/18] nfsd: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 09/18] nfsd: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 03/18] media: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
/sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure --- drivers/media/common/saa7146/saa7146_video.c | 9 - drivers/media/dvb-frontends/cxd2841er.c | 7 +++ drivers/media/pci/saa7146/hexium_gemini.c| 3 ++- drivers/media

[PATCH 16/18] media: staging: atomisp: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- .../pci/atomisp2/css2400/camera/pipe/src/pipe_binarydesc.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging

[PATCH 16/18] media: staging: atomisp: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure --- .../pci/atomisp2/css2400/camera/pipe/src/pipe_binarydesc.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400

[PATCH 00/18] use ARRAY_SIZE macro

2017-10-01 Thread Jérémy Lefaure
Hi everyone, Using ARRAY_SIZE improves the code readability. I used coccinelle (I made a change to the array_size.cocci file [1]) to find several places where ARRAY_SIZE could be used instead of other macros or sizeof division. I tried to divide the changes into a patch per subsystem (excepted

[PATCH 00/18] use ARRAY_SIZE macro

2017-10-01 Thread Jérémy Lefaure
Hi everyone, Using ARRAY_SIZE improves the code readability. I used coccinelle (I made a change to the array_size.cocci file [1]) to find several places where ARRAY_SIZE could be used instead of other macros or sizeof division. I tried to divide the changes into a patch per subsystem (excepted

[PATCH 02/18] tracing/filter: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- kernel/trace/trace_events_filter.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index 61e7f0678d33..02d0f378dc5c 100644 --- a/

[PATCH 02/18] tracing/filter: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
)) ) Signed-off-by: Jérémy Lefaure --- kernel/trace/trace_events_filter.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index 61e7f0678d33..02d0f378dc5c 100644 --- a/kernel/trace/trace_events_filter.c

[PATCH 01/18] sound: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 01/18] sound: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy

[PATCH 1/1] Coccinelle: array_size: report even if include is missing

2017-09-13 Thread Jérémy Lefaure
Rule r does not depend on rule i (which is the include of linux/kernel.h) so the output should not depend on i in org and report mode. Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- I have tested this patch in report mode on the file drivers/staging/rtlwifi/phydm/rt

[PATCH 1/1] Coccinelle: array_size: report even if include is missing

2017-09-13 Thread Jérémy Lefaure
Rule r does not depend on rule i (which is the include of linux/kernel.h) so the output should not depend on i in org and report mode. Signed-off-by: Jérémy Lefaure --- I have tested this patch in report mode on the file drivers/staging/rtlwifi/phydm/rtl8822b/halhwimg8822b_rf.c which does

[RESEND PATCH] c6x: remove unused KTHREAD_SIZE definition

2017-09-04 Thread Jérémy Lefaure
KTHREAD_SIZE has never been used since it has been defined for c6x arch. Let's remove this useless definition. Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> Acked-by: Mark Salter <msal...@redhat.com> --- Hi, I sent this patch in June. It was acked by Mark Salter but

[RESEND PATCH] c6x: remove unused KTHREAD_SIZE definition

2017-09-04 Thread Jérémy Lefaure
KTHREAD_SIZE has never been used since it has been defined for c6x arch. Let's remove this useless definition. Signed-off-by: Jérémy Lefaure Acked-by: Mark Salter --- Hi, I sent this patch in June. It was acked by Mark Salter but I don't see it in the last kernel release so I resend it today

Re: [PATCH 21/22] fscache: fix fscache_objlist_show format processing

2017-09-04 Thread Jérémy Lefaure
> gcc points out a minor bug in the handling of unknown > cookie types, which could result in a string overflow > when the integer is copied into a 3-byte string: > > fs/fscache/object-list.c: In function 'fscache_objlist_show': > fs/fscache/object-list.c:265:19: error: 'sprintf' may write a >

Re: [PATCH 21/22] fscache: fix fscache_objlist_show format processing

2017-09-04 Thread Jérémy Lefaure
> gcc points out a minor bug in the handling of unknown > cookie types, which could result in a string overflow > when the integer is copied into a 3-byte string: > > fs/fscache/object-list.c: In function 'fscache_objlist_show': > fs/fscache/object-list.c:265:19: error: 'sprintf' may write a >

[PATCH v2] edac, i5000, i5400: fix definition of nrecmemb register

2017-06-28 Thread Jérémy Lefaure
]: https://www.intel.com/content/dam/doc/datasheet/5000p-5000v-5000z-chipset-memory-controller-hub-datasheet.pdf [2]: https://www.intel.se/content/dam/doc/datasheet/5400-chipset-memory-controller-hub-datasheet.pdf Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- I have

[PATCH v2] edac, i5000, i5400: fix definition of nrecmemb register

2017-06-28 Thread Jérémy Lefaure
]: https://www.intel.com/content/dam/doc/datasheet/5000p-5000v-5000z-chipset-memory-controller-hub-datasheet.pdf [2]: https://www.intel.se/content/dam/doc/datasheet/5400-chipset-memory-controller-hub-datasheet.pdf Signed-off-by: Jérémy Lefaure --- I have found this error thanks to the sparse tool

Re: [PATCH] edac, i5000, i5400: fix definition of nrecmemb register

2017-06-28 Thread Jérémy Lefaure
On Wed, 28 Jun 2017 18:08:51 +0200 Borislav Petkov <b...@alien8.de> wrote: > On Mon, Jun 12, 2017 at 01:47:58PM -0400, Jérémy Lefaure wrote: > > In i5000 and i5400 edac drivers, the register nrecmemb is defined as a > > 16 bits value which result in wrong shifts in the code:

Re: [PATCH] edac, i5000, i5400: fix definition of nrecmemb register

2017-06-28 Thread Jérémy Lefaure
On Wed, 28 Jun 2017 18:08:51 +0200 Borislav Petkov wrote: > On Mon, Jun 12, 2017 at 01:47:58PM -0400, Jérémy Lefaure wrote: > > In i5000 and i5400 edac drivers, the register nrecmemb is defined as a > > 16 bits value which result in wrong shifts in the code: > >

[PATCH] edac, i5000, i5400: fix definition of nrecmemb register

2017-06-12 Thread Jérémy Lefaure
]: https://www.intel.com/content/dam/doc/datasheet/5000p-5000v-5000z-chipset-memory-controller-hub-datasheet.pdf [2]: https://www.intel.se/content/dam/doc/datasheet/5400-chipset-memory-controller-hub-datasheet.pdf Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- I have

[PATCH] edac, i5000, i5400: fix definition of nrecmemb register

2017-06-12 Thread Jérémy Lefaure
]: https://www.intel.com/content/dam/doc/datasheet/5000p-5000v-5000z-chipset-memory-controller-hub-datasheet.pdf [2]: https://www.intel.se/content/dam/doc/datasheet/5400-chipset-memory-controller-hub-datasheet.pdf Signed-off-by: Jérémy Lefaure --- I have found this error thanks to the sparse

[PATCH 2/2] c6x: remove unused KTHREAD_SIZE definition

2017-06-12 Thread Jérémy Lefaure
KTHREAD_SIZE has never been used since it has been defined for c6x arch. Let's remove this useless definition. Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- arch/c6x/kernel/asm-offsets.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/c6x/kernel/asm-offsets.c b/ar

[PATCH 2/2] c6x: remove unused KTHREAD_SIZE definition

2017-06-12 Thread Jérémy Lefaure
KTHREAD_SIZE has never been used since it has been defined for c6x arch. Let's remove this useless definition. Signed-off-by: Jérémy Lefaure --- arch/c6x/kernel/asm-offsets.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/c6x/kernel/asm-offsets.c b/arch/c6x/kernel/asm-offsets.c index

[PATCH 1/2] arm: nommu: remove unused KTHREAD_SIZE definition

2017-06-12 Thread Jérémy Lefaure
I didn't find any use of this macro in the current kernel tree (with git grep). KTHREAD_SIZE is no longer used for a very very long time. So let's remove this definition. Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- arch/arm/include/asm/page-nommu.h | 6 -- 1 file c

[PATCH 1/2] arm: nommu: remove unused KTHREAD_SIZE definition

2017-06-12 Thread Jérémy Lefaure
I didn't find any use of this macro in the current kernel tree (with git grep). KTHREAD_SIZE is no longer used for a very very long time. So let's remove this definition. Signed-off-by: Jérémy Lefaure --- arch/arm/include/asm/page-nommu.h | 6 -- 1 file changed, 6 deletions(-) diff --git

Re: [PATCH] FS-Cache: print hexadecimal value for special cookies type

2017-05-27 Thread Jérémy Lefaure
On Thu, 27 Apr 2017 16:03:45 +0100 David Howells <dhowe...@redhat.com> wrote: > Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> wrote: > > > When building object-list.o, gcc 6 raises a warning on the sprintf call > > in fscache_objlist_show: > > > >

Re: [PATCH] FS-Cache: print hexadecimal value for special cookies type

2017-05-27 Thread Jérémy Lefaure
On Thu, 27 Apr 2017 16:03:45 +0100 David Howells wrote: > Jérémy Lefaure wrote: > > > When building object-list.o, gcc 6 raises a warning on the sprintf call > > in fscache_objlist_show: > > > > CC fs/fscache/object-list.o > > fs/fscache/object-list.

Re: [PATCH] FS-Cache: print hexadecimal value for special cookies type

2017-04-27 Thread Jérémy Lefaure
On Thu, 27 Apr 2017 16:03:45 +0100 David Howells <dhowe...@redhat.com> wrote: > Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> wrote: > > > When building object-list.o, gcc 6 raises a warning on the sprintf call > > in fscache_objlist_show: > > > >

Re: [PATCH] FS-Cache: print hexadecimal value for special cookies type

2017-04-27 Thread Jérémy Lefaure
On Thu, 27 Apr 2017 16:03:45 +0100 David Howells wrote: > Jérémy Lefaure wrote: > > > When building object-list.o, gcc 6 raises a warning on the sprintf call > > in fscache_objlist_show: > > > > CC fs/fscache/object-list.o > > fs/fscache/object-list.

[PATCH v2] FS-Cache: fix buffer size for decimal value of special cookie type

2017-04-26 Thread Jérémy Lefaure
tools. Also, this patch updates the documentation. Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> --- v2: _ keep decimal value _ fix _type buffer size _ fix documentation I didn't have the time to test this patch yet but everything should be fine. Documentation/filesystems/caching/fscache

[PATCH v2] FS-Cache: fix buffer size for decimal value of special cookie type

2017-04-26 Thread Jérémy Lefaure
tools. Also, this patch updates the documentation. Signed-off-by: Jérémy Lefaure --- v2: _ keep decimal value _ fix _type buffer size _ fix documentation I didn't have the time to test this patch yet but everything should be fine. Documentation/filesystems/caching/fscache.txt | 2 +- fs/fscache/object-

Re: [PATCH] FS-Cache: print hexadecimal value for special cookies type

2017-04-25 Thread Jérémy Lefaure
On Tue, 25 Apr 2017 00:47:41 +0300 Andy Shevchenko <andy.shevche...@gmail.com> wrote: > On Sat, Apr 22, 2017 at 2:09 AM, Jérémy Lefaure > <jeremy.lefa...@lse.epita.fr> wrote: > > On Fri, 21 Apr 2017 22:41:54 +0300 > > Andy Shevchenko <andy.shevche...@gmail.com>

Re: [PATCH] FS-Cache: print hexadecimal value for special cookies type

2017-04-25 Thread Jérémy Lefaure
On Tue, 25 Apr 2017 00:47:41 +0300 Andy Shevchenko wrote: > On Sat, Apr 22, 2017 at 2:09 AM, Jérémy Lefaure > wrote: > > On Fri, 21 Apr 2017 22:41:54 +0300 > > Andy Shevchenko wrote: > >> On Wed, Apr 19, 2017 at 11:38 PM, Jérémy Lefaure > >> wrote: >

Re: [PATCH] platform/x86: asus-wmi: fix cpufv sysfs file permission

2017-04-24 Thread Jérémy Lefaure
On Mon, 24 Apr 2017 12:14:14 +0300 Andy Shevchenko <andy.shevche...@gmail.com> wrote: > On Sat, Apr 22, 2017 at 5:19 AM, Jérémy Lefaure > <jeremy.lefa...@lse.epita.fr> wrote: > > The cpufv sysfs file is defined as readable by anyone even if the > > attribute

Re: [PATCH] platform/x86: asus-wmi: fix cpufv sysfs file permission

2017-04-24 Thread Jérémy Lefaure
On Mon, 24 Apr 2017 12:14:14 +0300 Andy Shevchenko wrote: > On Sat, Apr 22, 2017 at 5:19 AM, Jérémy Lefaure > wrote: > > The cpufv sysfs file is defined as readable by anyone even if the > > attribute does not have a show function. The result of every read is an > > IO

  1   2   >