Re: [PATCH RFC v2 10/18] cxl/mem: Handle DCD add and release capacity events.

From: Ira Weiny
Date: Fri Sep 08 2023 - 11:36:08 EST


Dave Jiang wrote:
>
>
> On 8/28/23 22:21, Ira Weiny wrote:

[snip]

> > +
> > +/* Returns 0 if the event was handled successfully. */
> Is this comment necessary?

Not really, deleted.

>
> > +static int cxl_handle_dcd_event_records(struct cxl_memdev_state *mds,
> > + struct cxl_event_record_raw *rec)
> > +{
> > + struct dcd_event_dyn_cap *record = (struct dcd_event_dyn_cap *)rec;
> > + uuid_t *id = &rec->hdr.id;
> > + int rc;
> > +
> > + if (!uuid_equal(id, &dc_event_uuid))
> > + return -EINVAL;
> > +
> > + switch (record->data.event_type) {
> > + case DCD_ADD_CAPACITY:
> > + rc = cxl_handle_dcd_add_event(mds, &record->data.extent);
>
> Just return?

Fixed from Jonathans comments

> > + break;
> > + case DCD_RELEASE_CAPACITY:
> > + case DCD_FORCED_CAPACITY_RELEASE:
>
> Extra 2 spaces of indentation?

This was a checkpatch issues. Fixed.

>
> > + rc = cxl_handle_dcd_release_event(mds, &record->data.extent);
>
> Same here about return.

Fixed from Jonathans comments

Thanks for the review!

Ira