Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6221325pxb; Mon, 8 Nov 2021 05:15:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyzu0CC912jFu+EVJ9WGXm0G+VmOytc38HKPmwXoMaBq1i11YIjgAZmbXH/8M9v6qeisUJ X-Received: by 2002:a6b:6812:: with SMTP id d18mr7074756ioc.47.1636377318260; Mon, 08 Nov 2021 05:15:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636377318; cv=none; d=google.com; s=arc-20160816; b=ANjSmWbJBLiasT+Rq5U/ockTniDLj8bu3MeUlQJfrUvtETBp4SmCIBnmwo/aL9ZxgZ 6aBgpNTybg/BaNmB7rRNpHXKP+QY+OZkWyzEOGd+qN2Lh/jd70MARfkUasBw3GFNprAo aDgZy+bczmFcL6HgmzOPDhOKsOOJEK4nW2e5bQBZmlFLd+0W+e1Z2myl3Z4R0HhlJ4lp GYQ1s3oYkTpg+ZpmzGzDDOnZ6dsJA2uK7ydL6PHEJmKi4WKpB5jKg9P8iPjmwgDzHg/d m1ArQm8aA7ZjmLQhj718vxP63bB7V/kaE3aRezPI3w0giiOOnVXeCUzrm9KLdWmFdbcS 3fnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Yio0pE/++eD8V0HSu2pAYmcy8Os84dXQBBfm3nKVpMw=; b=mhFe0JwjcMi3rODeR2/9QbhExpky25leFUnjWfHVI1xYXZmIRA1XqgZHs17tOh8z6i URSiMhYTybZxgqbYz8QdWJP8LtHyDL5xk7TkgAjDbx3YwuJ7qT2k1L92bdvdwIo5OAnx Xz3QcWD+LOfbfbnbBjIE8ZBgFB1bwNQtbo5ISleAFGYHz5aczZTOCredKLBUY3C4vG+g +hYw06scrpLf/Cmzsj3xqa6eVy7vxBXcQX5dVPAtolOm5dhgHqZs2HKipmxhHidZtpPI MuMEjUziKmLpLB+MuRCeEUSg7bR5HaGpBC+4o+SbYx6gUw++yWIx9rzO6XAW7QeD1X6t c3Ww== 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si13715246iow.93.2021.11.08.05.15.04; Mon, 08 Nov 2021 05:15:18 -0800 (PST) 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238328AbhKHJXY (ORCPT + 99 others); Mon, 8 Nov 2021 04:23:24 -0500 Received: from mga09.intel.com ([134.134.136.24]:43643 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236719AbhKHJXX (ORCPT ); Mon, 8 Nov 2021 04:23:23 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10161"; a="232038327" X-IronPort-AV: E=Sophos;i="5.87,218,1631602800"; d="scan'208";a="232038327" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2021 01:20:38 -0800 X-IronPort-AV: E=Sophos;i="5.87,218,1631602800"; d="scan'208";a="668941384" Received: from smile.fi.intel.com ([10.237.72.184]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2021 01:20:35 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1mk0pC-004cO3-S3; Mon, 08 Nov 2021 11:20:22 +0200 Date: Mon, 8 Nov 2021 11:20:22 +0200 From: Andy Shevchenko To: Chen Yu Cc: linux-acpi@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , Ard Biesheuvel , Len Brown , Ashok Raj , Mike Rapoport , Aubrey Li , linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 2/4] drivers/acpi: Introduce Platform Firmware Runtime Update device driver Message-ID: References: <01f8f7d23926dcdb054e5ac170ddcbbdb0aed560.1635953446.git.yu.c.chen@intel.com> <20211106151456.GA570347@chenyu-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211106151456.GA570347@chenyu-desktop> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 06, 2021 at 11:14:56PM +0800, Chen Yu wrote: > On Wed, Nov 03, 2021 at 07:32:09PM +0200, Andy Shevchenko wrote: > > On Wed, Nov 03, 2021 at 11:43:50PM +0800, Chen Yu wrote: ... > > > +enum cap_index { > > > + CAP_STATUS_IDX = 0, > > > + CAP_UPDATE_IDX = 1, > > > + CAP_CODE_TYPE_IDX = 2, > > > + CAP_FW_VER_IDX = 3, > > > + CAP_CODE_RT_VER_IDX = 4, > > > + CAP_DRV_TYPE_IDX = 5, > > > + CAP_DRV_RT_VER_IDX = 6, > > > + CAP_DRV_SVN_IDX = 7, > > > + CAP_PLAT_ID_IDX = 8, > > > + CAP_OEM_ID_IDX = 9, > > > + CAP_OEM_INFO_IDX = 10, > > > > > + CAP_NR_IDX = 11 > > > > Assignment here doesn't make any sense (it just adds unneeded churn and > > burden). Same to the rest of similar cases below. > > > Greg mentioned that, we might need to "explicit about the numbers here, because it > is uncerntain this is guaranteed by all C compilers or not." > https://lore.kernel.org/lkml/YXj+QaMcCeV71XbI@kroah.com/ > My understanding is that, this applys to both uapi headers and the kernel internal > headers. I was talking only about the last item. This is guaranteed to be LAST+1 by the C standard and any deviation from that is a compiler bug that must be fixed. The first elements may be explicitly defined so we will be sure they are always stay. Greg is right about it. > > > +}; -- With Best Regards, Andy Shevchenko