Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-31 Thread Oscar Carter
Hi Steven, On Mon, Jul 27, 2020 at 09:53:06AM -0400, Steven Rostedt wrote: > On Sun, 26 Jul 2020 17:52:42 +0200 > Oscar Carter wrote: > > > > If I try to do this I will need some help. Some info that point me to the > > > right direction would be greatly apprecia

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-26 Thread Oscar Carter
Hi Steven, On Sat, Jul 25, 2020 at 05:09:14PM +0200, Oscar Carter wrote: > Hi Steven, > > On Fri, Jul 24, 2020 at 02:34:57PM -0400, Steven Rostedt wrote: > > On Fri, 24 Jul 2020 19:55:00 +0200 > > Oscar Carter wrote: > > > > > > Which one of the above

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-25 Thread Oscar Carter
Sorry, typo correction for the last paragraph: On Sat, Jul 25, 2020 at 05:09:14PM +0200, Oscar Carter wrote: > > I would be will to add that linker trick to remove the warning. Or we > > just use that warning as incentive to get architecture developers to > > implement this fea

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-25 Thread Oscar Carter
Hi Steven, On Fri, Jul 24, 2020 at 02:34:57PM -0400, Steven Rostedt wrote: > On Fri, 24 Jul 2020 19:55:00 +0200 > Oscar Carter wrote: > > > > Which one of the above is this patch set for? > > > > This patch is the result of a warning obtained with the following:

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-24 Thread Oscar Carter
c make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- -j4 And with the -Wcast-function-type enabled in the top level makefile. > > -- Steve Thanks, Oscar Carter

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-24 Thread Oscar Carter
Hi Steven, On Fri, Jul 24, 2020 at 07:14:18PM +0200, Oscar Carter wrote: > On Fri, Jul 24, 2020 at 12:35:28PM -0400, Steven Rostedt wrote: > > On Fri, 24 Jul 2020 18:19:21 +0200 > > Oscar Carter wrote: > > > > > > The linker trick is far less intrusiv

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-24 Thread Oscar Carter
On Fri, Jul 24, 2020 at 12:35:28PM -0400, Steven Rostedt wrote: > On Fri, 24 Jul 2020 18:19:21 +0200 > Oscar Carter wrote: > > > > The linker trick is far less intrusive, and I believe less error prone. > > > > If we use the linker trick, the warning -Wcast-function

