Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp244807pxk; Thu, 1 Oct 2020 00:59:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxUOHLm6mIGmVy0wY42QbkwlEyE+to50WUdfctmtx4dCKR4nEVitr7r2Irtw8NsDTf5tYG X-Received: by 2002:a50:d787:: with SMTP id w7mr6867679edi.296.1601539147416; Thu, 01 Oct 2020 00:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601539147; cv=none; d=google.com; s=arc-20160816; b=qCmVrzec3gwklBFXmqEJbu4EdQqd6px/QGU6xklY8LaLVA75t6/AbdloORfIRH6MJd mSE1BZIbWJ70LAXiAkxdGvfYAFlmBtgi4sbk0ujjTLqM73RQ58U0qbmvGZIDfHu3UrzO CIS8q1cSXXVXl9HLetf9tjV5/v3wfmA7aRb5JwskDuSAMIXdVzDJDz/3MxhLPXoEDkAx ckpjkXpX6FTd/+AdISNFcFHjRcZrq/Ez8n68Of06yLOxkiC9+JSzmtIJrXGhzgTvp4iQ 6e8N5R5Q29mCudprUcbmQbpmmO0+E0OGccNSm7ohQZe9JBukzqQiljSigjBXudAQwFFt OdEg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nxchK35WzNClqTZsaQg5x4PMi7z26OOqbOLc2gLFY54=; b=MomRevMHfm8nP1KOW5fX65JNYcgJiPhRkEy+YVyNLrGzti0hDgGQ05fVy29gH3zJMq qj0kKQ/iViCqbSTewaPT11/VurynkLbZfw+NYQ9GU3io4JI/4t4Gt4XA+9sELHwbi/qO EDSOuSWDk2AzXUhoik5QeqWzSRssNCQsRkQINROVTTxcX2+WAiqpGHetPSWqNrFKNr19 wctCAW8EEh8CYc5t0XZcJPRLrf/6Ce/+QracP6x+0QgHDubYFOZeaXA4xtDiX5zKTIBq V2cgxaZ13osOICSG0uYBCPSxI2VkOfkWQlecR9tFO5PXeZ+1I+yUJjSJUefR3YNRANov ezng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y9kN6bzX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds2si2958777ejc.117.2020.10.01.00.58.44; Thu, 01 Oct 2020 00:59:07 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=Y9kN6bzX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731714AbgJAHzR (ORCPT + 99 others); Thu, 1 Oct 2020 03:55:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726647AbgJAHzN (ORCPT ); Thu, 1 Oct 2020 03:55:13 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A009C0613E2 for ; Thu, 1 Oct 2020 00:55:13 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id x23so1899952wmi.3 for ; Thu, 01 Oct 2020 00:55:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=nxchK35WzNClqTZsaQg5x4PMi7z26OOqbOLc2gLFY54=; b=Y9kN6bzXfYnJtEnmJ0d9W1y9qoNRVuLyd0pJrpScGVCWKc2H6HTgNEGiNziQjnFGi4 W6NJJpy/mIbqaLAnEkm/Oh5qxZg+fCStul0PeHoiMOZWh5OVvuhadZcDOoXyrDBPmb2Z qf2HSt3QcUUbFNsYWxwIh8xQdjmPrksQjHMnyX/dKe3mDUJTE9dHJt8OBQ/TUagUy93E 2LES+b6jYvAbHAtkJrQ64wsr1icfil/zacXERe2n+vbhH27Qx7VB+fbER5+GN0xId2+Y I2Gxn0rijwePJaOkvi6Wv0saJknw6yYZJQF+fXZIOYu37qns3Pz8KBM6NQjOXS8etG1V yxtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=nxchK35WzNClqTZsaQg5x4PMi7z26OOqbOLc2gLFY54=; b=BqGP8dPr1bF06Y3afHOAn+R595QnvhwHkPpTDezraDZWyTMORjBXJkDwPOtfZ6E5oF r3gfKhMSf6zOLrg/B3EqCjT9C2v9j4BpJ+8gsKHVC/G0jruYqAFl2EpDKr3SkvjQtnjP 4uRbbo5pjGRoNOvgaCI2acy9eQh6jtdjQdxBSBdGwGXZFNq2KNsqgZYAgzjEPKs4E3jK tlVOOwpnYpLoMMvEpC7XM8QyUkJJ3DuJJ8bg2qsoyzSwrTK0UcwNYmdjlApDdi9/6hM1 Gg0ZSOfgWpzgajByT5mOvuWejJtwync+Bpm+yAwtuUtbYY8FW2rrB86bNn2Gf+1JVURT TJIw== X-Gm-Message-State: AOAM531nUt0U2vqDzWxiSVJMQECqkuLwKdjYwg85h8XsepfKPtcMnJBi fE6++R2Uzrfvmf8Dv5dNMRde8lSGpuBf0A== X-Received: by 2002:a1c:f208:: with SMTP id s8mr7319753wmc.85.1601538911977; Thu, 01 Oct 2020 00:55:11 -0700 (PDT) Received: from dell ([91.110.221.236]) by smtp.gmail.com with ESMTPSA id t17sm7411493wrx.82.2020.10.01.00.55.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Oct 2020 00:55:11 -0700 (PDT) Date: Thu, 1 Oct 2020 08:55:07 +0100 From: Lee Jones To: "David E. Box" Cc: hdegoede@redhat.com, andriy.shevchenko@linux.intel.com, dvhart@infradead.org, andy@infradead.org, alexander.h.duyck@linux.intel.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: Re: [PATCH 1/3] mfd: intel_pmt: Add OOBMSM device ID Message-ID: <20201001075507.GK6148@dell> References: <20200911194549.12780-1-david.e.box@linux.intel.com> <20200911194549.12780-2-david.e.box@linux.intel.com> <20200929095106.GG6148@dell> <20200930071250.GI6148@dell> <47276f4aacbf4ec3729e674a573a28cd6399cfd6.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <47276f4aacbf4ec3729e674a573a28cd6399cfd6.camel@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 30 Sep 2020, David E. Box wrote: > On Wed, 2020-09-30 at 08:12 +0100, Lee Jones wrote: > > On Tue, 29 Sep 2020, David E. Box wrote: > > > > > On Tue, 2020-09-29 at 10:51 +0100, Lee Jones wrote: > > > > On Fri, 11 Sep 2020, David E. Box wrote: > > > > > > > > > Add Out of Band Management Services Module device ID to Intel > > > > > PMT > > > > > driver. > > > > > > > > > > Signed-off-by: Alexander Duyck < > > > > > alexander.h.duyck@linux.intel.com> > > > > > Signed-off-by: David E. Box > > > > > --- > > > > > drivers/mfd/intel_pmt.c | 4 ++++ > > > > > 1 file changed, 4 insertions(+) > > > > > > > > > > diff --git a/drivers/mfd/intel_pmt.c b/drivers/mfd/intel_pmt.c > > > > > index 0e572b105101..8f9970ab3026 100644 > > > > > --- a/drivers/mfd/intel_pmt.c > > > > > +++ b/drivers/mfd/intel_pmt.c > > > > > @@ -55,6 +55,8 @@ struct pmt_platform_info { > > > > > unsigned long quirks; > > > > > }; > > > > > > > > > > +static const struct pmt_platform_info pmt_info; > > > > > + > > > > > static const struct pmt_platform_info tgl_info = { > > > > > .quirks = PMT_QUIRK_NO_WATCHER | PMT_QUIRK_NO_CRASHLOG > > > > > | > > > > > PMT_QUIRK_TABLE_SHIFT, > > > > > @@ -200,8 +202,10 @@ static void pmt_pci_remove(struct pci_dev > > > > > *pdev) > > > > > pm_runtime_get_sync(&pdev->dev); > > > > > } > > > > > > > > > > +#define PCI_DEVICE_ID_INTEL_PMT_OOBMSM 0x09a7 > > > > > #define PCI_DEVICE_ID_INTEL_PMT_TGL 0x9a0d > > > > > static const struct pci_device_id pmt_pci_ids[] = { > > > > > + { PCI_DEVICE_DATA(INTEL, PMT_OOBMSM, &pmt_info) }, > > > > > > > > Why are you supplying an empty struct? > > > > > > Because the OOBMSM device doesn't need code provided driver data, > > > but > > > info is dereferenced in several areas. We also use kmemdup to copy > > > driver_data under the assumption that it was provided. We could > > > allow > > > for NULL if driver_data is referenced directly. > > > > Just check for NULL. No need to create and send bogus data. > > Sure. If you haven't already, please note that this patch was pulled > into the V6 series in the link below. You accepted V5 but Hans > suggested some late changes after reviewing the new crashlog driver in > this patchset. So rather than have separate patchsets with a > dependency, we bundled them all into the original. We'll make these > changes in V7 now. > > https://lore.kernel.org/patchwork/patch/1313166/ Sounds reasonable. -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog