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] [day] [month] [year] [list]
Date:   Wed, 20 Jul 2022 09:19:41 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     Colin Foster <colin.foster@...advantage.com>
Cc:     devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-gpio@...r.kernel.org,
        Vladimir Oltean <vladimir.oltean@....com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Andrew Lunn <andrew@...n.ch>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Lars Povlsen <lars.povlsen@...rochip.com>,
        Steen Hegelund <Steen.Hegelund@...rochip.com>,
        UNGLinuxDriver@...rochip.com,
        Linus Walleij <linus.walleij@...aro.org>,
        Wolfram Sang <wsa@...nel.org>,
        Terry Bowman <terry.bowman@....com>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        katie.morris@...advantage.com
Subject: Re: [PATCH v13 net-next 9/9] mfd: ocelot: add support for the
 vsc7512 chip via spi

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@...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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