Re: [PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-24 Thread Oscar Carter
Hi Steven, On Tue, Jul 21, 2020 at 02:05:45PM -0400, Steven Rostedt wrote: > On Sun, 19 Jul 2020 17:50:33 +0200 > Oscar Carter wrote: > > > In an effort to enable -Wcast-function-type in the top-level Makefile to > > support Control Flow Integrity builds, there are the need

[PATCH v2 1/2] kernel/trace: Prepare to remove function callback casts

2020-07-19 Thread Oscar Carter
cases use different function prototypes. Signed-off-by: Oscar Carter --- kernel/trace/ftrace.c | 32 1 file changed, 32 insertions(+) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 1903b80db6eb..fd8fbb422860 100644 --- a/kernel/trace/ftrace.

[PATCH v2 2/2] kernel/trace: Remove function callback casts

2020-07-19 Thread Oscar Carter
he no longer needed function ftrace_ops_no_ops() and all the function callback casts using the previous defined ftrace_func union and the two function helpers called ftrace_set_ufunc() and ftrace_same_address_ufunc(). Signed-off-by: Oscar Carter --- kernel/trace/ftrace.c

[PATCH v2 0/2] kernel/trace: Remove function callback casts

2020-07-19 Thread Oscar Carter
behind the v1 patch. -Use a new union type to manage two different function pointers. -Create the infrastructure to remove the casts. -Remove the casts using the new infrastructure. Oscar Carter (2): kernel/trace: Prepare to remove function callback casts kernel/trace: Remove function callback c

Re: [PATCH v3] firewire: Remove function callback casts

2020-07-10 Thread Oscar Carter
Hi Takashi, On Wed, Jul 08, 2020 at 10:06:28PM +0900, Takashi Sakamoto wrote: > Hi, > > I'm sorry to be late but I was stuck at my work for ALSA control > service programs for audio and music units on IEEE 1394 bus[1]. > > On Sat, May 30, 2020 at 11:08:39AM +0

Re: [PATCH v3] firewire: Remove function callback casts

2020-07-04 Thread Oscar Carter
Hi, Anyone has had time to review this patch? Any comments on this? On Sat, May 30, 2020 at 11:08:39AM +0200, Oscar Carter wrote: > In 1394 OHCI specification, Isochronous Receive DMA context has several > modes. One of mode is 'BufferFill' and Linux FireWire stack uses

[PATCH v2] parisc/kernel/ftrace: Remove function callback casts

2020-07-04 Thread Oscar Carter
parison is against function address (these operands are not function calls). Co-developed-by: Helge Deller Signed-off-by: Helge Deller Signed-off-by: Oscar Carter --- Hi, I have added the Co-develop-by tag and Signed-off-by tag to give credit to Helge Deller if there are no objections. Thanks.

Re: [PATCH] drivers/s390/char/tty3270: Remove function callback casts

2020-07-04 Thread Oscar Carter
On Sat, Jun 27, 2020 at 09:10:56AM -0700, Kees Cook wrote: > On Sat, Jun 27, 2020 at 02:54:17PM +0200, Oscar Carter wrote: > > In an effort to enable -Wcast-function-type in the top-level Makefile to > > support Control Flow Integrity builds, remove all the function callback > &

Re: [PATCH] parisc/kernel/ftrace: Remove function callback casts

2020-07-04 Thread Oscar Carter
On Sat, Jun 27, 2020 at 10:09:40PM +0200, Helge Deller wrote: > On 27.06.20 15:43, Oscar Carter wrote: > > In an effort to enable -Wcast-function-type in the top-level Makefile to > > support Control Flow Integrity builds, remove all the function callback > > casts. > >

[PATCH] parisc/kernel/ftrace: Remove function callback casts

2020-06-27 Thread Oscar Carter
type. This can be done since the comparison is against function address (these operands are not function calls). Signed-off-by: Oscar Carter --- arch/parisc/kernel/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/parisc/kernel/ftrace.c b/arch/parisc/kernel/ftrace.c

[PATCH] drivers/s390/char/tty3270: Remove function callback casts

2020-06-27 Thread Oscar Carter
In an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds, remove all the function callback casts. To do this modify the function prototypes accordingly. Signed-off-by: Oscar Carter --- drivers/s390/char/tty3270.c | 12 ++-- 1 file

Re: [PATCH] kernel/trace: Remove function callback casts

2020-06-20 Thread Oscar Carter
igned long parent_ip) > +void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip) > { > __ftrace_ops_list_func(ip, parent_ip, NULL, NULL); > } > -NOKPROBE_SYMBOL(ftrace_ops_no_ops); > #endif > +NOKPROBE_SYMBOL(arch_ftrace_ops_list_func); > > /* > * If there's only one function registered but it does not support Thanks for your work and the proper patch sent [1]. I will follow the thread to see if I can help. [1] https://lore.kernel.org/lkml/20200617165616.52241...@oasis.local.home/ Regards, Oscar Carter

[PATCH] kernel/trace: Remove function callback casts

2020-06-14 Thread Oscar Carter
. Signed-off-by: Oscar Carter --- kernel/trace/ftrace.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index c163c3531faf..ed1efc0e3a25 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -119,13 +119,12

[PATCH v5 3/3] drivers/acpi: Remove function cast

2020-05-30 Thread Oscar Carter
Zyngier Signed-off-by: Oscar Carter --- include/linux/acpi.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index cf74e044a570..1cda2d32e4c4 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1143,16

[PATCH v5 0/3] drivers/acpi: Remove function callback casts

2020-05-30 Thread Oscar Carter
Signed-off-by: Marc Zyngier Oscar Carter (3): drivers/acpi: Add new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY drivers/irqchip: Use new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY drivers/acpi: Remove function cast drivers/irqchip/irq-gic-v3.c | 2 +- drivers/irqchip/irq-gic.c| 2 +-

[PATCH v5 1/3] drivers/acpi: Add new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY

2020-05-30 Thread Oscar Carter
eloped-by: Marc Zyngier Signed-off-by: Marc Zyngier Signed-off-by: Oscar Carter --- include/linux/acpi.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d661cd0ee64d..cf74e044a570 100644 --- a/include/linux/acpi.h +++ b/inclu

[PATCH v5 2/3] drivers/irqchip: Use new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY

