Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp647477ybr; Fri, 22 May 2020 15:48:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyk6uRQW0ZSWuMJs6vF7uzFQfkpJ45e0IrhE+Ol7zisagpbg2sbUeahXKokQjlANGCW839 X-Received: by 2002:a50:c047:: with SMTP id u7mr5106104edd.208.1590187738823; Fri, 22 May 2020 15:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590187738; cv=none; d=google.com; s=arc-20160816; b=zAdBZDx6//cjc+9NXteZcOE5+iwRi2IpMtmSuWMqSM/1U6s8/X9GPP7e9nNiYY3CXr d+u2/Nobu9dpFLae1LbScqExZH3LMjNKmwRzs0ANT+kI8umz70W7KSMYW7sDdfHfAhDV c1t6YSdPC46ta5Ai+ofgup052by5SyYgEueKoFGRyUUQNwXb1eHTAxmJEVInZsW524hB Zt2GR6ZSRWDibon2RDWkjgCSUq/ISQYrjZZhTMx/Glr2ceCf/eLrpRtyD89Qg++oQgGE KL+o301D8vEheh0GRXwZwuPph3GcVaQ63c2GXcseJjsPa0fO8OY9s1vtpDC/yrkfwZnq AiCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8g5iMWxUv50Vq/9o6YUA17pf5mu6Tfr8Vt6J3G1KMjw=; b=Vltje2FSDtlJkDSnzIwEr5N8Sp1zV5SmqjR+/NDmk2dxv4UJIuaxf/ArlAOqTOMQ2s J8dwVvjPDrS7h98YYb9WQ0EGGUy15yov96UvzoeCeG7JHZc2e1kZd+0oLnUnk9H8332n io4gj8xh8KJdt4w2KQQJ5D6C5BLW0l4/lEcWVOu9ZOEHAiLk4U7VF4YgkvlgcOuKqVKz d2+hOmvgSsISKPyVxokp8/tWPCJYmdydOQZ+Cyk9zuZFjpwMyp+ZPGOTcJKnSNJVmAgT zMVO6gYQwp7ha+x5rhfNV2N/Vn6fLKCS05Vx0NQn66j/GiDiYAQMmuPI+TGbDJyZzwjw VJGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r1si5930387ejs.406.2020.05.22.15.48.36; Fri, 22 May 2020 15:48:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731224AbgEVWpN (ORCPT + 99 others); Fri, 22 May 2020 18:45:13 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:40279 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731029AbgEVWpM (ORCPT ); Fri, 22 May 2020 18:45:12 -0400 Received: by mail-pl1-f193.google.com with SMTP id t16so4993484plo.7; Fri, 22 May 2020 15:45:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8g5iMWxUv50Vq/9o6YUA17pf5mu6Tfr8Vt6J3G1KMjw=; b=A48DfZACU6Vqs1oq6gaNH3JqB6pRStANuGrdXRKhBDkbSBJhSuLYH8vI7q5hxayJj7 FpiFv8kWpoDnDVCSR4SF3SW0+meGSh90Wucd9F75eB/+8Wydmj8VOVUtAxTYy1PAzW+c ue8Eepi5aqdat7ZhoNX+BCWeYjiepKmPYVT721x1Z9W4HRKe5MnGTWf+tIvdT7lHH9k/ aLcZB+8JZyP+sMe88ZKeda6uu5tqGziKTdX/fXfqvuDHf8iO+4rj+8EIG/a3xyYOwIeA OkPPcUgXO29I1GWi8kn8YuQe/9TzbSSGiKNvp9rmGitCuJasK3HWHaK5YnzqR9vi5xC9 3Ezg== X-Gm-Message-State: AOAM530pric/CTYV5GTprqRUXmuvadwZiEySlABAPm4TVRdrAibeblrh M/JIynqAvydEeibOgcG40+s= X-Received: by 2002:a17:90a:4f42:: with SMTP id w2mr7268999pjl.74.1590187510516; Fri, 22 May 2020 15:45:10 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id x191sm3798942pfd.37.2020.05.22.15.45.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 15:45:09 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 4908B40321; Fri, 22 May 2020 22:45:08 +0000 (UTC) Date: Fri, 22 May 2020 22:45:08 +0000 From: Luis Chamberlain To: Scott Branden Cc: Greg Kroah-Hartman , David Brown , Alexander Viro , Shuah Khan , bjorn.andersson@linaro.org, Shuah Khan , Arnd Bergmann , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-fsdevel@vger.kernel.org, BCM Kernel Feedback , Olof Johansson , Andrew Morton , Dan Carpenter , Colin Ian King , Kees Cook , Takashi Iwai , linux-kselftest@vger.kernel.org, Andy Gross Subject: Re: [PATCH] firmware_loader: change enum fw_opt to u32 Message-ID: <20200522224508.GE11244@42.do-not-panic.com> References: <20200522214658.12722-1-scott.branden@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200522214658.12722-1-scott.branden@broadcom.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 22, 2020 at 02:46:58PM -0700, Scott Branden wrote: > > /** > - * enum fw_opt - options to control firmware loading behaviour > + * fw_opt - options to control firmware loading behaviour > * > * @FW_OPT_UEVENT: Enables the fallback mechanism to send a kobject uevent > * when the firmware is not found. Userspace is in charge to load the > @@ -33,15 +33,13 @@ > * the platform's main firmware. If both this fallback and the sysfs > * fallback are enabled, then this fallback will be tried first. > */ > -enum fw_opt { > - FW_OPT_UEVENT = BIT(0), > - FW_OPT_NOWAIT = BIT(1), > - FW_OPT_USERHELPER = BIT(2), > - FW_OPT_NO_WARN = BIT(3), > - FW_OPT_NOCACHE = BIT(4), > - FW_OPT_NOFALLBACK_SYSFS = BIT(5), > - FW_OPT_FALLBACK_PLATFORM = BIT(6), > -}; > +#define FW_OPT_UEVENT BIT(0) > +#define FW_OPT_NOWAIT BIT(1) > +#define FW_OPT_USERHELPER BIT(2) > +#define FW_OPT_NO_WARN BIT(3) > +#define FW_OPT_NOCACHE BIT(4) > +#define FW_OPT_NOFALLBACK_SYSFS BIT(5) > +#define FW_OPT_FALLBACK_PLATFORM BIT(6) Everything looked good up to here. The enum defines each flag. We just want to use an enum for *one* flag represetnation, not a bundle. Luis