Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1323725 > unrolled thread
| Started by | Bean Huo <jackyard88@gmail.com> |
|---|---|
| First post | 2016-02-02 03:40 +0100 |
| Last post | 2016-02-02 04:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 03/17] drivers:mtd:add dual plane page program support in partition layer Bean Huo <jackyard88@gmail.com> - 2016-02-02 03:40 +0100
Re: [PATCH v2 03/17] drivers:mtd:add dual plane page program support in partition layer kbuild test robot <lkp@intel.com> - 2016-02-02 04:10 +0100
| From | Bean Huo <jackyard88@gmail.com> |
|---|---|
| Date | 2016-02-02 03:40 +0100 |
| Subject | [PATCH v2 03/17] drivers:mtd:add dual plane page program support in partition layer |
| Message-ID | <qXz2P-3Wf-43@gated-at.bofh.it> |
From: Bean Huo <beanhuo@micron.com>
This file patch is to add multi-plane page program function in MTD partition layer and
call back MTD master dual plane page program function.
Signed-off-by: BeanHuo <beanhuo@micron.com>
---
drivers/mtd/mtdpart.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index cafdb88..85f68d0 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -203,6 +203,23 @@ static int part_write_oob(struct mtd_info *mtd, loff_t to,
return part->master->_write_oob(part->master, to + part->offset, ops);
}
+static int part_write_dual_plane_oob(struct mtd_info *mtd, loff_t to_plane0,
+ struct mtd_oob_ops *ops_plane0, loff_t to_plane1,
+ struct mtd_oob_ops *ops_plane1)
+{
+ struct mtd_part *part = PART(mtd);
+
+ if ((to_plane0 >= mtd->size) || ((to_plane1 >= mtd->size)))
+ return -EINVAL;
+ if ((ops_plane0->datbuf && to_plane0 + ops_plane0->len > mtd->size) ||
+ (ops_plane1->datbuf && to_plane1 + ops_plane0->len > mtd->size))
+ return -EINVAL;
+
+ return part->master->_dual_plane_write_oob(part->master,
+ to_plane0 + part->offset, ops_plane0,
+ to_plane1 + part->offset, ops_plane1);
+}
+
static int part_write_user_prot_reg(struct mtd_info *mtd, loff_t from,
size_t len, size_t *retlen, u_char *buf)
{
@@ -409,6 +426,8 @@ static struct mtd_part *allocate_partition(struct mtd_info *master,
slave->mtd._read_oob = part_read_oob;
if (master->_write_oob)
slave->mtd._write_oob = part_write_oob;
+ if (master->_dual_plane_write_oob)
+ slave->mtd._dual_plane_write_oob = part_write_dual_plane_oob;
if (master->_read_user_prot_reg)
slave->mtd._read_user_prot_reg = part_read_user_prot_reg;
if (master->_read_fact_prot_reg)
--
1.9.1
[toc] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-02-02 04:10 +0100 |
| Subject | Re: [PATCH v2 03/17] drivers:mtd:add dual plane page program support in partition layer |
| Message-ID | <qXzvQ-4pr-9@gated-at.bofh.it> |
| In reply to | #1323725 |
[Multipart message — attachments visible in raw view] — view raw
Hi Bean,
[auto build test ERROR on v4.5-rc2]
[also build test ERROR on next-20160201]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Bean-Huo/Add-a-bakvol-module-in-UBI-layer-for-MLC-paired-page-power-loss-issue/20160202-104450
config: x86_64-randconfig-x012-201605 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
drivers/mtd/mtdpart.c: In function 'part_write_dual_plane_oob':
>> drivers/mtd/mtdpart.c:213:26: error: implicit declaration of function 'PART' [-Werror=implicit-function-declaration]
struct mtd_part *part = PART(mtd);
^
>> drivers/mtd/mtdpart.c:213:26: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
vim +/PART +213 drivers/mtd/mtdpart.c
207 }
208
209 static int part_write_dual_plane_oob(struct mtd_info *mtd, loff_t to_plane0,
210 struct mtd_oob_ops *ops_plane0, loff_t to_plane1,
211 struct mtd_oob_ops *ops_plane1)
212 {
> 213 struct mtd_part *part = PART(mtd);
214
215 if ((to_plane0 >= mtd->size) || ((to_plane1 >= mtd->size)))
216 return -EINVAL;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web