2020-05-30 Thread Oscar Carter
IRQCHIP_ACPI_DECLARE macro to match all the parameters. Co-developed-by: Marc Zyngier Signed-off-by: Marc Zyngier Signed-off-by: Oscar Carter --- drivers/irqchip/irq-gic-v3.c | 2 +- drivers/irqchip/irq-gic.c| 2 +- include/linux/irqchip.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions

Re: [PATCH v4 0/3] drivers/acpi: Remove function callback casts

2020-05-30 Thread Oscar Carter
Hi, Drop this patch because it has errors. I will send a v5. Sorry. Thanks, Oscar Carter

[PATCH v4 2/3] drivers/irqchip: Use new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY

2020-05-30 Thread Oscar Carter
IRQCHIP_ACPI_DECLARE macro to match all the parameters. Signed-off-by: Oscar Carter --- drivers/irqchip/irq-gic-v3.c | 2 +- drivers/irqchip/irq-gic.c| 2 +- include/linux/irqchip.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip

[PATCH v4 1/3] drivers/acpi: Add new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY

2020-05-30 Thread Oscar Carter
IRQCHIP_ACPI_DECLARE invocations use as last parameter a function with the protoype "int (*func)(struct acpi_subtable_header *, const unsigned long)" it's necessary that this macro initialize the probe_subtbl field of the acpi_probe_entry struct and not the probe_table field. Signed-off-b

[PATCH v4 3/3] drivers/acpi: Remove function cast

2020-05-30 Thread Oscar Carter
Zyngier Signed-off-by: Oscar Carter --- include/linux/acpi.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index cf74e044a570..1cda2d32e4c4 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1143,16

[PATCH v4 0/3] drivers/acpi: Remove function callback casts

2020-05-30 Thread Oscar Carter
Signed-off-by: Oscar Carter Changelog v3->v4 - Add a new patch to remove the cast of the macro ACPI_DECLARE_PROBE_ENTRY (Marc Zyngier) - Change the subject of the first patch Oscar Carter (3): drivers/acpi: Add new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY drivers/irq

Re: [PATCH v3 2/2] drivers/irqchip: Use new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY

2020-05-30 Thread Oscar Carter
hanks, > > M. > > -- > Jazz is not dead. It just smells funny... Thanks, Oscar Carter

[PATCH v3] firewire: Remove function callback casts

2020-05-30 Thread Oscar Carter
This way avoid the call to a function with one purpose to achieved another one. Co-developed-by: Takashi Sakamoto Signed-off-by: Takashi Sakamoto Co-developed-by: Stefan Richter Signed-off-by: Stefan Richter Signed-off-by: Oscar Carter --- Hi, this is another proposal to achieved the goal of remove

[PATCH v3 2/2] drivers/irqchip: Use new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY

2020-05-29 Thread Oscar Carter
IRQCHIP_ACPI_DECLARE macro to match all the parameters. Co-developed-by: Marc Zyngier Signed-off-by: Marc Zyngier Signed-off-by: Oscar Carter --- drivers/irqchip/irq-gic-v3.c | 2 +- drivers/irqchip/irq-gic.c| 2 +- include/linux/irqchip.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions

[PATCH v3 0/2] drivers/irqchip: Remove function callback casts

2020-05-29 Thread Oscar Carter
- Add these two lines, to give credit to Marc Zyngier Signed-off-by: Marc Zyngier Signed-off-by: Oscar Carter Oscar Carter (2): drivers/irqchip: Add new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY drivers/irqchip: Use new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY drivers/irqchip/irq-gic-v3.

[PATCH v3 1/2] drivers/irqchip: Add new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY

2020-05-29 Thread Oscar Carter
eloped-by: Marc Zyngier Signed-off-by: Marc Zyngier Signed-off-by: Oscar Carter --- include/linux/acpi.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d661cd0ee64d..cf74e044a570 100644 --- a/include/linux/acpi.h +++ b/inclu

Re: [PATCH] drivers/irqchip: Remove function callback casts

2020-05-26 Thread Oscar Carter
Hi Marc, On Sun, May 24, 2020 at 05:16:41PM +0100, Marc Zyngier wrote: > On 2020-05-24 17:06, Oscar Carter wrote: > > > Ok, I will do the changes you suggested and I will resend a new version. > > Later, I will also send a series to clean up the checkpatch warnings and > &g

