Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1203778 > unrolled thread

[PATCH V1 Resend 04/11] drivers: md: Drop unlikely before IS_ERR(_OR_NULL)

Started byViresh Kumar <viresh.kumar@linaro.org>
First post2015-08-10 08:20 +0200
Last post2015-08-11 04:50 +0200
Articles 4 — 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.


Contents

  [PATCH V1 Resend 04/11] drivers: md: Drop unlikely before IS_ERR(_OR_NULL) Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-10 08:20 +0200
    Re: [PATCH V1 Resend 04/11] drivers: md: Drop unlikely before  IS_ERR(_OR_NULL) Mike Snitzer <snitzer@redhat.com> - 2015-08-10 22:10 +0200
      Re: [PATCH V1 Resend 04/11] drivers: md: Drop unlikely before  IS_ERR(_OR_NULL) Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-11 03:50 +0200
        Re: [PATCH V1 Resend 04/11] drivers: md: Drop unlikely before  IS_ERR(_OR_NULL) Mike Snitzer <snitzer@redhat.com> - 2015-08-11 04:50 +0200

#1203778 — [PATCH V1 Resend 04/11] drivers: md: Drop unlikely before IS_ERR(_OR_NULL)

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-08-10 08:20 +0200
Subject[PATCH V1 Resend 04/11] drivers: md: Drop unlikely before IS_ERR(_OR_NULL)
Message-ID<pVOBb-5JE-5@gated-at.bofh.it>
IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
is no need to do that again from its callers. Drop it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/md/dm-snap-persistent.c               | 2 +-
 drivers/md/dm-verity.c                        | 2 +-
 drivers/md/persistent-data/dm-block-manager.c | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c
