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]
Date:	Wed, 25 Nov 2015 12:37:31 -0000
From:	"Simon Arlott" <simon@...e.lp0.eu>
To:	"Jonas Gorski" <jogo@...nwrt.org>
Cc:	"Florian Fainelli" <f.fainelli@...il.com>,
	"Rob Herring" <robh@...nel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"Brian Norris" <computersforpeace@...il.com>,
	"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
	"David Woodhouse" <dwmw2@...radead.org>,
	"MTD Maling List" <linux-mtd@...ts.infradead.org>,
	"Pawel Moll" <pawel.moll@....com>,
	"Mark Rutland" <mark.rutland@....com>,
	"Ian Campbell" <ijc+devicetree@...lion.org.uk>,
	"Kumar Gala" <galak@...eaurora.org>
Subject: Re: [PATCH (v6) 2/2] mtd: brcmnand: Add support for the BCM63268

On Wed, November 25, 2015 10:44, Jonas Gorski wrote:
> On Tue, Nov 24, 2015 at 9:21 PM, Simon Arlott <simon@...e.lp0.eu> wrote:
>> The BCM63268 has a NAND interrupt register with combined status and enable
>> registers. It also has a clock for the NAND controller that needs to be
>> enabled.
>>
>> Set up the device by enabling the clock, disabling and acking all
>> interrupts, then handle the CTRL_READY interrupt.
>>
>> Add a brcmnand_get_socdata() function so that bcm63268_nand can obtain its
>> data and disable the clock when the device is removed.
>
> To me this now mostly looks good, one thing though ...
> (snip)
>> diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c
>> index 2c8f67f..99ca69e 100644
>> --- a/drivers/mtd/nand/brcmnand/brcmnand.c
>> +++ b/drivers/mtd/nand/brcmnand/brcmnand.c
>> @@ -2262,6 +2262,13 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc)
>>  }
>>  EXPORT_SYMBOL_GPL(brcmnand_probe);
>>
>> +struct brcmnand_soc *brcmnand_get_socdata(struct platform_device *pdev)
>> +{
>> +       struct brcmnand_controller *ctrl = dev_get_drvdata(&pdev->dev);
>> +
>> +       return ctrl ? ctrl->soc : NULL;
>> +}
>> +
>
> Don't you need to EXPORT_SYMBOL_GPL this one in case you build
> brcmnand as module?

No, because all of the code is built into the one object file:
obj-$(CONFIG_MTD_NAND_BRCMNAND)		+= iproc_nand.o
obj-$(CONFIG_MTD_NAND_BRCMNAND)		+= bcm63138_nand.o
obj-$(CONFIG_MTD_NAND_BRCMNAND)		+= bcm63268_nand.o
obj-$(CONFIG_MTD_NAND_BRCMNAND)		+= brcmstb_nand.o
obj-$(CONFIG_MTD_NAND_BRCMNAND)		+= brcmnand.o

They almost have to be otherwise you could load separate parts as different
modules in the wrong order.

The existing exported symbols are not required either.

-- 
Simon Arlott
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