Re: [PATCH v2] drivers/irqchip: Remove function callback casts

2020-05-26 Thread Oscar Carter
On Mon, May 25, 2020 at 11:55:33AM +0100, Marc Zyngier wrote: > On Sun, 24 May 2020 17:22:20 +0100, > Oscar Carter wrote: > > > > include/linux/acpi.h| 11 +++ > > You now need to Cc the ACPI maintainers. Sorry for forgetting. > > include/linux/irq

[PATCH v2] drivers/irqchip: Remove function callback casts

2020-05-24 Thread Oscar Carter
function with the protoype "int (*func)(struct acpi_subtable_header *, const unsigned long)" it's necessary that this macro initialize the probe_subtbl field of the acpi_probe_entry struct and not the probe_table field. Signed-off-by: Oscar Carter --- Changelog v1->v2 - Add m

Re: [PATCH] drivers/irqchip: Remove function callback casts

2020-05-24 Thread Oscar Carter
Hi Marc, On Sun, May 24, 2020 at 12:46:34PM +0100, Marc Zyngier wrote: > On Sun, 24 May 2020 10:09:10 +0200 > Oscar Carter wrote: > > Hi Oscar, > > Thanks for this. Comments below. > > > In an effort to enable -Wcast-function-type in the top-level Makefile to > &g

[PATCH] staging/rtl8192e: Remove function callback casts

2020-05-24 Thread Oscar Carter
In an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds, remove all the function callback casts. To do this modify the function prototypes accordingly. Signed-off-by: Oscar Carter --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 24

[PATCH] drivers/irqchip: Remove function callback casts

2020-05-24 Thread Oscar Carter
ACPI_DECLARE_PROBE_ENTRY. In this new initialization use the probe_subtbl field instead of the probe_table field use in the ACPI_DECLARE_PROBE_ENTRY macro. Signed-off-by: Oscar Carter --- include/linux/irqchip.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/linux

Re: [PATCH v2] firewire: Remove function callback casts

2020-05-22 Thread Oscar Carter
ents. > I will take a look at your proposal. Thanks for your time and work. > > Regards > > Takashi Sakamoto Thanks, Oscar Carter

Re: [PATCH 0/2] firewire: obsolete cast of function callback toward CFI

2020-05-22 Thread Oscar Carter
Hi, On Wed, May 20, 2020 at 03:47:24PM +0900, Takashi Sakamoto wrote: > Hi, > > Oscar Carter works for Control Flow Integrity build. Any cast > of function callback is inconvenient for the work. Unfortunately, > current code of firewire-core driver includes the cast[1] and Osca

[PATCH v2] firewire: Remove function callback casts

2020-05-19 Thread Oscar Carter
cause this and "ctx->callback.sc" are an union and setting one implies setting the other one to the same value. Signed-off-by: Oscar Carter --- Changelog v1->v2 -Set explicity to NULL the "ctx->callback.sc" variable and return an error code in "fw_iso_context_cr

Re: [PATCH] firewire: Remove function callback casts

2020-05-19 Thread Oscar Carter
nd I will resend a new version. > Hope you get the point. > Lev Thanks, Oscar Carter

[PATCH] firewire: Remove function callback casts

2020-05-16 Thread Oscar Carter
ix all the function calls accordingly. Signed-off-by: Oscar Carter --- drivers/firewire/core-cdev.c| 12 +++- drivers/firewire/core-iso.c | 10 -- drivers/firewire/net.c | 2 +- drivers/media/firewire/firedtv-fw.c | 3 ++- include/linux/firewire.h

[PATCH] staging: greybus: Fix uninitialized scalar variable

2020-05-10 Thread Oscar Carter
ow control type, so remove the OR / AND self operator and set the value directly. Addresses-Coverity-ID: 1374016 ("Uninitialized scalar variable") Fixes: e55c25206d5c9 ("greybus: uart: Handle CRTSCTS flag in termios") Signed-off-by: Oscar Carter --- drivers/staging/greybus/u

[PATCH] staging: vt6656: Remove logically dead code

2020-05-10 Thread Oscar Carter
Coverity-ID: 1230228 ("Logically dead code") Fixes: f53d9f12c51a ("staging: vt6656: rf.c additional power.") Signed-off-by: Oscar Carter --- drivers/staging/vt6656/rf.c | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/staging/vt6656/rf.c b/dri

