lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200811170627.GB765993@kroah.com>
Date:   Tue, 11 Aug 2020 19:06:27 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Gage Eads <gage.eads@...el.com>
Cc:     linux-kernel@...r.kernel.org, arnd@...db.de,
        magnus.karlsson@...el.com, bjorn.topel@...el.com
Subject: Re: [PATCH v2 02/19] dlb2: initialize PF device

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 <gage.eads@...el.com>
> Reviewed-by: Magnus Karlsson <magnus.karlsson@...el.com>
> ---
>  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 <linux/io.h>
> +
> +#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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