Re: [RFC 4/5] cxl: Set type of region to that of the first endpoint

Ben Cheatham
2024-10-03T14:28:21Z

On 10/2/24 8:12 PM, Huang, Ying wrote:
> Hi, Ben,
>
> Ben Cheatham <benjamin.cheatham@amd.com> writes:
>
>> On 9/24/24 9:46 PM, Huang Ying wrote:
>
> [snip]
>
>>> diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
>>> index 2dee78e9b90c..5633b7316cb3 100644
>>> --- a/drivers/cxl/core/port.c
>>> +++ b/drivers/cxl/core/port.c
>>> @@ -139,6 +139,8 @@ static ssize_t target_type_show(struct device *dev,
>>> return sysfs_emit(buf, "accelerator\n");
>>> case CXL_DECODER_EXPANDER:
>>> return sysfs_emit(buf, "expander\n");
>>> + default:
>>> + break;
>>
>> You can drop this imo. It doesn't change anything functionally considering
>> the break is immediately followed by a return.
>
> Sorry, I cannot do that. Otherwise, there will be build error.
>
I thought that might be the case, but figured I'd suggest it anyway. Oh well!

Thanks,
Ben

>> Thanks,
>> Ben
>>
>>> }
>>> return -ENXIO;
>>> }
>
> [snip]
>
> --
> Best Regards,
> Huang, Ying