* [PATCH] mtd: block2mtd: page_read() never returns NULL
@ 2012-04-23 10:47 ` Ryosuke Saito
0 siblings, 0 replies; 5+ messages in thread
From: Ryosuke Saito @ 2012-04-23 10:47 UTC (permalink / raw)
To: linux-mtd; +Cc: artem.bityutskiy, kernel-janitors, linux-kernel
page_read() never returns NULL, so we can remove the NULL check here.
Signed-off-by: Ryosuke Saito <raitosyo@gmail.com>
---
drivers/mtd/devices/block2mtd.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index a4a80b7..300aeb8 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -52,8 +52,6 @@ static int _block2mtd_erase(struct block2mtd_dev *dev, loff_t to, size_t len)
while (pages) {
page = page_read(mapping, index);
- if (!page)
- return -ENOMEM;
if (IS_ERR(page))
return PTR_ERR(page);
@@ -112,8 +110,6 @@ static int block2mtd_read(struct mtd_info *mtd, loff_t from, size_t len,
len = len - cpylen;
page = page_read(dev->blkdev->bd_inode->i_mapping, index);
- if (!page)
- return -ENOMEM;
if (IS_ERR(page))
return PTR_ERR(page);
@@ -148,8 +144,6 @@ static int _block2mtd_write(struct block2mtd_dev *dev, const u_char *buf,
len = len - cpylen;
page = page_read(mapping, index);
- if (!page)
- return -ENOMEM;
if (IS_ERR(page))
return PTR_ERR(page);
--
1.7.9.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] mtd: block2mtd: page_read() never returns NULL
@ 2012-04-23 10:47 ` Ryosuke Saito
0 siblings, 0 replies; 5+ messages in thread
From: Ryosuke Saito @ 2012-04-23 10:47 UTC (permalink / raw)
To: linux-mtd; +Cc: artem.bityutskiy, kernel-janitors, linux-kernel
page_read() never returns NULL, so we can remove the NULL check here.
Signed-off-by: Ryosuke Saito <raitosyo@gmail.com>
---
drivers/mtd/devices/block2mtd.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index a4a80b7..300aeb8 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -52,8 +52,6 @@ static int _block2mtd_erase(struct block2mtd_dev *dev, loff_t to, size_t len)
while (pages) {
page = page_read(mapping, index);
- if (!page)
- return -ENOMEM;
if (IS_ERR(page))
return PTR_ERR(page);
@@ -112,8 +110,6 @@ static int block2mtd_read(struct mtd_info *mtd, loff_t from, size_t len,
len = len - cpylen;
page = page_read(dev->blkdev->bd_inode->i_mapping, index);
- if (!page)
- return -ENOMEM;
if (IS_ERR(page))
return PTR_ERR(page);
@@ -148,8 +144,6 @@ static int _block2mtd_write(struct block2mtd_dev *dev, const u_char *buf,
len = len - cpylen;
page = page_read(mapping, index);
- if (!page)
- return -ENOMEM;
if (IS_ERR(page))
return PTR_ERR(page);
--
1.7.9.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: block2mtd: page_read() never returns NULL
2012-04-23 10:47 ` Ryosuke Saito
(?)
@ 2012-04-28 11:58 ` Artem Bityutskiy
-1 siblings, 0 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2012-04-28 11:58 UTC (permalink / raw)
To: Ryosuke Saito; +Cc: linux-mtd, artem.bityutskiy, kernel-janitors, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 258 bytes --]
On Mon, 2012-04-23 at 19:47 +0900, Ryosuke Saito wrote:
> page_read() never returns NULL, so we can remove the NULL check here.
>
> Signed-off-by: Ryosuke Saito <raitosyo@gmail.com>
Pushed to l2-mtd.git, thanks!
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: block2mtd: page_read() never returns NULL
@ 2012-04-28 11:58 ` Artem Bityutskiy
0 siblings, 0 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2012-04-28 11:58 UTC (permalink / raw)
To: Ryosuke Saito; +Cc: artem.bityutskiy, kernel-janitors, linux-mtd, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 258 bytes --]
On Mon, 2012-04-23 at 19:47 +0900, Ryosuke Saito wrote:
> page_read() never returns NULL, so we can remove the NULL check here.
>
> Signed-off-by: Ryosuke Saito <raitosyo@gmail.com>
Pushed to l2-mtd.git, thanks!
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: block2mtd: page_read() never returns NULL
@ 2012-04-28 11:58 ` Artem Bityutskiy
0 siblings, 0 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2012-04-28 11:58 UTC (permalink / raw)
To: Ryosuke Saito; +Cc: artem.bityutskiy, kernel-janitors, linux-mtd, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 258 bytes --]
On Mon, 2012-04-23 at 19:47 +0900, Ryosuke Saito wrote:
> page_read() never returns NULL, so we can remove the NULL check here.
>
> Signed-off-by: Ryosuke Saito <raitosyo@gmail.com>
Pushed to l2-mtd.git, thanks!
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-04-28 11:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-23 10:47 [PATCH] mtd: block2mtd: page_read() never returns NULL Ryosuke Saito
2012-04-23 10:47 ` Ryosuke Saito
2012-04-28 11:58 ` Artem Bityutskiy
2012-04-28 11:58 ` Artem Bityutskiy
2012-04-28 11:58 ` Artem Bityutskiy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.