Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6293872pxb; Mon, 8 Nov 2021 06:24:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJznmMI4SSdIqEkUxMsMqtKwMd9MOKWFaqc1mATW91O12WfA6TMwXZ16LTYNYbpRmn5CIWVq X-Received: by 2002:a17:906:314e:: with SMTP id e14mr243025eje.165.1636381453910; Mon, 08 Nov 2021 06:24:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636381453; cv=none; d=google.com; s=arc-20160816; b=q7vIfp+cjAeZxMvdzwEZ5kvTtDcpXZbZ9T8MUn8ym3KyoeruFvjWaM0KejqsThhDv6 QTqf0lADmZ//tcn8FOk3reL1e2MLV/icVDEdAu0J4/3KGdfChEy66mlmf4SqxDN2DSHR BpBqfUQ8VRRgOjCVbWSHes1Qo5OZH0g+LIFeZLWeorSa7CirIEoCGqt/E9Xk3AvQN2qE V7BuUjaF1lGPhhCRhCwR2yV8MvXDz7s8UDPqNynGvXnyv2vmQwU2iKpEWj8mxX/AZuvn 1ekCtMBDFqG6DeIqmJnDk3lsBDb/Evyclr3gWVQqZ+CD3cGZTMpEihLW0UCHTlSZFKJN qH8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=9jw6FtmIqAj+JJEBK+b+bOdgxzhIklBRqqLe+5alLPo=; b=aRMPM+d1BZeMpm6DdmYA+NboFIbu/64Idg7rKix2KpBsBbBHQ2/AD2gQ8+nrqqpu/H qJ/z0lzzndtdL/lc511QyWNfXC+ZFn0uStQaMkVnE1/TbKEG26EgFrXN9SVobWhaaLZS htOJjvJ0v+hh4hMTZ7T/k9LfPhSbEdu47OJUnFZAZYGw6mOaq2XCR6RRSRMOa5TodTi7 HrUB/l94/tPAk3P3O7e5oprHpsYVb/8csJCAbioWLaDrqoEglEYx+NafwAuZKKx6cs3h Aov8v7Su6L2syfTpe0KjK/Av66B+l7J0dES89d9iqqQP4SS9JZH5I06rj2yWWV+0GHwa f8Tg== 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 ne38si33913021ejc.97.2021.11.08.06.23.50; Mon, 08 Nov 2021 06:24:13 -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 S239419AbhKHMLl (ORCPT + 99 others); Mon, 8 Nov 2021 07:11:41 -0500 Received: from mga05.intel.com ([192.55.52.43]:8780 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239399AbhKHMLe (ORCPT ); Mon, 8 Nov 2021 07:11:34 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10161"; a="318411634" X-IronPort-AV: E=Sophos;i="5.87,218,1631602800"; d="scan'208";a="318411634" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2021 04:08:48 -0800 X-IronPort-AV: E=Sophos;i="5.87,218,1631602800"; d="scan'208";a="502992384" Received: from chenyu-desktop.sh.intel.com (HELO chenyu-desktop) ([10.239.158.186]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2021 04:08:44 -0800 Date: Mon, 8 Nov 2021 20:08:00 +0800 From: Chen Yu To: Andy Shevchenko 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: <20211108120800.GA619906@chenyu-desktop> 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 08, 2021 at 11:20:22AM +0200, Andy Shevchenko wrote: > 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. > Ok, got it. Previously I've sent a v9 patch set that addressed the issues in v8, except for this enum issue. I'll wait for a day or two, if there is no further comments on v9, I'll send a refreshed v10 with this enum issue fixed. thanks, Chenyu