* [PATCHv2 3/7] nandsim: Define CONFIG_NANDSIM_MAX_PARTS and use it instead of MAX_MTD_DEVICES
@ 2010-01-12 23:08 Ben Hutchings
2010-01-28 16:13 ` Artem Bityutskiy
0 siblings, 1 reply; 4+ messages in thread
From: Ben Hutchings @ 2010-01-12 23:08 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-net-drivers, linux-mtd
MAX_MTD_DEVICES is about to be removed.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
drivers/mtd/nand/nandsim.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index 7281000..58c255e 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -80,6 +80,9 @@
#ifndef CONFIG_NANDSIM_DBG
#define CONFIG_NANDSIM_DBG 0
#endif
+#ifndef CONFIG_NANDSIM_MAX_PARTS
+#define CONFIG_NANDSIM_MAX_PARTS 32
+#endif
static uint first_id_byte = CONFIG_NANDSIM_FIRST_ID_BYTE;
static uint second_id_byte = CONFIG_NANDSIM_SECOND_ID_BYTE;
@@ -94,7 +97,7 @@ static uint bus_width = CONFIG_NANDSIM_BUS_WIDTH;
static uint do_delays = CONFIG_NANDSIM_DO_DELAYS;
static uint log = CONFIG_NANDSIM_LOG;
static uint dbg = CONFIG_NANDSIM_DBG;
-static unsigned long parts[MAX_MTD_DEVICES];
+static unsigned long parts[CONFIG_NANDSIM_MAX_PARTS];
static unsigned int parts_num;
static char *badblocks = NULL;
static char *weakblocks = NULL;
@@ -288,7 +291,7 @@ union ns_mem {
* The structure which describes all the internal simulator data.
*/
struct nandsim {
- struct mtd_partition partitions[MAX_MTD_DEVICES];
+ struct mtd_partition partitions[CONFIG_NANDSIM_MAX_PARTS];
unsigned int nbparts;
uint busw; /* flash chip bus width (8 or 16) */
--
1.5.5
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCHv2 3/7] nandsim: Define CONFIG_NANDSIM_MAX_PARTS and use it instead of MAX_MTD_DEVICES
2010-01-12 23:08 [PATCHv2 3/7] nandsim: Define CONFIG_NANDSIM_MAX_PARTS and use it instead of MAX_MTD_DEVICES Ben Hutchings
@ 2010-01-28 16:13 ` Artem Bityutskiy
2010-01-28 16:22 ` Ben Hutchings
0 siblings, 1 reply; 4+ messages in thread
From: Artem Bityutskiy @ 2010-01-28 16:13 UTC (permalink / raw)
To: Ben Hutchings; +Cc: linux-mtd, linux-net-drivers, David Woodhouse
On Tue, 2010-01-12 at 23:08 +0000, Ben Hutchings wrote:
> MAX_MTD_DEVICES is about to be removed.
>
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> drivers/mtd/nand/nandsim.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
> index 7281000..58c255e 100644
> --- a/drivers/mtd/nand/nandsim.c
> +++ b/drivers/mtd/nand/nandsim.c
> @@ -80,6 +80,9 @@
> #ifndef CONFIG_NANDSIM_DBG
> #define CONFIG_NANDSIM_DBG 0
> #endif
> +#ifndef CONFIG_NANDSIM_MAX_PARTS
> +#define CONFIG_NANDSIM_MAX_PARTS 32
> +#endif
Since this is not a Kconfig option, please, remove the CONFIG_ prefix.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCHv2 3/7] nandsim: Define CONFIG_NANDSIM_MAX_PARTS and use it instead of MAX_MTD_DEVICES
2010-01-28 16:13 ` Artem Bityutskiy
@ 2010-01-28 16:22 ` Ben Hutchings
2010-01-28 16:38 ` Artem Bityutskiy
0 siblings, 1 reply; 4+ messages in thread
From: Ben Hutchings @ 2010-01-28 16:22 UTC (permalink / raw)
To: dedekind1; +Cc: linux-mtd, linux-net-drivers, David Woodhouse
On Thu, 2010-01-28 at 18:13 +0200, Artem Bityutskiy wrote:
> On Tue, 2010-01-12 at 23:08 +0000, Ben Hutchings wrote:
> > MAX_MTD_DEVICES is about to be removed.
> >
> > Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> > ---
> > drivers/mtd/nand/nandsim.c | 7 +++++--
> > 1 files changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
> > index 7281000..58c255e 100644
> > --- a/drivers/mtd/nand/nandsim.c
> > +++ b/drivers/mtd/nand/nandsim.c
> > @@ -80,6 +80,9 @@
> > #ifndef CONFIG_NANDSIM_DBG
> > #define CONFIG_NANDSIM_DBG 0
> > #endif
> > +#ifndef CONFIG_NANDSIM_MAX_PARTS
> > +#define CONFIG_NANDSIM_MAX_PARTS 32
> > +#endif
>
> Since this is not a Kconfig option, please, remove the CONFIG_ prefix.
While I understand that CONFIG_* should be reserved to Kconfig, this is
consistent with the existing build-time options in this file.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCHv2 3/7] nandsim: Define CONFIG_NANDSIM_MAX_PARTS and use it instead of MAX_MTD_DEVICES
2010-01-28 16:22 ` Ben Hutchings
@ 2010-01-28 16:38 ` Artem Bityutskiy
0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2010-01-28 16:38 UTC (permalink / raw)
To: Ben Hutchings; +Cc: linux-mtd, linux-net-drivers, David Woodhouse
On Thu, 2010-01-28 at 16:22 +0000, Ben Hutchings wrote:
> On Thu, 2010-01-28 at 18:13 +0200, Artem Bityutskiy wrote:
> > On Tue, 2010-01-12 at 23:08 +0000, Ben Hutchings wrote:
> > > MAX_MTD_DEVICES is about to be removed.
> > >
> > > Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> > > ---
> > > drivers/mtd/nand/nandsim.c | 7 +++++--
> > > 1 files changed, 5 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
> > > index 7281000..58c255e 100644
> > > --- a/drivers/mtd/nand/nandsim.c
> > > +++ b/drivers/mtd/nand/nandsim.c
> > > @@ -80,6 +80,9 @@
> > > #ifndef CONFIG_NANDSIM_DBG
> > > #define CONFIG_NANDSIM_DBG 0
> > > #endif
> > > +#ifndef CONFIG_NANDSIM_MAX_PARTS
> > > +#define CONFIG_NANDSIM_MAX_PARTS 32
> > > +#endif
> >
> > Since this is not a Kconfig option, please, remove the CONFIG_ prefix.
>
> While I understand that CONFIG_* should be reserved to Kconfig, this is
> consistent with the existing build-time options in this file.
You are right. I remember long time ago that all were config options.
Now this is not the case anymore, and that stuff needs some clean up. So
I agree, it is fine to name it consistently.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-28 16:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-12 23:08 [PATCHv2 3/7] nandsim: Define CONFIG_NANDSIM_MAX_PARTS and use it instead of MAX_MTD_DEVICES Ben Hutchings
2010-01-28 16:13 ` Artem Bityutskiy
2010-01-28 16:22 ` Ben Hutchings
2010-01-28 16:38 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox