On Tue, 2023-10-31 at 13:33 -0700, Dave Jiang wrote: I think a more specific subject like:
cxl/Documentation: Clarify that no-op is a success for xable commands is better? > If a cxl operation is executed resulting in no-op, the tool will still .. cxl enable or disable operation .. > emit the number of targets the operation has succeeded on. For example, if > disable-region is issued and the region is already disabled, the tool will > still report 1 region disabled. Add verbiage to man pages to document the > behavior. > > Signed-off-by: Dave Jiang <[email protected]> > --- > Documentation/cxl/cxl-disable-bus.txt | 2 ++ > Documentation/cxl/cxl-disable-memdev.txt | 1 + > Documentation/cxl/cxl-disable-port.txt | 2 ++ > Documentation/cxl/cxl-disable-region.txt | 2 ++ > Documentation/cxl/cxl-enable-memdev.txt | 2 ++ > Documentation/cxl/cxl-enable-port.txt | 2 ++ > Documentation/cxl/cxl-enable-region.txt | 2 ++ > Documentation/cxl/meson.build | 1 + > Documentation/cxl/operations.txt | 17 +++++++++++++++++ > 9 files changed, 31 insertions(+) > create mode 100644 Documentation/cxl/operations.txt > [..] > > diff --git a/Documentation/cxl/operations.txt > b/Documentation/cxl/operations.txt > new file mode 100644 Maybe call this xable-no-op.txt, 'operations' sounds a bit vague. > index 000000000000..046e2bc19532 > --- /dev/null > +++ b/Documentation/cxl/operations.txt > @@ -0,0 +1,17 @@ > +// SPDX-License-Identifier: gpl-2.0 > + > +Given any en/disabling operation, if the operation is a no-op due to the ..enable or disable command.. > +current state of a target, it is still considered successful when executed > +even if no actual operation is performed. The target applies to a bus, .. the target can be a bus, .. > +decoder, memdev, or region. > + > +For example: > +If a CXL region is already disabled and the cxl disable-region is called: > + > +---- > +# cxl disable-region region0 > +disabled 1 regions > +---- > + > +The operation will still succeed with the number of regions operated on > +reported, even if the operation is a non-action. Looking at the man page for say disable-memdev, and seeing a region command in the example feels slightly awkward.. I wonder if we can just drop the example, and rely only on the text description.
