From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 081D6C433F5 for ; Tue, 14 Sep 2021 08:11:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DC451604AC for ; Tue, 14 Sep 2021 08:11:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbhINIMw (ORCPT ); Tue, 14 Sep 2021 04:12:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:60950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbhINIMu (ORCPT ); Tue, 14 Sep 2021 04:12:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ED4FF60EB6; Tue, 14 Sep 2021 08:11:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631607093; bh=XgV0VOwvYlmpCGt57z0PpVVIaNEuFhMTiNswnTjNPNc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g+2g4OFaI37lXcjPLJCQ+0laA6wruiudyCf/zFuxrhhSCpwWDxenL6rtAWeDR6OwP qoM4EnRUWdvuX/xPQVORsc348Aooa0WKhnfCu0wUh0VydPo8LkaRn4DlvFPrhAovn1 uuybODtnhmLh9kjflC5slScmpz3iKy7a7WtBKNTo= Date: Tue, 14 Sep 2021 10:11:31 +0200 From: Greg Kroah-Hartman To: Chen Yu Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , Dan Williams , Andy Shevchenko , Aubrey Li , Ashok Raj , Mike Rapoport , Ard Biesheuvel , Jonathan Corbet , Hans de Goede , Maximilian Luz , Alexander Graf , Jarkko Sakkinen , Hannes Reinecke , Ioana Ciornei , Jiri Slaby , Andra Paraschiv , Randy Dunlap , Ben Widawsky , linux-doc@vger.kernel.org Subject: Re: [PATCH v2 3/5] drivers/acpi: Introduce Platform Firmware Runtime Update device driver Message-ID: References: <7a739633b30f6fb5c258f21c443ed0c17b12896f.1631600169.git.yu.c.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7a739633b30f6fb5c258f21c443ed0c17b12896f.1631600169.git.yu.c.chen@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 14, 2021 at 03:58:41PM +0800, Chen Yu wrote: > +enum start_action { > + START_STAGE, > + START_ACTIVATE, > + START_STAGE_ACTIVATE, > +}; > + > +enum dsm_status { > + DSM_SUCCEED, > + DSM_FUNC_NOT_SUPPORT, > + DSM_INVAL_INPUT, > + DSM_HARDWARE_ERR, > + DSM_RETRY_SUGGESTED, > + DSM_UNKNOWN, > + DSM_FUNC_SPEC_ERR, > +}; > + > +struct update_cap_info { > + enum dsm_status status; > + int update_cap; > + > + uuid_t code_type; > + int fw_version; > + int code_rt_version; > + > + uuid_t drv_type; > + int drv_rt_version; > + int drv_svn; > + > + uuid_t platform_id; > + uuid_t oem_id; > + > + char oem_info[]; Please use valid types for structures that cross the user/kernel boundry. > +}; > + > +struct com_buf_info { > + enum dsm_status status; > + enum dsm_status ext_status; > + unsigned long addr_lo; > + unsigned long addr_hi; > + int buf_size; > +}; Same here. > + > +struct updated_result { > + enum dsm_status status; > + enum dsm_status ext_status; > + unsigned long low_auth_time; > + unsigned long high_auth_time; > + unsigned long low_exec_time; > + unsigned long high_exec_time; And same here. And these are very odd structure names that you are adding to the "global" namespace. Please make them have a prefix for your driver so that people know what they belong to. "updated_result" is way too generic. thanks, greg k-h