Linux-Block Archive on lore.kernel.org
 help / Atom feed
* [PATCH] block: remove redundant unlikely annotation
@ 2019-02-12  3:16 Chengguang Xu
  2019-02-12 16:31 ` Bart Van Assche
  0 siblings, 1 reply; 2+ messages in thread
From: Chengguang Xu @ 2019-02-12  3:16 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, Chengguang Xu

unlikely has already included in IS_ERR(),
so just remove it.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
---
 block/blk-cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 2bed5725aa03..699dba716c83 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -880,7 +880,7 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
 			blkg_free(new_blkg);
 		} else {
 			blkg = blkg_create(pos, q, new_blkg);
-			if (unlikely(IS_ERR(blkg))) {
+			if (IS_ERR(blkg)) {
 				ret = PTR_ERR(blkg);
 				goto fail_unlock;
 			}
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] block: remove redundant unlikely annotation
  2019-02-12  3:16 [PATCH] block: remove redundant unlikely annotation Chengguang Xu
@ 2019-02-12 16:31 ` Bart Van Assche
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Van Assche @ 2019-02-12 16:31 UTC (permalink / raw)
  To: Chengguang Xu, axboe; +Cc: linux-block

On Tue, 2019-02-12 at 11:16 +-0800, Chengguang Xu wrote:
+AD4 unlikely has already included in IS+AF8-ERR(),
+AD4 so just remove it.
+AD4 
+AD4 Signed-off-by: Chengguang Xu +ADw-cgxu519+AEA-gmx.com+AD4
+AD4 ---
+AD4  block/blk-cgroup.c +AHw 2 +--
+AD4  1 file changed, 1 insertion(+-), 1 deletion(-)
+AD4 
+AD4 diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
+AD4 index 2bed5725aa03..699dba716c83 100644
+AD4 --- a/block/blk-cgroup.c
+AD4 +-+-+- b/block/blk-cgroup.c
+AD4 +AEAAQA -880,7 +-880,7 +AEAAQA int blkg+AF8-conf+AF8-prep(struct blkcg +ACo-blkcg, const struct blkcg+AF8-policy +ACo-pol,
+AD4  			blkg+AF8-free(new+AF8-blkg)+ADs
+AD4  		+AH0 else +AHs
+AD4  			blkg +AD0 blkg+AF8-create(pos, q, new+AF8-blkg)+ADs
+AD4 -			if (unlikely(IS+AF8-ERR(blkg))) +AHs
+AD4 +-			if (IS+AF8-ERR(blkg)) +AHs
+AD4  				ret +AD0 PTR+AF8-ERR(blkg)+ADs
+AD4  				goto fail+AF8-unlock+ADs
+AD4  			+AH0

Reviewed-by: Bart Van Assche +ADw-bvanassche+AEA-acm.org+AD4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-12  3:16 [PATCH] block: remove redundant unlikely annotation Chengguang Xu
2019-02-12 16:31 ` Bart Van Assche

Linux-Block Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-block linux-block/ https://lore.kernel.org/linux-block \
		linux-block@vger.kernel.org linux-block@archiver.kernel.org
	public-inbox-index linux-block


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block


AGPL code for this site: git clone https://public-inbox.org/ public-inbox