[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <zybblsg5cth563xrx26jgdsxo3nzvyafrn7nu7wd46vjseaqki@iggq3fslim3f>
Date: Mon, 31 Mar 2025 02:09:01 +0200
From: Michal Kubecek <mkubecek@...e.cz>
To: Mohsin Bashir <mohsin.bashr@...il.com>
Cc: netdev@...r.kernel.org, fbnic@...a.com, kernel-team@...a.com
Subject: Re: [PATCH ethtool-next] ethtool: fbnic: ethtool dump parser
On Wed, Mar 05, 2025 at 11:46:41AM -0800, Mohsin Bashir wrote:
> This patch adds support for parsing the register dump for fbnic.
>
> The patch is composed of several register sections, and each of these
> sections is dumped lineraly except for the RPC_RAM section which is handled
> differently.
>
> For each of the sections, we dump register name, its value, the bit mask
> of any subfields within that register, the name of the subfield, and the
> corresponding value.
>
> Furthermore, there may be unused blocks within a section; we skip such
> blocks while dumping registers linearly.
>
> Validation:
> - Validate patch applies to master without any warning
> - Validate 'ethtool -d' for net-next branch generates ascii dump
> $ uname -r
> 6.14.0-0_fbk701_rc0_429_g8e5edf971d0
> $ ./ethtool -d eth0 > /tmp/fbnic_ascii_dump
>
> Signed-off-by: Mohsin Bashir <mohsin.bashr@...il.com>
> ---
Hello,
the patch introduces warnings (see below) when compiled on i386
(32-bit), can you check?
Thank you,
Michal
fbnic.c: In function ‘fbnic_dump_fb_nic_intr_global’:
fbnic.c:5679:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
5679 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_intr_msix’:
fbnic.c:5773:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
5773 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_qm_tx_global’:
fbnic.c:6255:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
6255 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_qm_rx_global’:
fbnic.c:6705:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
6705 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_tce’:
fbnic.c:7404:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
7404 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_tce_ram’:
fbnic.c:7535:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
7535 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_tmi’:
fbnic.c:7918:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
7918 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_ptp’:
fbnic.c:8087:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
8087 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_rxb’:
fbnic.c:9154:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
9154 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_rpc’:
fbnic.c:9942:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
9942 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_rpc_ram’:
fbnic.c:10176:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
10176 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_fab’:
fbnic.c:10598:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
10598 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_master’:
fbnic.c:11534:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
11534 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_mac_pcs’:
fbnic.c:12251:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
12251 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_mac_rsfec’:
fbnic.c:12619:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
12619 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_mac_mac’:
fbnic.c:13495:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
13495 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_pcie_ss_comphy’:
fbnic.c:21516:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
21516 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_sig’:
fbnic.c:22359:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
22359 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_pul_user’:
fbnic.c:24349:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
24349 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_fb_nic_queue’:
fbnic.c:25416:16: error: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
25416 | if (nn != regs_buff - section_start) {
| ^~
fbnic.c: In function ‘fbnic_dump_regs’:
fbnic.c:25495:46: error: comparison of integer expressions of different signedness: ‘int’ and ‘__u32’ {aka ‘unsigned int’} [-Werror=sign-compare]
25495 | if ((regs_buff - section_start) << 2 != regs->len) {
| ^~
fbnic.c:25498:51: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘int’ [-Werror=format=]
25498 | fprintf(stderr, "dwords [bytes] %lu\n",
| ~~^
| |
| long unsigned int
| %u
25499 | (regs_buff - section_start) << 2);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists