Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp592669pxa; Tue, 11 Aug 2020 10:09:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIhOcZQTWm2ANV40Z0AL0TjaoTbzWaaAuhnP7JQ/uPUJZA59CJjm/tbWXIlIzAUEpbK5tG X-Received: by 2002:a50:ee93:: with SMTP id f19mr272019edr.31.1597165755843; Tue, 11 Aug 2020 10:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597165755; cv=none; d=google.com; s=arc-20160816; b=n/HvM29Jdj8nLpvOkW052MNyO2/acwHbZWXo/oxdVMcLsGFcTuvEvH7ONp7peqGq/s zyJS86eb69QbpJojG82htgq/Tx+ut/uW9hurqppsRJbKUgr3TSWgIT0PdOPfnimTTpaj yeRFMjUuT+FynPMJhsRnRncYXAW5Wp98kgTohNV1EuLp/lpihAiZm5M0dM8vJwKXYwFL ivjVPbeDa/Kc1XFGN1Ui0/3dc0m343jO03PAi2u+EAqI8UIIb8S4BhZ1XeAV8Q/9lsTe zJYvuqlmnncgn4OeDnnLG4jd7y0C9OpscrR7AjRhyTdRLtiJUO9Us5S0S4HUZxQrnttl ljEA== 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 :dkim-signature; bh=ofU+hwr63ypXjfghGe4itLTXjqdyBP/VEK8bpU+JhgE=; b=oo2sAB6YB2w5HVQUS8xiHVDQRb/Nw0mKye8SRf2NOjtJCjLRfjk3jz7NmzYXRYdOk3 Nnhk9BJ1Zqj/TRhI35p8z3J+nAktPuHXKD0qpINEdeWqKUlBX05ctTtfiCFzO6PoAJpQ WtfQIgcUGU58cMKwbwFpA6TVLkyjMGBCghBmWbC5dbOM95QsbhpwmGhgzKF3AF3J4Fdf lO6vFephiORRkS50clXcqr1YQVh574b88GNUTa0nsesEAOQ8vXfMYy1OYl3JUIAFFCTy xqOsodanC0V6qlyNCqFpXt48t42Ld6gazpJMCqJ/KUK4DZQgemejsxbuBiQFukHaf3Xa q/5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q+TtcDIq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i21si13321841eje.143.2020.08.11.10.08.52; Tue, 11 Aug 2020 10:09:15 -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=@kernel.org header.s=default header.b=q+TtcDIq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729232AbgHKRGV (ORCPT + 99 others); Tue, 11 Aug 2020 13:06:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:53730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729121AbgHKRGS (ORCPT ); Tue, 11 Aug 2020 13:06:18 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5225B2076B; Tue, 11 Aug 2020 17:06:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597165577; bh=gHbIwWEGQh8BBQnvGLHlvb5XXf47uZWtZJ9RyXgxn1U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q+TtcDIqMBsKn92O1SBEGXNtPDp3KGZ5NdvmZ6C9zPphh+LRV4WaZEYUjiNnjW/pT cHY4te50ZEmPIRSzQgPTzXa0AIJfDw01LBHtzFH247bD2d5RJgTp+owoduqeb/ySPk hmsAWXgFHHtOzDtUOs9Tn2EUOu/cmrmLNmUGjFHk= Date: Tue, 11 Aug 2020 19:06:27 +0200 From: Greg KH To: Gage Eads Cc: linux-kernel@vger.kernel.org, arnd@arndb.de, magnus.karlsson@intel.com, bjorn.topel@intel.com Subject: Re: [PATCH v2 02/19] dlb2: initialize PF device Message-ID: <20200811170627.GB765993@kroah.com> References: <20200811162732.1369-1-gage.eads@intel.com> <20200811162732.1369-3-gage.eads@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200811162732.1369-3-gage.eads@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 11, 2020 at 11:27:15AM -0500, Gage Eads wrote: > The driver detects the device type (PF/VF) at probe time, and assigns the > corresponding 'ops' callbacks from that. These callbacks include mapping > and unmapping the PCI BAR space, creating/destroying the device, and > adding/deleting a char device. > > Signed-off-by: Gage Eads > Reviewed-by: Magnus Karlsson > --- > drivers/misc/dlb2/Makefile | 5 +- > drivers/misc/dlb2/dlb2_hw_types.h | 28 +++++++++ > drivers/misc/dlb2/dlb2_main.c | 49 ++++++++++++++- > drivers/misc/dlb2/dlb2_main.h | 30 +++++++++ > drivers/misc/dlb2/dlb2_pf_ops.c | 126 ++++++++++++++++++++++++++++++++++++++ > 5 files changed, 235 insertions(+), 3 deletions(-) > create mode 100644 drivers/misc/dlb2/dlb2_pf_ops.c > > diff --git a/drivers/misc/dlb2/Makefile b/drivers/misc/dlb2/Makefile > index 90ae953d2a8f..95e67e5bd8ff 100644 > --- a/drivers/misc/dlb2/Makefile > +++ b/drivers/misc/dlb2/Makefile > @@ -4,5 +4,6 @@ > > obj-$(CONFIG_INTEL_DLB2) := dlb2.o > > -dlb2-objs := \ > - dlb2_main.o \ > +dlb2-objs := \ > + dlb2_main.o \ > + dlb2_pf_ops.o \ > diff --git a/drivers/misc/dlb2/dlb2_hw_types.h b/drivers/misc/dlb2/dlb2_hw_types.h > index a0f908c603eb..10b26356535f 100644 > --- a/drivers/misc/dlb2/dlb2_hw_types.h > +++ b/drivers/misc/dlb2/dlb2_hw_types.h > @@ -5,6 +5,25 @@ > #ifndef __DLB2_HW_TYPES_H > #define __DLB2_HW_TYPES_H > > +#include > + > +#define DLB2_PCI_REG_READ(addr) ioread32(addr) > +#define DLB2_PCI_REG_WRITE(reg, value) iowrite32(value, reg) Why create a macro that is larger than the native call, this saves nothing except make the reviewer wonder what in the world is happening. Just use the real call.