[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180421135723.GO14440@wotan.suse.de>
Date: Sat, 21 Apr 2018 15:57:23 +0200
From: "Luis R. Rodriguez" <mcgrof@...nel.org>
To: Andres Rodriguez <andresx7@...il.com>
Cc: linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
mcgrof@...nel.org, alexdeucher@...il.com,
ckoenig.leichtzumerken@...il.com, kvalo@...eaurora.org,
arend.vanspriel@...adcom.com
Subject: Re: [PATCH 2/9] firmware: wrap FW_OPT_* into an enum
On Tue, Apr 17, 2018 at 11:33:00AM -0400, Andres Rodriguez wrote:
> This should let us associate enum kdoc to these values.
>
> Signed-off-by: Andres Rodriguez <andresx7@...il.com>
> ---
> diff --git a/drivers/base/firmware_loader/firmware.h b/drivers/base/firmware_loader/firmware.h
> index d11d37db370b..957396293b92 100644
> --- a/drivers/base/firmware_loader/firmware.h
> +++ b/drivers/base/firmware_loader/firmware.h
> @@ -10,13 +10,14 @@
>
> #include <generated/utsrelease.h>
>
> -/* firmware behavior options */
> -#define FW_OPT_UEVENT (1U << 0)
> -#define FW_OPT_NOWAIT (1U << 1)
> -#define FW_OPT_USERHELPER (1U << 2)
> -#define FW_OPT_NO_WARN (1U << 3)
> -#define FW_OPT_NOCACHE (1U << 4)
> -#define FW_OPT_NOFALLBACK (1U << 5)
> +enum fw_opt {
> + FW_OPT_UEVENT = (1U << 0),
> + FW_OPT_NOWAIT = (1U << 1),
> + FW_OPT_USERHELPER = (1U << 2),
> + FW_OPT_NO_WARN = (1U << 3),
> + FW_OPT_NOCACHE = (1U << 4),
> + FW_OPT_NOFALLBACK = (1U << 5),
> +};
Please use BIT(i) and include linux/bitops.h instead.
Luis
Powered by blists - more mailing lists