Skip to content

Commit 1a86eb4

Browse files
author
John W. Linville
committed
cxl/features: Remove the inline specifier from to_cxlfs()
JIRA: https://issues.redhat.com/browse/RHEL-107284 commit bfc6270 Author: Alison Schofield <alison.schofield@intel.com> Date: Wed May 21 16:36:23 2025 -0700 cxl/features: Remove the inline specifier from to_cxlfs() to_cxlfs() was declared 'inline' in the header but only defined in drivers/cxl/core/features.c. This has worked because features.c was the only file using the function and the definition happened to be available in the same compilation unit. However, in preparation for a second .c file using the header and needing to call the function, the inline specifier became an issue. Sparse flagged the declaration as invalid since 'inline' requires a visible definition at the point of use. Defining the function in the header was considered but rejected, as it depends on internal symbols not visible at that level. Remove the inline specifier to correct the linkage violation. Signed-off-by: Alison Schofield <alison.schofield@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Shiju Jose <shiju.jose@huawei.com> Link: https://patch.msgid.link/20250521233625.1745849-1-alison.schofield@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: John W. Linville <linville@redhat.com>
1 parent 4d449c3 commit 1a86eb4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/cxl/core/features.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static bool is_cxl_feature_exclusive(struct cxl_feat_entry *entry)
4646
return is_cxl_feature_exclusive_by_uuid(&entry->uuid);
4747
}
4848

49-
inline struct cxl_features_state *to_cxlfs(struct cxl_dev_state *cxlds)
49+
struct cxl_features_state *to_cxlfs(struct cxl_dev_state *cxlds)
5050
{
5151
return cxlds->cxlfs;
5252
}

include/cxl/features.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ struct cxl_features_state {
6666
struct cxl_mailbox;
6767
struct cxl_memdev;
6868
#ifdef CONFIG_CXL_FEATURES
69-
inline struct cxl_features_state *to_cxlfs(struct cxl_dev_state *cxlds);
69+
struct cxl_features_state *to_cxlfs(struct cxl_dev_state *cxlds);
7070
int devm_cxl_setup_features(struct cxl_dev_state *cxlds);
7171
int devm_cxl_setup_fwctl(struct device *host, struct cxl_memdev *cxlmd);
7272
#else

0 commit comments

Comments
 (0)