Patch "bpftool: Fix -Wcast-qual warning" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    bpftool: Fix -Wcast-qual warning

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bpftool-fix-wcast-qual-warning.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7a8244029a18615c673d37807f075c201c5858cf
Author: Denys Zagorui <dzagorui@xxxxxxxxx>
Date:   Thu Sep 7 02:02:10 2023 -0700

    bpftool: Fix -Wcast-qual warning
    
    [ Upstream commit ebc8484d0e6da9e6c9e8cfa1f40bf94e9c6fc512 ]
    
    This cast was made by purpose for older libbpf where the
    bpf_object_skeleton field is void * instead of const void *
    to eliminate a warning (as i understand
    -Wincompatible-pointer-types-discards-qualifiers) but this
    cast introduces another warning (-Wcast-qual) for libbpf
    where data field is const void *
    
    It makes sense for bpftool to be in sync with libbpf from
    kernel sources
    
    Signed-off-by: Denys Zagorui <dzagorui@xxxxxxxxx>
    Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Acked-by: Quentin Monnet <quentin@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/20230907090210.968612-1-dzagorui@xxxxxxxxx
    Stable-dep-of: 23671f4dfd10 ("bpftool: Align output skeleton ELF code")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
index 2883660d6b672..04c47745b3ea5 100644
--- a/tools/bpf/bpftool/gen.c
+++ b/tools/bpf/bpftool/gen.c
@@ -1209,7 +1209,7 @@ static int do_skeleton(int argc, char **argv)
 	codegen("\
 		\n\
 									    \n\
-			s->data = (void *)%2$s__elf_bytes(&s->data_sz);	    \n\
+			s->data = %2$s__elf_bytes(&s->data_sz);		    \n\
 									    \n\
 			obj->skeleton = s;				    \n\
 			return 0;					    \n\




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux