linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Daniel Danzberger <daniel@dd-wrt.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtdram: Add module parameter name.
Date: Thu, 7 Mar 2019 14:24:31 +0100	[thread overview]
Message-ID: <20190307142431.4d290497@xps13> (raw)
In-Reply-To: <20190222123205.20015-1-daniel@dd-wrt.com>

Hi Daniel,

Also, "mtd: mtdram:" would be a better prefix, and you can drop the
period at the end of the commit title.

Daniel Danzberger <daniel@dd-wrt.com> wrote on Fri, 22 Feb 2019
13:32:05 +0100:

> This parameter will overwrite the default name "mtdram test device", when set.
> 
> Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
> ---
>  drivers/mtd/devices/mtdram.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c
> index 46238796145f..1a8ec3756a1d 100644
> --- a/drivers/mtd/devices/mtdram.c
> +++ b/drivers/mtd/devices/mtdram.c
> @@ -18,6 +18,7 @@
>  #include <linux/mtd/mtd.h>
>  #include <linux/mtd/mtdram.h>
>  
> +static char name[32] = "mtdram test device";
>  static unsigned long total_size = CONFIG_MTDRAM_TOTAL_SIZE;
>  static unsigned long erase_size = CONFIG_MTDRAM_ERASE_SIZE;
>  static unsigned long writebuf_size = 64;
> @@ -31,6 +32,8 @@ module_param(erase_size, ulong, 0);
>  MODULE_PARM_DESC(erase_size, "Device erase block size in KiB");
>  module_param(writebuf_size, ulong, 0);
>  MODULE_PARM_DESC(writebuf_size, "Device write buf size in Bytes (Default: 64)");
> +module_param_string(name, name, sizeof(name) - 1, 0);
> +MODULE_PARM_DESC(name, "Device name");
>  #endif
>  
>  // We could store these in the mtd structure, but we only support 1 device..
> @@ -170,7 +173,7 @@ static int __init init_mtdram(void)
>  		mtd_info = NULL;
>  		return -ENOMEM;
>  	}
> -	err = mtdram_init_device(mtd_info, addr, MTDRAM_TOTAL_SIZE, "mtdram test device");
> +	err = mtdram_init_device(mtd_info, addr, MTDRAM_TOTAL_SIZE, name);
>  	if (err) {
>  		vfree(addr);
>  		kfree(mtd_info);




Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      parent reply	other threads:[~2019-03-07 13:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 12:32 [PATCH] mtdram: Add module parameter name Daniel Danzberger
2019-03-07 13:21 ` Miquel Raynal
2019-03-07 15:01   ` Richard Weinberger
2019-03-07 15:11   ` Daniel Danzberger
2019-03-07 13:24 ` Miquel Raynal [this message]

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=20190307142431.4d290497@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=daniel@dd-wrt.com \
    --cc=linux-mtd@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).