index 808b8419bc48..bf71583296f7 100644
--- a/drivers/md/dm-snap-persistent.c
+++ b/drivers/md/dm-snap-persistent.c
@@ -533,7 +533,7 @@ static int read_exceptions(struct pstore *ps,
 		chunk = area_location(ps, ps->current_area);
 
 		area = dm_bufio_read(client, chunk, &bp);
-		if (unlikely(IS_ERR(area))) {
+		if (IS_ERR(area)) {
 			r = PTR_ERR(area);
 			goto ret_destroy_bufio;
 		}
diff --git a/drivers/md/dm-verity.c b/drivers/md/dm-verity.c
index 4b34df8fdb58..d224979f9633 100644
--- a/drivers/md/dm-verity.c
+++ b/drivers/md/dm-verity.c
@@ -271,7 +271,7 @@ static int verity_verify_level(struct dm_verity_io *io, sector_t block,
 	verity_hash_at_level(v, block, level, &hash_block, &offset);
 
 	data = dm_bufio_read(v->bufio, hash_block, &buf);
-	if (unlikely(IS_ERR(data)))
+	if (IS_ERR(data))
 		return PTR_ERR(data);
 
 	aux = dm_bufio_get_aux_data(buf);
diff --git a/drivers/md/persistent-data/dm-block-manager.c b/drivers/md/persistent-data/dm-block-manager.c
index 4d6c9b689eaa..88dbe7b97c2c 100644
--- a/drivers/md/persistent-data/dm-block-manager.c
+++ b/drivers/md/persistent-data/dm-block-manager.c
@@ -454,7 +454,7 @@ int dm_bm_read_lock(struct dm_block_manager *bm, dm_block_t b,
 	int r;
 
 	p = dm_bufio_read(bm->bufio, b, (struct dm_buffer **) result);
-	if (unlikely(IS_ERR(p)))
+	if (IS_ERR(p))
 		return PTR_ERR(p);
 
 	aux = dm_bufio_get_aux_data(to_buffer(*result));
@@ -490,7 +490,7 @@ int dm_bm_write_lock(struct dm_block_manager *bm,
 		return -EPERM;
 
 	p = dm_bufio_read(bm->bufio, b, (struct dm_buffer **) result);
-	if (unlikely(IS_ERR(p)))
+	if (IS_ERR(p))
 		return PTR_ERR(p);
 
 	aux = dm_bufio_get_aux_data(to_buffer(*result));
@@ -523,7 +523,7 @@ int dm_bm_read_try_lock(struct dm_block_manager *bm,
 	int r;
 
 	p = dm_bufio_get(bm->bufio, b, (struct dm_buffer **) result);
-	if (unlikely(IS_ERR(p)))
+	if (IS_ERR(p))
 		return PTR_ERR(p);
 	if (unlikely(!p))
 		return -EWOULDBLOCK;
@@ -559,7 +559,7 @@ int dm_bm_write_lock_zero(struct dm_block_manager *bm,
 		return -EPERM;
 
 	p = dm_bufio_new(bm->bufio, b, (struct dm_buffer **) result);
-	if (unlikely(IS_ERR(p)))
+	if (IS_ERR(p))
 		return PTR_ERR(p);
 
 	memset(p, 0, dm_bm_block_size(bm));
-- 
2.4.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1204524 — Re: [PATCH V1 Resend 04/11] drivers: md: Drop unlikely before IS_ERR(_OR_NULL)

FromMike Snitzer <snitzer@redhat.com>
Date2015-08-10 22:10 +0200
SubjectRe: [PATCH V1 Resend 04/11] drivers: md: Drop unlikely before IS_ERR(_OR_NULL)
Message-ID<pW1yq-8dg-27@gated-at.bofh.it>
In reply to#1203778
On Mon, Aug 10 2015 at  2:12am -0400,
Viresh Kumar <viresh.kumar@linaro.org> wrote:

> IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
> is no need to do that again from its callers. Drop it.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

I picked this up for 4.3, staged in linux-dm.git's 'for-next', see:
https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=e2545d97b6cc0556fbd1099fca9271e3ca1d0b01

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1204686 — Re: [PATCH V1 Resend 04/11] drivers: md: Drop unlikely before IS_ERR(_OR_NULL)

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-08-11 03:50 +0200
SubjectRe: [PATCH V1 Resend 04/11] drivers: md: Drop unlikely before IS_ERR(_OR_NULL)
Message-ID<pW6Rt-7gE-7@gated-at.bofh.it>
In reply to#1204524
On 10-08-15, 16:05, Mike Snitzer wrote:
> On Mon, Aug 10 2015 at  2:12am -0400,
> Viresh Kumar <viresh.kumar@linaro.org> wrote:
> 
> > IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
> > is no need to do that again from its callers. Drop it.
> > 
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> 
> I picked this up for 4.3, staged in linux-dm.git's 'for-next', see:
> https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=e2545d97b6cc0556fbd1099fca9271e3ca1d0b01

I had no clue about it as I didn't look at individual maintainer's
tree. But rebased things over linux-next/master.

Why isn't your branch merged into linux-next ?

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1204705 — Re: [PATCH V1 Resend 04/11] drivers: md: Drop unlikely before IS_ERR(_OR_NULL)

FromMike Snitzer <snitzer@redhat.com>
Date2015-08-11 04:50 +0200
SubjectRe: [PATCH V1 Resend 04/11] drivers: md: Drop unlikely before IS_ERR(_OR_NULL)
Message-ID<pW7Nw-gK-7@gated-at.bofh.it>
In reply to#1204686
On Mon, Aug 10 2015 at  9:42pm -0400,
Viresh Kumar <viresh.kumar@linaro.org> wrote:

> On 10-08-15, 16:05, Mike Snitzer wrote:
> > On Mon, Aug 10 2015 at  2:12am -0400,
> > Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > 
> > > IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
> > > is no need to do that again from its callers. Drop it.
> > > 
> > > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > 
> > I picked this up for 4.3, staged in linux-dm.git's 'for-next', see:
> > https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=e2545d97b6cc0556fbd1099fca9271e3ca1d0b01
> 
> I had no clue about it as I didn't look at individual maintainer's
> tree. But rebased things over linux-next/master.
> 
> Why isn't your branch merged into linux-next ?

I just staged it today, so the next linux-next will pick it up.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web