Re: [PATCH v2 15/34] misc: xlink-pcie: Add XLink API interface

From: mark gross
Date: Thu Jan 21 2021 - 18:23:34 EST


On Wed, Jan 20, 2021 at 06:59:33PM +0100, Greg KH wrote:
> On Fri, Jan 08, 2021 at 01:25:41PM -0800, mgross@xxxxxxxxxxxxxxx wrote:
> > From: Srikanth Thokala <srikanth.thokala@xxxxxxxxx>
> >
> > Provide interface for XLink layer to interact with XLink PCIe transport
> > layer on both local host and remote host.
> >
> > Cc: Arnd Bergmann <arnd@xxxxxxxx>
> > Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > Reviewed-by: Mark Gross <mgross@xxxxxxxxxxxxxxx>
> > Signed-off-by: Srikanth Thokala <srikanth.thokala@xxxxxxxxx>
> > ---
> > drivers/misc/xlink-pcie/common/interface.c | 109 +++++++++++++++++++
> > drivers/misc/xlink-pcie/local_host/Makefile | 1 +
> > drivers/misc/xlink-pcie/remote_host/Makefile | 1 +
> > 3 files changed, 111 insertions(+)
> > create mode 100644 drivers/misc/xlink-pcie/common/interface.c
> >
> > diff --git a/drivers/misc/xlink-pcie/common/interface.c b/drivers/misc/xlink-pcie/common/interface.c
> > new file mode 100644
> > index 000000000000..56c1d9ed9d8f
> > --- /dev/null
> > +++ b/drivers/misc/xlink-pcie/common/interface.c
> > @@ -0,0 +1,109 @@
> > +// SPDX-License-Identifier: GPL-2.0-only
> > +/*****************************************************************************
> > + *
> > + * Intel Keem Bay XLink PCIe Driver
> > + *
> > + * Copyright (C) 2020 Intel Corporation
> > + *
> > + ****************************************************************************/
>
> Do you really need the ******* mess? :)
>
> > +
> > +#include <linux/xlink_drv_inf.h>
> > +
> > +#include "core.h"
> > +#include "xpcie.h"
> > +
> > +/* Define xpcie driver interface API */
> > +int xlink_pcie_get_device_list(u32 *sw_device_id_list, u32 *num_devices)
> > +{
> > + if (!sw_device_id_list || !num_devices)
> > + return -EINVAL;
> > +
> > + *num_devices = intel_xpcie_get_device_num(sw_device_id_list);
> > +
> > + return 0;
> > +}
> > +EXPORT_SYMBOL(xlink_pcie_get_device_list);
>
> EXPORT_SYMBOL_GPL() for all of these perhaps? I have to ask...
I can't think of a reason why not using the _GPL flavor of export symbol. I'll
change them all if that's desired.

--mark
>
> thanks,
>
> greg k-h