[PATCH 09/35] nvme_get_ctrl_attr(): constify "path" argument

Hannes Reinecke hare at suse.de
Thu Feb 4 02:05:51 EST 2021


On 1/26/21 9:32 PM, mwilck at suse.com wrote:
> From: Martin Wilck <mwilck at suse.com>
> 
> Signed-off-by: Martin Wilck <mwilck at suse.com>
> ---
>   nvme-topology.c | 2 +-
>   nvme.h          | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/nvme-topology.c b/nvme-topology.c
> index 71371c5..f62446b 100644
> --- a/nvme-topology.c
> +++ b/nvme-topology.c
> @@ -45,7 +45,7 @@ close_fd:
>   	return subsysnqn;
>   }
>   
> -char *nvme_get_ctrl_attr(char *path, const char *attr)
> +char *nvme_get_ctrl_attr(const char *path, const char *attr)
>   {
>   	char *attrpath, *value;
>   	ssize_t ret;
> diff --git a/nvme.h b/nvme.h
> index 3fb1060..382e625 100644
> --- a/nvme.h
> +++ b/nvme.h
> @@ -109,7 +109,7 @@ int scan_subsystems(struct nvme_topology *t, const char *subsysnqn,
>   		    __u32 ns_instance, char *dev_dir);
>   void free_topology(struct nvme_topology *t);
>   char *get_nvme_subsnqn(char *path);
> -char *nvme_get_ctrl_attr(char *path, const char *attr);
> +char *nvme_get_ctrl_attr(const char *path, const char *attr);
>   
>   void *nvme_alloc(size_t len, bool *huge);
>   void nvme_free(void *p, bool huge);
> 
Could be moved prior to the monitor code as it's unrelated to that.

Other than that:

Reviewed-by: Hannes Reinecke <hare at suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare at suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



More information about the Linux-nvme mailing list