From: Leon Romanovsky <leon@kernel.org>
To: Chen Linxuan <chenlinxuan@uniontech.com>
Cc: Chengchang Tang <tangchengchang@huawei.com>,
Junxian Huang <huangjunxian6@hisilicon.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
Winston Wen <wentao@uniontech.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 5/7] RDMA/hns: initialize db in update_srq_db()
Date: Fri, 11 Apr 2025 21:01:50 +0300 [thread overview]
Message-ID: <20250411180150.GY199604@unreal> (raw)
In-Reply-To: <FF922C77946229B6+20250411105459.90782-5-chenlinxuan@uniontech.com>
On Fri, Apr 11, 2025 at 06:54:53PM +0800, Chen Linxuan wrote:
> On x86_64 with gcc version 13.3.0, I compile
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c with:
>
> make defconfig
> ./scripts/kconfig/merge_config.sh .config <(
> echo CONFIG_COMPILE_TEST=y
> echo CONFIG_HNS3=m
> echo CONFIG_INFINIBAND=m
> echo CONFIG_INFINIBAND_HNS_HIP08=m
> )
> make KCFLAGS="-fno-inline-small-functions -fno-inline-functions-called-once" \
> drivers/infiniband/hw/hns/hns_roce_hw_v2.o
>
> Then I get a compile error:
>
> CALL scripts/checksyscalls.sh
> DESCEND objtool
> INSTALL libsubcmd_headers
> CC [M] drivers/infiniband/hw/hns/hns_roce_hw_v2.o
> In file included from drivers/infiniband/hw/hns/hns_roce_hw_v2.c:47:
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'update_srq_db':
> drivers/infiniband/hw/hns/hns_roce_common.h:74:17: error: 'db' is used uninitialized [-Werror=uninitialized]
> 74 | *((__le32 *)_ptr + (field_h) / 32) &= \
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/infiniband/hw/hns/hns_roce_common.h:90:17: note: in expansion of macro '_hr_reg_clear'
> 90 | _hr_reg_clear(ptr, field_type, field_h, field_l); \
> | ^~~~~~~~~~~~~
> drivers/infiniband/hw/hns/hns_roce_common.h:95:39: note: in expansion of macro '_hr_reg_write'
> 95 | #define hr_reg_write(ptr, field, val) _hr_reg_write(ptr, field, val)
> | ^~~~~~~~~~~~~
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:948:9: note: in expansion of macro 'hr_reg_write'
> 948 | hr_reg_write(&db, DB_TAG, srq->srqn);
> | ^~~~~~~~~~~~
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:946:31: note: 'db' declared here
> 946 | struct hns_roce_v2_db db;
> | ^~
> cc1: all warnings being treated as errors
>
> Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
> Co-Developed-by: Winston Wen <wentao@uniontech.com>
> Signed-off-by: Winston Wen <wentao@uniontech.com>
> ---
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to rdma-next.
Thanks
next prev parent reply other threads:[~2025-04-11 18:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 10:51 [RFC PATCH 0/7] kernel-hacking: introduce CONFIG_NO_AUTO_INLINE Chen Linxuan
2025-04-11 10:54 ` [RFC PATCH 1/7] nvme: add __always_inline for nvme_pci_npages_prp Chen Linxuan
[not found] ` <20250411105459.90782-1-chenlinxuan@uniontech.com>
2025-04-11 10:54 ` [RFC PATCH 2/7] mm: add __always_inline for page_contains_unaccepted Chen Linxuan
2025-04-11 10:54 ` [RFC PATCH 3/7] vfio/virtio: add __always_inline for virtiovf_get_device_config_size Chen Linxuan
2025-04-11 10:54 ` [RFC PATCH 4/7] drm/i915/pxp: fix undefined reference to `intel_pxp_gsccs_is_ready_for_sessions' Chen Linxuan
2025-04-15 7:59 ` Jani Nikula
2025-04-15 8:09 ` Chen Linxuan
2025-04-15 9:07 ` Jani Nikula
2025-04-11 10:54 ` [RFC PATCH 5/7] RDMA/hns: initialize db in update_srq_db() Chen Linxuan
2025-04-11 18:01 ` Leon Romanovsky [this message]
2025-04-11 10:54 ` [RFC PATCH 6/7] tpm: add __always_inline for tpm_is_hwrng_enabled Chen Linxuan
2025-04-12 0:47 ` Jarkko Sakkinen
2025-04-15 2:28 ` Chen Linxuan
2025-04-11 10:54 ` [RFC PATCH 7/7] lib/Kconfig.debug: introduce CONFIG_NO_AUTO_INLINE Chen Linxuan
2025-04-15 7:13 ` Chen Linxuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250411180150.GY199604@unreal \
--to=leon@kernel.org \
--cc=chenlinxuan@uniontech.com \
--cc=huangjunxian6@hisilicon.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=tangchengchang@huawei.com \
--cc=wentao@uniontech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.