Re: [PATCH 01/11] block: rsxx: core: Remove superfluous const qualifier

Bart Van Assche
2021-04-06T20:59:58Z

On 3/12/21 2:55 AM, Lee Jones wrote:
> This function returns a const string.
>
> The second const qualifier is not required.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/block/rsxx/core.c:395:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
>
> Cc: Joshua Morris <josh.h.morris@us.ibm.com>
> Cc: Philip Kelleher <pjk1939@linux.ibm.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: linux-block@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> drivers/block/rsxx/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c
> index 5ac1881396afb..813b0a554d4a8 100644
> --- a/drivers/block/rsxx/core.c
> +++ b/drivers/block/rsxx/core.c
> @@ -392,7 +392,7 @@ static irqreturn_t rsxx_isr(int irq, void *pdata)
> }
>
> /*----------------- Card Event Handler -------------------*/
> -static const char * const rsxx_card_state_to_str(unsigned int state)
> +static const char *rsxx_card_state_to_str(unsigned int state)
> {
> static const char * const state_strings[] = {
> "Unknown", "Shutdown", "Starting", "Formatting",

Reviewed-by: Bart Van Assche <bvanassche@acm.org>