All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Colin Foster <colin.foster@in-advantage.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-gpio@vger.kernel.org,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Lars Povlsen <lars.povlsen@microchip.com>,
	Steen Hegelund <Steen.Hegelund@microchip.com>,
	UNGLinuxDriver@microchip.com,
	Linus Walleij <linus.walleij@linaro.org>,
	Wolfram Sang <wsa@kernel.org>,
	Terry Bowman <terry.bowman@amd.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	katie.morris@in-advantage.com
Subject: Re: [PATCH v13 net-next 9/9] mfd: ocelot: add support for the vsc7512 chip via spi
Date: Wed, 20 Jul 2022 09:19:41 +0100	[thread overview]
Message-ID: <Yte6nTJ3IMJhdLAp@google.com> (raw)
In-Reply-To: <Ytbuj6qfUj1NOitS@euler>

On Tue, 19 Jul 2022, Colin Foster wrote:

> On Mon, Jul 18, 2022 at 03:18:28PM +0100, Lee Jones wrote:
> > On Tue, 05 Jul 2022, Colin Foster wrote:
> > 
> > > +MODULE_IMPORT_NS(MFD_OCELOT_SPI);
> > > diff --git a/drivers/mfd/ocelot-spi.c b/drivers/mfd/ocelot-spi.c
> > > new file mode 100644
> > > index 000000000000..0c1c5215c706
> > > --- /dev/null
> > > +++ b/drivers/mfd/ocelot-spi.c
> > > @@ -0,0 +1,317 @@
> > > +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> > > +/*
> > > + * SPI core driver for the Ocelot chip family.
> > > + *
> > > + * This driver will handle everything necessary to allow for communication over
> > > + * SPI to the VSC7511, VSC7512, VSC7513 and VSC7514 chips. The main functions
> > > + * are to prepare the chip's SPI interface for a specific bus speed, and a host
> > > + * processor's endianness. This will create and distribute regmaps for any
> > > + * children.
> > > + *
> > > + * Copyright 2021, 2022 Innovative Advantage Inc.
> > > + *
> > > + * Author: Colin Foster <colin.foster@in-advantage.com>
> > > + */
> > > +
> > > +#include <linux/ioport.h>
> > > +#include <linux/kconfig.h>
> > > +#include <linux/module.h>
> > > +#include <linux/regmap.h>
> > > +#include <linux/spi/spi.h>
> > > +
> > > +#include <asm/byteorder.h>
> > > +
> > > +#include "ocelot.h"
> > > +
> > > +#define REG_DEV_CPUORG_IF_CTRL		0x0000
> > > +#define REG_DEV_CPUORG_IF_CFGSTAT	0x0004
> > > +
> > > +#define CFGSTAT_IF_NUM_VCORE		(0 << 24)
> > > +#define CFGSTAT_IF_NUM_VRAP		(1 << 24)
> > > +#define CFGSTAT_IF_NUM_SI		(2 << 24)
> > > +#define CFGSTAT_IF_NUM_MIIM		(3 << 24)
> > > +
> > > +#define VSC7512_DEVCPU_ORG_RES_START	0x71000000
> > > +#define VSC7512_DEVCPU_ORG_RES_SIZE	0x38
> > > +
> > > +#define VSC7512_CHIP_REGS_RES_START	0x71070000
> > > +#define VSC7512_CHIP_REGS_RES_SIZE	0x14
> > > +
> > > +struct spi_device;
> > 
> > Why not just #include?
> 
> I mis-understood this to mean drivers/mfd/ocelot-spi.c when it meant
> drivers/mfd/ocelot.h. Thanks.
> 
> https://patchwork.kernel.org/project/netdevbpf/patch/20220701192609.3970317-10-colin.foster@in-advantage.com/#24921057
> 
> """
> You missed a lot of forward declarations that are used in this file.
> 
> Like
> 
> struct spi_device;
> """

spi_device is used in *this* file.

You should explicitly add the include file.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Colin Foster <colin.foster@in-advantage.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-gpio@vger.kernel.org,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Lars Povlsen <lars.povlsen@microchip.com>,
	Steen Hegelund <Steen.Hegelund@microchip.com>,
	UNGLinuxDriver@microchip.com,
	Linus Walleij <linus.walleij@linaro.org>,
	Wolfram Sang <wsa@kernel.org>,
	Terry Bowman <terry.bowman@amd.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	katie.morris@in-advantage.com