[PATCH] staging: vt6656: Use const for read only data

2020-05-04 Thread Oscar Carter
45 0 .note.GNU-stack 0 0 .note.gnu.property 32 0 Total 2251 Signed-off-by: Oscar Carter --- drivers/staging/vt6656/baseband.c | 14 +- drivers/staging/vt6656/usbpipe.c | 2 +- drivers/staging/vt6656/usbpipe.h | 2 +- 3 files changed,

[PATCH v3] staging: wilc1000: Increase the size of wid_list array

2020-05-04 Thread Oscar Carter
3cb90b802d ("staging: wilc1000: add passive scan support") Acked-by: Ajay Singh Signed-off-by: Oscar Carter --- Changelog v1 -> v2 - Fix the commit for the "Fixes" tag as Ajay Singh suggested. Changelog v2 -> v3 - Use a #define instead of a hard-coded literal for the a

Re: [PATCH v2] staging: wilc1000: Increase the size of wid_list array

2020-05-04 Thread Oscar Carter
On Sun, May 03, 2020 at 04:29:53PM -0700, Joe Perches wrote: > On Sun, 2020-05-03 at 14:52 +, ajay.kat...@microchip.com wrote: > > On 03/05/20 1:21 pm, Oscar Carter wrote: > > > EXTERNAL EMAIL: Do not click links or open attachments unless you know > &g

[PATCH v2] staging: wilc1000: Increase the size of wid_list array

2020-05-03 Thread Oscar Carter
Increase by one the size of wid_list array as index variable can reach a value of 5. If this happens, an out-of-bounds access is performed. Addresses-Coverity-ID: 1451981 ("Out-of-bounds access") Fixes: f5a3cb90b802d ("staging: wilc1000: add passive scan support") Signed-

Re: [PATCH] staging: wilc1000: Increase the size of wid_list array

2020-05-03 Thread Oscar Carter
On Fri, May 01, 2020 at 06:26:10PM +, ajay.kat...@microchip.com wrote: > > On 01/05/20 10:32 pm, Oscar Carter wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > > content is safe > > > > Increase by one the size of wid_li

[PATCH] staging: wilc1000: Increase the size of wid_list array

2020-05-01 Thread Oscar Carter
Increase by one the size of wid_list array as index variable can reach a value of 5. If this happens, an out-of-bounds access is performed. Addresses-Coverity-ID: 1451981 ("Out-of-bounds access") Fixes: c5c77ba18ea66 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-

[PATCH] staging: gasket: Check the return value of gasket_get_bar_index()

2020-05-01 Thread Oscar Carter
ivers/staging: Gasket driver framework + Apex driver") Signed-off-by: Oscar Carter --- drivers/staging/gasket/gasket_core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c index 8e0575fcb4c8..67325fbaf760 10

[PATCH] staging: vt6656: Refactor the vnt_rf_table_download function

2020-04-29 Thread Oscar Carter
ve all the variables that are now unused. This way reduce the stack footprint, and make the code more clear. Signed-off-by: Oscar Carter --- drivers/staging/vt6656/rf.c | 111 ++-- 1 file changed, 69 insertions(+), 42 deletions(-) diff --git a/drivers/staging/vt6

[PATCH 1/2] staging: vt6656: Check the return values in vnt_set_bss_mode function

2020-04-29 Thread Oscar Carter
Check the return value of all the functions that return zero if successful or a negative error code on failure inside the function vnt_set_bss_mode. Also, remove the unnecessary variable initialization as this variable is set a few lines later. Signed-off-by: Oscar Carter --- drivers/staging

[PATCH 0/2] staging: vt6656: Refactor the vnt_set_bss_mode function

2020-04-29 Thread Oscar Carter
tements as all the branches in every "if" are almost the same. Oscar Carter (2): staging: vt6656: Check the return values in vnt_set_bss_mode function staging: vt6656: Refactor the vnt_set_bss_mode function drivers/staging/vt6656/card.c | 77 ++-

[PATCH 2/2] staging: vt6656: Refactor the vnt_set_bss_mode function

2020-04-29 Thread Oscar Carter
e the "priv->bb_type" variable is already an u8 tpe. Signed-off-by: Oscar Carter --- drivers/staging/vt6656/card.c | 68 --- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index