On Thu, 2022-01-06 at 13:21 -0800, Dan Williams wrote:
> On Thu, Jan 6, 2022 at 12:19 PM Ira Weiny <[email protected]> wrote:
> > 

[..]

> > > +struct cxl_cmd *cxl_cmd_new_get_partition_info(struct cxl_memdev 
> > > *memdev);
> > 
> > why 'new'?  Why not:
> > 
> > cxl_cmd_get_partition_info()
> > 
> > ?
> 
> The "new" is the naming convention inherited from ndctl indicating the
> allocation of a new command object. The motivation is to have a verb /
> action in all of the APIs.
> 
> > 
> > > +unsigned long long 
> > > cxl_cmd_get_partition_info_get_active_volatile_cap(struct cxl_cmd *cmd);
> > > +unsigned long long 
> > > cxl_cmd_get_partition_info_get_active_persistent_cap(struct cxl_cmd *cmd);
> > > +unsigned long long 
> > > cxl_cmd_get_partition_info_get_next_volatile_cap(struct cxl_cmd *cmd);
> > > +unsigned long long 
> > > cxl_cmd_get_partition_info_get_next_persistent_cap(struct cxl_cmd *cmd);

Just one nit here about the double verb 'get'. In such cases,
get_partition_info can just become 'partition_info'

e.g.: cxl_cmd_partition_info_get_active_volatile_cap(...

> 

Reply via email to