Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2758521imu; Sun, 27 Jan 2019 12:23:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN5QdYt+srZYk62nxmR4xOGUaFrawXOJEjO7sLMj5B24VGnzHYC29th1JOTfxfpvznA/PYSH X-Received: by 2002:a17:902:a710:: with SMTP id w16mr18809727plq.95.1548620597850; Sun, 27 Jan 2019 12:23:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548620597; cv=none; d=google.com; s=arc-20160816; b=aJf4LEaUVPLC6IX0fcM+aW2vF8GicsMd+15oe1LM+gbJzNytmP92iIfWydrcOy6v8v TEHJg+O5nbwqdM132dveeCD7GienEtsqn7iXLNKI7dFLiFyK8nRPUBHPvLHPLAqp8ZxF Eu67TFUWX0jAuhy/4VzCLwPkwVcx5qeiQw9C9o9Sy5vh+MaBAtsSRx73MeKbt3LytRLN TY780r8raoGxp/xWu1ND1caSjhrBr+cXEtQc2VUKOvpEjvmSaIwW/5UTSVWMZyv+cjYT lWHzYrRBfVnEHcXhbOC3cTvZ5Ag8MbTL39M4SPanylRcbCkNkfmBW1xvrPfQZvxO8YsS hLWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2gSrCNxCdRFZR7oBGmVmDB1cCLwcbrNG6D6gTuZhVow=; b=XjPrCgvczrTVui2RT0sYiBW8cNtdxp8xDsq5fJ8Ofom8+4WUAS+1+MJhrvAw1Va1jc wBgRZv10aMGpZTrjv7Ynuzbv7xNxqaSkK95mkMSz7Gaqa92iaZdh3zxDqiUKznuQSDTl 5meZNVUDiiJ6qoxoIyLqKMOxnpxUTDlYHQxrcyCksR6C8kfoC3VsNmeuIv4iit72wO4L sLb+2jD7ybLM6jnhRSp2zysXFcbCJ5vZsyHELwFUg+waEXUyEO1gY79Ff6Du6V/Xc4sr cwog/96uVubgBEid2dDnyQIt1BKNr3zmD1Ils1PGZGOKHNRYaPUDOe69uXLYmUORzNRs 8Anw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PCL4KnK5; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w27si18425670pge.182.2019.01.27.12.22.49; Sun, 27 Jan 2019 12:23:17 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PCL4KnK5; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727001AbfA0UUP (ORCPT + 99 others); Sun, 27 Jan 2019 15:20:15 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42641 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726386AbfA0UUP (ORCPT ); Sun, 27 Jan 2019 15:20:15 -0500 Received: by mail-pg1-f195.google.com with SMTP id d72so6313634pga.9; Sun, 27 Jan 2019 12:20:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2gSrCNxCdRFZR7oBGmVmDB1cCLwcbrNG6D6gTuZhVow=; b=PCL4KnK5vaQoOvxRM4jvfw5I1OGMY9YopoFxL8AePa5XvvepFLg7jMEC18DOg/cRwx iMch2B4+FcmCUTj6pQTZ8sem1BKTmc+4jeOGn3ovtiPLE7zpC3ktA3sY31+qNgkiXnKx tEvjhpDwriPcJGotZS0xY4GW+ZZLKnXg/trnZ/3AJsqUK9VSr2FXIgOfJ+rrSljEvsqh nfFdgqnECRbcXF0vCOjqGqhVMqENpVfoscQiiEzZ9zvbrRBUygfzF5kYcKY9rnptnEKA QQfYkTmuJdjoheInZ9yrGGObEuKe1MVkTU/QIig1f4ULFvgEtRr1idGDqtEKgOhsugo+ 2Kaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2gSrCNxCdRFZR7oBGmVmDB1cCLwcbrNG6D6gTuZhVow=; b=osNlt4DeIQG8tfkOx1JIQnB37RnCu6cy+OSTFNmFK1AOAj/vNUx6YUSBkbnVhx2e/F xp3XNFL66PT4ri8N4xsWj3Ort50oSmsIeTHDP/+Dp+Ct15iUQblfLLaK8Pia2Q+4Avfj XywFbW6u2McDAhK8lD63biKITJTk4f3xbMSqsrQ+ruYkloksSBZyWgtYAGrbxKRoNWps 4aEoWIKB6sEeQ9gAs+Gox5uLCOJbqIGjOK70Vjl3+vSiCPDtEO1nD8nDM0wFM4LaL9nl 0QMUysDeDPsCu2dMECDl0oBc6MTI2EIAgc4RkUcoVNZvGPBkjsTxTn+9UrhW6xWh15QA gOSw== X-Gm-Message-State: AJcUuked0Er0nH202mk7FA+2OvaBcVXSEvTur+xcqwfy8y0u9D1Rzuon HxZaauBS7TB+TpNElj03mJwZDHbvCrNES2l+ajaKWGJy X-Received: by 2002:a63:f615:: with SMTP id m21mr17740573pgh.428.1548620414119; Sun, 27 Jan 2019 12:20:14 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Andy Shevchenko Date: Sun, 27 Jan 2019 22:20:02 +0200 Message-ID: Subject: Re: [PATCH v2 1/3] platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h To: Mattias Jacobsson <2pi@mok.nu> Cc: Darren Hart , Andy Shevchenko , Platform Driver , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) { > +#define WMI_MODULE_PREFIX "wmi:" > +#define WMI_GUID_STRING_LEN 36 Isn't this already defined in UUID namespace? (include/linux/uuid.h IIRC) > #include > #include > +#include Not sure it's needed since acpi.h includes that. -- With Best Regards, Andy Shevchenko