Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3491811imu; Mon, 28 Jan 2019 05:55:39 -0800 (PST) X-Google-Smtp-Source: ALg8bN6k2zHqBTaeXoQS0G0CX1BV39e+GawMiexPN2g5HuSkMCqLRBfm51BapCikVHxIMmIrTznO X-Received: by 2002:a63:5026:: with SMTP id e38mr19989091pgb.123.1548683739083; Mon, 28 Jan 2019 05:55:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548683739; cv=none; d=google.com; s=arc-20160816; b=YlRwH1Xi7MoQK8L7GZgjkD2/cfZPfLTs45z4sFqkbJzxmpJjZC/uaH6D2Gwx7Qnk+c 9YMH+w2U66QTuMaQg7HS9yj9notWkU7xComtnlxMAJubJttHpxlNV7mYBoodXx6FaLgn mHRRe74m+KKjpZFdk3qiTZGCxX+kRR09AWqqTRNG8LccyBWwyQv4LdYDCcc+Dxy0fTa5 TP13UOHD+h4EFjk/P5BKLpogSRJdfVBiii7z0Hwd5OrDJrlQD1DJvFKVCXs8wpc9rG+g 8YDDHmWbtvP2efa6cR9Pu2OUvvbk6CkZzhl8SQojdCFLmqVsHdwo5tlCsKLki3coURvX ekCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=tLP8rzeHBlwlrGzBgG+gK+3RZs2emDrJny76a6FBSrM=; b=OsOanOwXVspnoIq8jvVAn7Ay1Phm0WgsyNSD+p4+aGwVCs/3degwR5FLI6khEvQHo+ 8x7OMrSrEf95zbjgZ96Gr1iCxT7BtH82mQT5rbue011QnxBTyKmR7op8bIZbn6wy4QdZ Enez0+yKjAK4spZP7CRNB0GsY24DKi5/8GjLLsCt/G+oWFfgxHMTBKO1dzLSfZbKTrrR GYg8+OSgB02zBl9+vqDJD2F9wrNWWnM74N/d1Nu9HOV5JGrjnS7vNXVk05a8hFHVcPQJ LfUli/2Q84COFVDFvI2v0u6vB6cPa3FZ4QS2x7aI+q+Eo63kaY79NKm+R4kDezrENuAJ 9kdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mok.nu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a1si3435431pgk.495.2019.01.28.05.55.23; Mon, 28 Jan 2019 05:55:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mok.nu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726750AbfA1NzH (ORCPT + 99 others); Mon, 28 Jan 2019 08:55:07 -0500 Received: from route-level1.fsdata.se ([89.221.252.216]:12205 "EHLO route-level1.fsdata.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726647AbfA1NzG (ORCPT ); Mon, 28 Jan 2019 08:55:06 -0500 Received: from DAG01.HMC.local (192.168.46.11) by EDGE01LEVEL1.hmc.local (192.168.46.33) with Microsoft SMTP Server (TLS) id 15.0.847.32; Mon, 28 Jan 2019 14:54:41 +0100 Received: from localhost (94.234.46.36) by DAG01.HMC.local (192.168.46.11) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Mon, 28 Jan 2019 14:54:43 +0100 Date: Mon, 28 Jan 2019 14:54:37 +0100 From: Mattias Jacobsson <2pi@mok.nu> To: Andy Shevchenko CC: Darren Hart , Andy Shevchenko , Platform Driver , "Linux Kernel Mailing List" , <2pi@mok.nu> Subject: Re: [PATCH v2 1/3] platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h Message-ID: <20190128135437.qetbebros3xkayyn@mok.nu> References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-Originating-IP: [94.234.46.36] X-ClientProxiedBy: PROXY04.HMC.local (192.168.46.54) To DAG01.HMC.local (192.168.46.11) Received-SPF: Neutral (EDGE01LEVEL1.hmc.local: 192.168.46.11 is neither permitted nor denied by domain of 2pi@mok.nu) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, Thanks for reviewing! On 2019-01-27, Andy Shevchenko wrote: > On Sun, Jan 27, 2019 at 9:04 PM Mattias Jacobsson <2pi@mok.nu> wrote: > > > > In preparation for adding WMI support to MODULE_DEVICE_TABLE() move the > > definition of struct wmi_device_id to mod_devicetable.h and inline > > guid_string in the struct. > > > > Changing guid_string to an inline char array changes the loop conditions > > when looping over an array of struct wmi_device_id. Therefore update > > wmi_dev_match()'s loop to check for an empty guid_string instead of a > > NULL pointer. > > Below some minor comments. > > > - while (id->guid_string) { > > + while (id->guid_string[0] != '\0') { > > Hmm.. I would rather put it as > > while (*id->guid_string) { Sure. > > > +#define WMI_MODULE_PREFIX "wmi:" > > > +#define WMI_GUID_STRING_LEN 36 > > Isn't this already defined in UUID namespace? > (include/linux/uuid.h IIRC) Kind of, UUID_STRING_LEN is defined in uuid.h. It is included behind a #ifdef __KERNEL__, but others seam to use things included through it so I guess it is alright... Let me know how you want it. > > > #include > > #include > > > +#include > > Not sure it's needed since acpi.h includes that. It is included in acpi.h(behind CONFIG_ACPI), I thought it was cleaner with it included explicitly. Plus that we aren't relying on others to include it. Let me know how you want it. > > -- > With Best Regards, > Andy Shevchenko Thanks, Mattias