Patch "tools/resolve_btfids: Fix comparison of distinct pointer types warning in resolve_btfids" has been added to the 6.1-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

    tools/resolve_btfids: Fix comparison of distinct pointer types warning in resolve_btfids

to the 6.1-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:
     tools-resolve_btfids-fix-comparison-of-distinct-poin.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 3006947d65f74eda6e88fb403ac5c022ef8b559e
Author: Liwei Song <liwei.song.lsong@xxxxxxxxx>
Date:   Mon Jul 22 16:32:59 2024 +0800

    tools/resolve_btfids: Fix comparison of distinct pointer types warning in resolve_btfids
    
    [ Upstream commit 13c9b702e6cb8e406d5fa6b2dca422fa42d2f13e ]
    
    Add a type cast for set8->pairs to fix below compile warning:
    
    main.c: In function 'sets_patch':
    main.c:699:50: warning: comparison of distinct pointer types lacks a cast
      699 |        BUILD_BUG_ON(set8->pairs != &set8->pairs[0].id);
          |                                 ^~
    
    Fixes: 9707ac4fe2f5 ("tools/resolve_btfids: Refactor set sorting with types from btf_ids.h")
    Signed-off-by: Liwei Song <liwei.song.lsong@xxxxxxxxx>
    Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
    Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/20240722083305.4009723-1-liwei.song.lsong@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/bpf/resolve_btfids/main.c b/tools/bpf/resolve_btfids/main.c
index 82bffa7cf8659..7775040182e39 100644
--- a/tools/bpf/resolve_btfids/main.c
+++ b/tools/bpf/resolve_btfids/main.c
@@ -696,7 +696,7 @@ static int sets_patch(struct object *obj)
 			 * Make sure id is at the beginning of the pairs
 			 * struct, otherwise the below qsort would not work.
 			 */
-			BUILD_BUG_ON(set8->pairs != &set8->pairs[0].id);
+			BUILD_BUG_ON((u32 *)set8->pairs != &set8->pairs[0].id);
 			qsort(set8->pairs, set8->cnt, sizeof(set8->pairs[0]), cmp_id);
 
 			/*




[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