Subject: Re: [PATCH v13 net-next 9/9] mfd: ocelot: add support for the vsc7512 chip via spi
Date: Wed, 20 Jul 2022 09:19:41 +0100	[thread overview]
Message-ID: <Yte6nTJ3IMJhdLAp@google.com> (raw)
In-Reply-To: <Ytbuj6qfUj1NOitS@euler>

On Tue, 19 Jul 2022, Colin Foster wrote:

> On Mon, Jul 18, 2022 at 03:18:28PM +0100, Lee Jones wrote:
> > On Tue, 05 Jul 2022, Colin Foster wrote:
> > 
> > > +MODULE_IMPORT_NS(MFD_OCELOT_SPI);
> > > diff --git a/drivers/mfd/ocelot-spi.c b/drivers/mfd/ocelot-spi.c
> > > new file mode 100644
> > > index 000000000000..0c1c5215c706
> > > --- /dev/null
> > > +++ b/drivers/mfd/ocelot-spi.c
> > > @@ -0,0 +1,317 @@
> > > +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> > > +/*
> > > + * SPI core driver for the Ocelot chip family.
> > > + *
> > > + * This driver will handle everything necessary to allow for communication over
> > > + * SPI to the VSC7511, VSC7512, VSC7513 and VSC7514 chips. The main functions
> > > + * are to prepare the chip's SPI interface for a specific bus speed, and a host
> > > + * processor's endianness. This will create and distribute regmaps for any
> > > + * children.
> > > + *
> > > + * Copyright 2021, 2022 Innovative Advantage Inc.
> > > + *
> > > + * Author: Colin Foster <colin.foster@in-advantage.com>
> > > + */
> > > +
> > > +#include <linux/ioport.h>
> > > +#include <linux/kconfig.h>
> > > +#include <linux/module.h>
> > > +#include <linux/regmap.h>
> > > +#include <linux/spi/spi.h>
> > > +
> > > +#include <asm/byteorder.h>
> > > +
> > > +#include "ocelot.h"
> > > +
> > > +#define REG_DEV_CPUORG_IF_CTRL		0x0000
> > > +#define REG_DEV_CPUORG_IF_CFGSTAT	0x0004
> > > +
> > > +#define CFGSTAT_IF_NUM_VCORE		(0 << 24)
> > > +#define CFGSTAT_IF_NUM_VRAP		(1 << 24)
> > > +#define CFGSTAT_IF_NUM_SI		(2 << 24)
> > > +#define CFGSTAT_IF_NUM_MIIM		(3 << 24)
> > > +
> > > +#define VSC7512_DEVCPU_ORG_RES_START	0x71000000
> > > +#define VSC7512_DEVCPU_ORG_RES_SIZE	0x38
> > > +
> > > +#define VSC7512_CHIP_REGS_RES_START	0x71070000
> > > +#define VSC7512_CHIP_REGS_RES_SIZE	0x14
> > > +
> > > +struct spi_device;
> > 
> > Why not just #include?
> 
> I mis-understood this to mean drivers/mfd/ocelot-spi.c when it meant
> drivers/mfd/ocelot.h. Thanks.
> 
> https://patchwork.kernel.org/project/netdevbpf/patch/20220701192609.3970317-10-colin.foster@in-advantage.com/#24921057
> 
> """
> You missed a lot of forward declarations that are used in this file.
> 
> Like
> 
> struct spi_device;
> """

spi_device is used in *this* file.

