Skip to content

Commit 1b27978

Browse files
weiny2djbw
authored andcommitted
cxl/pci: Update comment
The existence of struct cxl_dev_id containing a single member is odd. The comment made sense when I wrote it but could be clarified. Update the comment and place it next to the odd looking structure. Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20230426-cxl-fixes-v1-2-870c4c8b463a@intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 7914992 commit 1b27978

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/cxl/pci.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ static int cxl_pci_mbox_wait_for_doorbell(struct cxl_dev_state *cxlds)
8585
status & CXLMDEV_DEV_FATAL ? " fatal" : "", \
8686
status & CXLMDEV_FW_HALT ? " firmware-halt" : "")
8787

88+
/*
89+
* Threaded irq dev_id's must be globally unique. cxl_dev_id provides a unique
90+
* wrapper object for each irq within the same cxlds.
91+
*/
8892
struct cxl_dev_id {
8993
struct cxl_dev_state *cxlds;
9094
};
@@ -95,7 +99,6 @@ static int cxl_request_irq(struct cxl_dev_state *cxlds, int irq,
9599
struct device *dev = cxlds->dev;
96100
struct cxl_dev_id *dev_id;
97101

98-
/* dev_id must be globally unique and must contain the cxlds */
99102
dev_id = devm_kzalloc(dev, sizeof(*dev_id), GFP_KERNEL);
100103
if (!dev_id)
101104
return -ENOMEM;

0 commit comments

Comments
 (0)