Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp648449ybr; Fri, 22 May 2020 15:51:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwj0DkcXHUQll6cvmOQgv2FAyrk50/cbaBWSMftkdu6jwoBkDywhSF6D3+uGBbi611hovb3 X-Received: by 2002:a17:906:4749:: with SMTP id j9mr9932163ejs.23.1590187864699; Fri, 22 May 2020 15:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590187864; cv=none; d=google.com; s=arc-20160816; b=Pfa8hBMSHO3494hfSPZ8Z7yBvPzv2lwp9KHcI4NlY4DEuvJYcQE47eNUVXSDU+W/lQ BmX5eGnlq5CZ6gt5dTM8GcB7GrkZsdqukYTP5AwnBbPNiNexHzGJxqpSSpT4SVdEib53 nJGrf2rFZnUuzm6CXqFmMZrlK4yO7OFjwfeEMOaj6CuhHGY2wnAJEhgdOQv+tYmatKVQ LMiUreh01Bv/0SpVnN9SV7P5Z5Xy3H/H75fYJH9jGfUHZDOwQGnW+W2JUpzd0wpRATQi PaboHo2C7dfhF+YbbePsIS60n+gciQi3ticrvgJfmccfBdp85UpGNnYfhkpQuQAonRzi VTqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=5Niesz+2MAyLragVp6DehMUQoLdj3CSU9Zt3Gj3FZgA=; b=TBNaNc0RCqc6AS9WMX5dn8bdkXRxh1F5h6KmYV7mnwupvlUwpU8emzm0DBq6VevYYH 1WjXp40FDFWZihlqVg99jDLjchUEefKiDlVcPKH0/Mkfqbb97juatBqCdGQEgwQ7/2M4 y5RqvVsu2z5La+yVw8YaD87fjfw6y5JKEXFbR/lGBIBSHkbZb2NSPyqcvMfplW120Lz/ ty16vjpkH71AszPJJXXQzv0NGLm8O6hYY9UMz5fM3723tPEUT35b8884GcNbdjzg2xKJ YVbcpJMSWj8tMhbEJPedE48OePTbM7UNlChOPLHoxQ69ng5ki8M9w1RdU9GqsGnbbp9D rzOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=clV4Tc1E; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f22si5177428edx.204.2020.05.22.15.50.42; Fri, 22 May 2020 15:51:04 -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; dkim=pass header.i=@broadcom.com header.s=google header.b=clV4Tc1E; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731326AbgEVWtS (ORCPT + 99 others); Fri, 22 May 2020 18:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731254AbgEVWtS (ORCPT ); Fri, 22 May 2020 18:49:18 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFB06C08C5C1 for ; Fri, 22 May 2020 15:49:17 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id t7so5004534plr.0 for ; Fri, 22 May 2020 15:49:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=5Niesz+2MAyLragVp6DehMUQoLdj3CSU9Zt3Gj3FZgA=; b=clV4Tc1EUrpbmdlkOwp9Wqgo/P+RrtzAqyiBFRgmTC2+VaIklkFaWnVYOb9yytjlAB BulBPRmlvjlGei3ckNGeX2wlknWoMlQT+cyUkjqnYa5t+kqpJ2/0vmhYkNnIfzhTwXHN w4WMZhUpzH+IPlUgR8oEKOUisnTq7wpWMPPm8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=5Niesz+2MAyLragVp6DehMUQoLdj3CSU9Zt3Gj3FZgA=; b=WadGBVzG9iluN8SIR7tuMz6nzB9k1mCYvHYw4mcBJHH4DofsbPoHoGwBBjMBx3ncrF O2/hI3oLsDIk9GIUDuynSu6v1lYRF9HUCaGj32ozuVdqw7sM1hMfyXHje+zaG8cy4IqQ kZ/pgWEB1a4GeT+8zh4rgDawt856Lvj49tUCEu6cBMHi7kgS4hMUDvEHAWhJK6d3HmIz nr2fffY8/29LA6HjvfpIY/tNxbTTZpyJ5sn3eubMJquYtfCOvBIuFbnkPRC1HMeEfySq ea4KXR9vt9FdnIE7/lZGrBZHX3W22UjSDjrbGhPKShRBbbg80uMSNnaTCCHRtD/T836u 4w1A== X-Gm-Message-State: AOAM531lDVjg9yExxLuafCnDYNheBmMW0bSGDwuuQh4RVIaMgckfJpzK krLjoMc+IUh3Dgb3jFKihhBd4Q== X-Received: by 2002:a17:90a:c004:: with SMTP id p4mr7433745pjt.170.1590187757163; Fri, 22 May 2020 15:49:17 -0700 (PDT) Received: from [10.136.13.65] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id z18sm7049152pgi.68.2020.05.22.15.49.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 May 2020 15:49:16 -0700 (PDT) Subject: Re: [PATCH] firmware_loader: change enum fw_opt to u32 To: Luis Chamberlain 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 References: <20200522214658.12722-1-scott.branden@broadcom.com> <20200522224508.GE11244@42.do-not-panic.com> From: Scott Branden Message-ID: Date: Fri, 22 May 2020 15:49:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200522224508.GE11244@42.do-not-panic.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Luis, On 2020-05-22 3:45 p.m., Luis Chamberlain wrote: > 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. I do not know exactly what you are looking for then.  The FW_OPT_* values are OR'd together in the code.  You still want the fw_opt enum above left in place entirely and then the values used in OR'd together? > Luis