From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] mtd: mtdraw: drop ioctl callback for mtdraw device
Date: Wed, 04 Dec 2013 22:28:43 +0100 [thread overview]
Message-ID: <87r49s71bo.fsf@free.fr> (raw)
In-Reply-To: <20131204163251.GQ24559@pengutronix.de> (Sascha Hauer's message of "Wed, 4 Dec 2013 17:32:51 +0100")
Sascha Hauer <s.hauer@pengutronix.de> writes:
> On Tue, Dec 03, 2013 at 11:04:45PM +0100, Robert Jarzmik wrote:
> For MEMGETINFO we can directly call into _mtd_ioctl(), but for
> MEM[SG]ETBADBLOCK the offsets would have to be corrected first. Is this
> worth the effort? Otherwise we could do something like:
>
> int mtdraw_ioctl(struct cdev *cdev, int request, void *buf)
> {
> struct mtd_info *mtd = to_mtd(cdev);
>
> switch (request) {
> case MEMGETINFO:
> return mtd_memgetinfo(mtd, buf);
> default:
> return -EINVAL;
> }
> }
Yes, that looks like the right thing to do.
I don't think MEM[GS]ETBADBLOCK are used anywhere at this time for raw
devices. And I'm not convinced it is worth the effort just as you.
And let's be pragmatic : is somebody needs the badblock ioctls, he'll add them
:) By now, I'm happy with your patch.
Cheers.
--
Robert
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2013-12-04 21:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 15:22 Sascha Hauer
2013-12-03 22:04 ` Robert Jarzmik
2013-12-04 16:32 ` Sascha Hauer
2013-12-04 21:28 ` Robert Jarzmik [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=87r49s71bo.fsf@free.fr \
--to=robert.jarzmik@free.fr \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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