# Re: \[PATCH 13/68\] libata: revamp ata\_get\_cmd\_descript()

- From: Sergey Shtylyov \<hidden\>
- Date: 2021-12-12 09:33:55 
- List: linux-ide
- Page: https://ratatoskr.run/linux-ide/2021/12/16728036
- Thread: https://ratatoskr.run/linux-ide/2021/12/16727963/t.md

```text
On 10.12.2021 10:28, Hannes Reinecke wrote:

> Rename ata_get_cmd_descrip() to ata_get_cmd_name() and simplify
> it to return 'unknown' instead of NULL.

   "unknown"?

> Signed-off-by: Hannes Reinecke <hare@suse.de>

[...]
> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
> index 69f51616d8bd..29a64059d3a1 100644
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -2080,16 +2080,15 @@ void ata_eh_autopsy(struct ata_port *ap)
>   }
>   
>   /**
> - *	ata_get_cmd_descript - get description for ATA command
> + *	ata_get_cmd_name - get description for ATA command

   s/description/name/?

>    *	@command: ATA command code to get description for

   Here as well?

>    *
> - *	Return a textual description of the given command, or NULL if the
> - *	command is not known.
> + *	Return a textual description of the given command or "unknown"

   And here?

>    *
>    *	LOCKING:
>    *	None
>    */
> -const char *ata_get_cmd_descript(u8 command)
> +const char *ata_get_cmd_name(u8 command)
>   {
>   #ifdef CONFIG_ATA_VERBOSE_ERROR
>   	static const struct
[...]

MBR, Sergey
```
