linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: dedekind1@gmail.com
Cc: linux-mtd@lists.infradead.org,
	Roman Tereshonkov <roman.tereshonkov@nokia.com>
Subject: Re: [PATCH 1/4] mtd: add new ioctl structures to be used for repartitioning
Date: Sun, 18 Jul 2010 20:22:58 +0000	[thread overview]
Message-ID: <201007182022.59590.arnd@arndb.de> (raw)
In-Reply-To: <1279472431.16247.67.camel@localhost.localdomain>

On Sunday 18 July 2010, Artem Bityutskiy wrote:
> CCing Arnd to review the ioctl interface.
> 
> One thing just struck me, see below.
> 
> On Fri, 2010-06-18 at 13:08 +0300, Roman Tereshonkov wrote:
> > Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
> > ---
> >  include/mtd/mtd-abi.h |   15 +++++++++++++++
> >  1 files changed, 15 insertions(+), 0 deletions(-)
> > 
> > diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
> > index be51ae2..c2c6b41 100644
> > --- a/include/mtd/mtd-abi.h
> > +++ b/include/mtd/mtd-abi.h
> > @@ -88,6 +88,20 @@ struct otp_info {
> >  	__u32 locked;
> >  };
> >  
> > +#define MTD_MAX_PARTITION_NAME_LEN	64
> > +struct mtd_partition_user {
> > +	__u64 size;
> > +	__u64 offset;
> > +	__u32 mask_flags;
> > +	char name[MTD_MAX_PARTITION_NAME_LEN];
> > +	__u8 padding[128];	/* reserved for future, must be zero! */
> > +};
> > +
> > +struct mtd_partitions {
> > +	__u32 nparts;
> > +	struct mtd_partition_user __user *parts;
> > +};
> 
> Hmm, I think nowadays pointers should be passed as __u64 and
> compat_ioctl() should be avoided.

Yes, that's generally true. It would be nice if the BLKPG ioctl
definition could be reused for this. It is more complicated
than it should be, but not more than this suggestion, and
it's an existing ioctl.

	Arnd

  reply	other threads:[~2010-07-18 20:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-18 10:08 [PATCH 0/4] mtd: add mtd repartition ioctl Roman Tereshonkov
2010-06-18 10:08 ` [PATCH 1/4] mtd: add new ioctl structures to be used for repartitioning Roman Tereshonkov
2010-06-18 10:08   ` [PATCH 2/4] mtd: add the possibility to modify partitions in runtime Roman Tereshonkov
2010-06-18 10:08     ` [PATCH 3/4] mtd: add MTDREPARTITION ioctl Roman Tereshonkov
2010-06-18 10:08       ` [PATCH 4/4] mtd: create the mtd master device for given set of partitions Roman Tereshonkov
2010-07-18 17:00   ` [PATCH 1/4] mtd: add new ioctl structures to be used for repartitioning Artem Bityutskiy
2010-07-18 20:22     ` Arnd Bergmann [this message]
2010-07-19  4:06       ` Artem Bityutskiy
2010-07-20  9:19         ` Arnd Bergmann
2010-07-20  9:25           ` Artem Bityutskiy
2010-07-08  5:50 ` [PATCH 0/4] mtd: add mtd repartition ioctl Artem Bityutskiy
2010-07-21  9:58   ` Artem Bityutskiy
2010-07-21 11:44     ` Vivek
2010-07-21 11:46       ` Artem Bityutskiy

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=201007182022.59590.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=roman.tereshonkov@nokia.com \
    /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).