You should explicitly add the include file.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-07-20  8:19 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05 20:47 [PATCH v13 net-next 0/9] add support for VSC7512 control over SPI Colin Foster
2022-07-05 20:47 ` Colin Foster
2022-07-05 20:47 ` [PATCH v13 net-next 1/9] mfd: ocelot: add helper to get regmap from a resource Colin Foster
2022-07-05 20:47   ` Colin Foster
2022-07-09 18:56   ` Vladimir Oltean
2022-07-09 18:56     ` Vladimir Oltean
2022-07-05 20:47 ` [PATCH v13 net-next 2/9] net: mdio: mscc-miim: add ability to be used in a non-mmio configuration Colin Foster
2022-07-05 20:47   ` Colin Foster
2022-07-09 18:57   ` Vladimir Oltean
2022-07-09 18:57     ` Vladimir Oltean
2022-07-11 18:22   ` Jakub Kicinski
2022-07-11 18:22     ` Jakub Kicinski
2022-07-05 20:47 ` [PATCH v13 net-next 3/9] pinctrl: ocelot: allow pinctrl-ocelot to be loaded as a module Colin Foster
2022-07-05 20:47   ` Colin Foster
2022-07-05 20:47 ` [PATCH v13 net-next 4/9] pinctrl: ocelot: add ability to be used in a non-mmio configuration Colin Foster
2022-07-05 20:47   ` Colin Foster
2022-07-09 18:59   ` Vladimir Oltean
2022-07-09 18:59     ` Vladimir Oltean
2022-07-11  8:20   ` Linus Walleij
2022-07-11  8:20     ` Linus Walleij
2022-07-05 20:47 ` [PATCH v13 net-next 5/9] pinctrl: microchip-sgpio: allow sgpio driver to be used as a module Colin Foster
2022-07-05 20:47   ` Colin Foster
2022-07-05 20:47 ` [PATCH v13 net-next 6/9] pinctrl: microchip-sgpio: add ability to be used in a non-mmio configuration Colin Foster
2022-07-05 20:47   ` Colin Foster
2022-07-09 18:58   ` Vladimir Oltean
2022-07-09 18:58     ` Vladimir Oltean
2022-07-11  8:19   ` Linus Walleij
2022-07-11  8:19     ` Linus Walleij
2022-07-05 20:47 ` [PATCH v13 net-next 7/9] resource: add define macro for register address resources Colin Foster
2022-07-05 20:47   ` Colin Foster
2022-07-09 19:00   ` Vladimir Oltean
2022-07-09 19:00     ` Vladimir Oltean
2022-07-05 20:47 ` [PATCH v13 net-next 8/9] dt-bindings: mfd: ocelot: add bindings for VSC7512 Colin Foster
2022-07-05 20:47   ` Colin Foster
2022-07-11 13:25   ` Vladimir Oltean
2022-07-11 13:25     ` Vladimir Oltean
2022-07-05 20:47 ` [PATCH v13 net-next 9/9] mfd: ocelot: add support for the vsc7512 chip via spi Colin Foster
2022-07-05 20:47   ` Colin Foster
2022-07-11 13:27   ` Vladimir Oltean
2022-07-11 13:27     ` Vladimir Oltean
2022-07-18 14:18   ` Lee Jones
2022-07-18 14:18     ` Lee Jones
2022-07-18 16:24     ` Colin Foster
2022-07-18 16:24       ` Colin Foster
2022-07-19 17:49     ` Colin Foster
2022-07-19 17:49       ` Colin Foster
2022-07-20  8:19       ` Lee Jones [this message]
2022-07-20  8:19         ` Lee Jones
2022-07-09  3:09 ` [PATCH v13 net-next 0/9] add support for VSC7512 control over SPI Jakub Kicinski
2022-07-09  3:09   ` Jakub Kicinski
2022-07-11  7:51   ` Lee Jones
2022-07-11  7:51     ` Lee Jones
2022-07-11 18:21     ` Jakub Kicinski
2022-07-11 18:21       ` Jakub Kicinski
2022-07-12  2:10       ` Colin Foster
2022-07-12  2:10         ` Colin Foster
2022-07-12 22:08         ` Vladimir Oltean
2022-07-12 22:08           ` Vladimir Oltean
2022-07-15 16:57           ` Colin Foster
2022-07-15 16:57             ` Colin Foster
2022-07-18  8:14             ` Lee Jones
2022-07-18  8:14               ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yte6nTJ3IMJhdLAp@google.com \
    --to=lee.jones@linaro.org \
    --cc=Steen.Hegelund@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=andy.shevchenko@gmail.com \
    --cc=colin.foster@in-advantage.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=katie.morris@in-advantage.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=lars.povlsen@microchip.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=terry.bowman@amd.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.