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
| ||
|
Date: Wed, 12 Dec 2012 16:45:51 +0530 From: Sekhar Nori <nsekhar@...com> To: "Philip, Avinash" <avinashphilip@...com> CC: "dwmw2@...radead.org" <dwmw2@...radead.org>, "artem.bityutskiy@...ux.intel.com" <artem.bityutskiy@...ux.intel.com>, "Mohammed, Afzal" <afzal@...com>, "tony@...mide.com" <tony@...mide.com>, "broonie@...nsource.wolfsonmicro.com" <broonie@...nsource.wolfsonmicro.com>, "rmk+kernel@....linux.org.uk" <rmk+kernel@....linux.org.uk>, "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>, "linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "devicetree-discuss@...ts.ozlabs.org" <devicetree-discuss@...ts.ozlabs.org>, "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>, "linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>, "linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>, "Hebbar, Gururaja" <gururaja.hebbar@...com>, "ivan.djelic@...rot.com" <ivan.djelic@...rot.com>, Grant Likely <grant.likely@...retlab.ca>, Rob Herring <rob.herring@...xeda.com>, Rob Landley <rob@...dley.net> Subject: Re: [PATCH v3 2/3] mtd: devices: elm: Add support for ELM error correction On 12/10/2012 12:13 PM, Philip, Avinash wrote: > On Fri, Dec 07, 2012 at 16:07:23, Nori, Sekhar wrote: >> On 11/29/2012 5:16 PM, Philip, Avinash wrote: [...] >>> +struct device *elm_request(enum bch_ecc bch_type) >>> +{ >>> + struct elm_info *info; >>> + >>> + list_for_each_entry(info, &elm_devices, list) { >>> + if (info && info->dev) { >>> + info->bch_type = bch_type; >>> + elm_config(info); >>> + return info->dev; >>> + } >>> + } >> >> This will always return the first ELM device probed since you never >> remove the allocated device from the list. > > But now I realized that, there is no mechanism of freeing the requested > resource. Right. You essentially want to assign an ELM instance to work with a given instance of GPMC and that could be done statically too. Just pass phandle of ELM node in GPMC DT data? > So I will add mechanism to request ELM module successfully only if ELM > module is not requested already and add mechanism to free it, on NAND > driver module unload (loadable module support). This way ELM driver > can achieve multi instance support. > >> I wonder why you really need a list? > > The prime motivation for the list is the driver should support multi > instances of ELM by removing global symbols. I still think a request/free API is bit too much for something that will turn out to be a simple 1-to-1 match anyway. Can you please look at the phandle suggestion above? I am no DT expert, but I think that will work for your use case. Thanks, Sekhar -- 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