Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4355319pxk; Wed, 30 Sep 2020 00:16:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzckDnW2DtXfQJcILmd+KBtwNn07qig2O2BI80NttPdMKUuQI1X4CH3/QqwTlB2XzSOpCNu X-Received: by 2002:a17:906:c007:: with SMTP id e7mr1406397ejz.55.1601450183413; Wed, 30 Sep 2020 00:16:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601450183; cv=none; d=google.com; s=arc-20160816; b=HahPoVEB1uosJ05KgxhcR4lH/DuLM02tytCWEPHX9EIusytIZZJlke/jqbc2vH1gnw 9w+o5BPXCM3cIrEKN0/f8z3rwxaeiI5aKoBMqQqptw9y1HuCjnCgmcnVVVriC5TyGp8t yiyXCBLydP5TmWlPPBDyHCDzifxUTD3ntYpzh35oO8//R4qpVcUQXKKXxDyTKmidMvNB KNy9ooynK24AzK8yrdFK3b+4dd2xVbDWOE7JbsqyuB0HjYUPBBY/JVeutQKC8cKTKkK2 8rHwSr5CBmUrqpkczHRh4nYaoPdppfjh8uMfd/ZZx6LDEYdCYhKi7RV0zyZ7Nq7cnEM+ KX4Q== 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=s1wjMNA5rw4V3d3XLlqHbiQ1yLvTv96M18kN0G/rZyI=; b=I9Tg9slhg3mYZGdfphRYkpoNSXeMSVISb+RVeQJnVMN4r1YVSIzcYBjsLY9AJUtaYM X58h/0Tn6XdlN0pu1v/NG7iBB7UuZ2EhUJOeukqYgj10OqRbKmEhs63Mjlqj6EOwmhC6 KHAw+pl29mjVjccQrty4Fxf6Tcv8V7tI7DTt+wU6+0N7YkZQbHbzLIrdrGMe0J14t9mk Lpm6TC0oAE1gqOp2Taw7SlIMijXICWj5MyiktWywA2VYiURco65HjanAL+cpGINSUcGK zQxZvjYH+++frQDiniREnggnZDLlDx/EuyRmhy+w1DyyZNAdlCejvufl5RbeVaTaG14g VNTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I6z1rjhx; 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 gc15si595059ejb.464.2020.09.30.00.16.00; Wed, 30 Sep 2020 00:16:23 -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=I6z1rjhx; 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 S1727879AbgI3HM4 (ORCPT + 99 others); Wed, 30 Sep 2020 03:12:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725786AbgI3HMz (ORCPT ); Wed, 30 Sep 2020 03:12:55 -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 9851CC0613D0 for ; Wed, 30 Sep 2020 00:12:54 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id t17so526372wmi.4 for ; Wed, 30 Sep 2020 00:12:54 -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=s1wjMNA5rw4V3d3XLlqHbiQ1yLvTv96M18kN0G/rZyI=; b=I6z1rjhxpTUdCqqIPash/YIr8P6QUv2aXnhPg8uTwj85Z5oNBI/QECc5RJan8QA3cQ 8UghgM6EeO73WiMy7AWqKLXew08cS93Tdlt9U4+pB1TLaqc0iq039W2O+Hn5dqnQfpWP WfzNAspw9wr4xE3eqW7sMDciIDlOj195Ex8oKhfRAlQSg+4iFiij63pCEkIQMUXNwnFL WgcEOj/xX1lD5+4FaiABw5fpmA/jTzWUa+tVsqWpqvqfcMetPS/12GqFjUi7ElrJ0V86 4rjLyL2bGWp9p79NbG3B4i9OOkm0vx7Xd0lbllPwBjIN435qkRo2lYkp+eb5GIgw/aYM NY9g== 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=s1wjMNA5rw4V3d3XLlqHbiQ1yLvTv96M18kN0G/rZyI=; b=kQr07KhWHts3qedfcZ2m3Z0ljjkOKgAU8DQy7rQenjkvdoRBkbeKB4QffyNWTgtonu 7xyF9WPjcYK1oCCdxVD9owbx7AXGpC9A90LeOnHlHnZdHu353+ctyDsaFJ6dJslaz9k9 nj84usJz0ng/lKFuaZObwrj9WvDTzIAe2/mTv7xrmpd7CxkK48SI9zdCih3unzq/U04U cSC9LetyQiATN3hDt3qfGontqJ+FvQ5y01egLJab9WbPi/b6kCNRY7WnWLeOK+mFEQEr phSe1jlULm7TmsNzafSSa7/Dn+QNF70tNs25+wlAWPW6HnHsmzSnkS5FkCj+oflY/Jgu 62tA== X-Gm-Message-State: AOAM530HqWXwF+qqz+iVMuvyfr1wVLFVYnTun4Jav4p5J9pC7YJHh1nv y/KLBxqqHmfyHBkC7JIaOl1Apw== X-Received: by 2002:a1c:1902:: with SMTP id 2mr1452990wmz.26.1601449973261; Wed, 30 Sep 2020 00:12:53 -0700 (PDT) Received: from dell ([91.110.221.236]) by smtp.gmail.com with ESMTPSA id q12sm1272110wrp.17.2020.09.30.00.12.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2020 00:12:52 -0700 (PDT) Date: Wed, 30 Sep 2020 08:12:50 +0100 From: Lee Jones To: "David E. Box" Cc: 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: <20200930071250.GI6148@dell> References: <20200911194549.12780-1-david.e.box@linux.intel.com> <20200911194549.12780-2-david.e.box@linux.intel.com> <20200929095106.GG6148@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > > 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. -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog