All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
@ 2019-03-21  8:33 ` Dan Carpenter
  0 siblings, 0 replies; 15+ messages in thread
From: Dan Carpenter @ 2019-03-21  8:33 UTC (permalink / raw)
  To: Jani Nikula, Chris Wilson
  Cc: David Airlie, intel-gfx, kernel-janitors, Matthew Auld

The mock_context() function returns NULL on error, it doesn't return
error pointers.

Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 .../gpu/drm/i915/selftests/i915_gem_context.c |  4 +-
 drivers/staging/erofs/unzip_vle.c             | 70 ++++++++++---------
 2 files changed, 38 insertions(+), 36 deletions(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
index 4399ef9ebf15..a172dbd9cb9e 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
@@ -1620,8 +1620,8 @@ static int mock_context_barrier(void *arg)
 	mutex_lock(&i915->drm.struct_mutex);
 
 	ctx = mock_context(i915, "mock");
-	if (IS_ERR(ctx)) {
-		err = PTR_ERR(ctx);
+	if (!ctx) {
+		err = -ENOMEM;
 		goto unlock;
 	}
 
diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
index c7b3b21123c1..a711bf61f60c 100644
--- a/drivers/staging/erofs/unzip_vle.c
+++ b/drivers/staging/erofs/unzip_vle.c
@@ -844,11 +844,9 @@ static void z_erofs_vle_unzip_kickoff(void *ptr, int bios)
 static inline void z_erofs_vle_read_endio(struct bio *bio)
 {
 	const blk_status_t err = bio->bi_status;
+	struct erofs_sb_info *sbi = NULL;
 	unsigned int i;
 	struct bio_vec *bvec;
-#ifdef EROFS_FS_HAS_MANAGED_CACHE
-	struct address_space *mc = NULL;
-#endif
 	struct bvec_iter_all iter_all;
 
 	bio_for_each_segment_all(bvec, bio, i, iter_all) {
@@ -858,20 +856,12 @@ static inline void z_erofs_vle_read_endio(struct bio *bio)
 		DBG_BUGON(PageUptodate(page));
 		DBG_BUGON(!page->mapping);
 
-#ifdef EROFS_FS_HAS_MANAGED_CACHE
-		if (unlikely(!mc && !z_erofs_is_stagingpage(page))) {
-			struct inode *const inode = page->mapping->host;
-			struct super_block *const sb = inode->i_sb;
-
-			mc = MNGD_MAPPING(EROFS_SB(sb));
-		}
+		if (unlikely(!sbi && !z_erofs_is_stagingpage(page)))
+			sbi = EROFS_SB(page->mapping->host->i_sb);
 
-		/*
-		 * If mc has not gotten, it equals NULL,
-		 * however, page->mapping never be NULL if working properly.
-		 */
-		cachemngd = (page->mapping = mc);
-#endif
+		/* sbi should already be gotten if the page is managed */
+		if (sbi)
+			cachemngd = erofs_page_is_managed(sbi, page);
 
 		if (unlikely(err))
 			SetPageError(page);
@@ -972,6 +962,7 @@ static int z_erofs_vle_unzip(struct super_block *sb,
 	overlapped = false;
 	compressed_pages = grp->compressed_pages;
 
+	err = 0;
 	for (i = 0; i < clusterpages; ++i) {
 		unsigned int pagenr;
 
@@ -981,26 +972,37 @@ static int z_erofs_vle_unzip(struct super_block *sb,
 		DBG_BUGON(!page);
 		DBG_BUGON(!page->mapping);
 
-		if (z_erofs_is_stagingpage(page))
-			continue;
-#ifdef EROFS_FS_HAS_MANAGED_CACHE
-		if (page->mapping = MNGD_MAPPING(sbi)) {
-			DBG_BUGON(!PageUptodate(page));
-			continue;
-		}
-#endif
+		if (!z_erofs_is_stagingpage(page)) {
+			if (erofs_page_is_managed(sbi, page)) {
+				if (unlikely(!PageUptodate(page)))
+					err = -EIO;
+				continue;
+			}
+
+			/*
+			 * only if non-head page can be selected
+			 * for inplace decompression
+			 */
+			pagenr = z_erofs_onlinepage_index(page);
 
-		/* only non-head page could be reused as a compressed page */
-		pagenr = z_erofs_onlinepage_index(page);
+			DBG_BUGON(pagenr >= nr_pages);
+			DBG_BUGON(pages[pagenr]);
+			++sparsemem_pages;
+			pages[pagenr] = page;
 
-		DBG_BUGON(pagenr >= nr_pages);
-		DBG_BUGON(pages[pagenr]);
-		++sparsemem_pages;
-		pages[pagenr] = page;
+			overlapped = true;
+		}
 
-		overlapped = true;
+		/* PG_error needs checking for inplaced and staging pages */
+		if (unlikely(PageError(page))) {
+			DBG_BUGON(PageUptodate(page));
+			err = -EIO;
+		}
 	}
 
+	if (unlikely(err))
+		goto out;
+
 	llen = (nr_pages << PAGE_SHIFT) - work->pageofs;
 
 	if (z_erofs_vle_workgrp_fmt(grp) = Z_EROFS_VLE_WORKGRP_FMT_PLAIN) {
@@ -1044,10 +1046,9 @@ static int z_erofs_vle_unzip(struct super_block *sb,
 	for (i = 0; i < clusterpages; ++i) {
 		page = compressed_pages[i];
 
-#ifdef EROFS_FS_HAS_MANAGED_CACHE
-		if (page->mapping = MNGD_MAPPING(sbi))
+		if (erofs_page_is_managed(sbi, page))
 			continue;
-#endif
+
 		/* recycle all individual staging pages */
 		(void)z_erofs_gather_if_stagingpage(page_pool, page);
 
@@ -1198,6 +1199,7 @@ pickup_page_for_submission(struct z_erofs_vle_workgroup *grp,
 	if (page->mapping = mc) {
 		WRITE_ONCE(grp->compressed_pages[nr], page);
 
+		ClearPageError(page);
 		if (!PagePrivate(page)) {
 			/*
 			 * impossible to be !PagePrivate(page) for
-- 
2.17.1

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

* [PATCH] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
@ 2019-03-21  8:33 ` Dan Carpenter
  0 siblings, 0 replies; 15+ messages in thread
From: Dan Carpenter @ 2019-03-21  8:33 UTC (permalink / raw)
  To: Jani Nikula, Chris Wilson
  Cc: David Airlie, intel-gfx, kernel-janitors, Matthew Auld

The mock_context() function returns NULL on error, it doesn't return
error pointers.

Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 .../gpu/drm/i915/selftests/i915_gem_context.c |  4 +-
 drivers/staging/erofs/unzip_vle.c             | 70 ++++++++++---------
 2 files changed, 38 insertions(+), 36 deletions(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
index 4399ef9ebf15..a172dbd9cb9e 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
@@ -1620,8 +1620,8 @@ static int mock_context_barrier(void *arg)
 	mutex_lock(&i915->drm.struct_mutex);
 
 	ctx = mock_context(i915, "mock");
-	if (IS_ERR(ctx)) {
-		err = PTR_ERR(ctx);
+	if (!ctx) {
+		err = -ENOMEM;
 		goto unlock;
 	}
 
diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
index c7b3b21123c1..a711bf61f60c 100644
--- a/drivers/staging/erofs/unzip_vle.c
+++ b/drivers/staging/erofs/unzip_vle.c
@@ -844,11 +844,9 @@ static void z_erofs_vle_unzip_kickoff(void *ptr, int bios)
 static inline void z_erofs_vle_read_endio(struct bio *bio)
 {
 	const blk_status_t err = bio->bi_status;
+	struct erofs_sb_info *sbi = NULL;
 	unsigned int i;
 	struct bio_vec *bvec;
-#ifdef EROFS_FS_HAS_MANAGED_CACHE
-	struct address_space *mc = NULL;
-#endif
 	struct bvec_iter_all iter_all;
 
 	bio_for_each_segment_all(bvec, bio, i, iter_all) {
@@ -858,20 +856,12 @@ static inline void z_erofs_vle_read_endio(struct bio *bio)
 		DBG_BUGON(PageUptodate(page));
 		DBG_BUGON(!page->mapping);
 
-#ifdef EROFS_FS_HAS_MANAGED_CACHE
-		if (unlikely(!mc && !z_erofs_is_stagingpage(page))) {
-			struct inode *const inode = page->mapping->host;
-			struct super_block *const sb = inode->i_sb;
-
-			mc = MNGD_MAPPING(EROFS_SB(sb));
-		}
+		if (unlikely(!sbi && !z_erofs_is_stagingpage(page)))
+			sbi = EROFS_SB(page->mapping->host->i_sb);
 
-		/*
-		 * If mc has not gotten, it equals NULL,
-		 * however, page->mapping never be NULL if working properly.
-		 */
-		cachemngd = (page->mapping == mc);
-#endif
+		/* sbi should already be gotten if the page is managed */
+		if (sbi)
+			cachemngd = erofs_page_is_managed(sbi, page);
 
 		if (unlikely(err))
 			SetPageError(page);
@@ -972,6 +962,7 @@ static int z_erofs_vle_unzip(struct super_block *sb,
 	overlapped = false;
 	compressed_pages = grp->compressed_pages;
 
+	err = 0;
 	for (i = 0; i < clusterpages; ++i) {
 		unsigned int pagenr;
 
@@ -981,26 +972,37 @@ static int z_erofs_vle_unzip(struct super_block *sb,
 		DBG_BUGON(!page);
 		DBG_BUGON(!page->mapping);
 
-		if (z_erofs_is_stagingpage(page))
-			continue;
-#ifdef EROFS_FS_HAS_MANAGED_CACHE
-		if (page->mapping == MNGD_MAPPING(sbi)) {
-			DBG_BUGON(!PageUptodate(page));
-			continue;
-		}
-#endif
+		if (!z_erofs_is_stagingpage(page)) {
+			if (erofs_page_is_managed(sbi, page)) {
+				if (unlikely(!PageUptodate(page)))
+					err = -EIO;
+				continue;
+			}
+
+			/*
+			 * only if non-head page can be selected
+			 * for inplace decompression
+			 */
+			pagenr = z_erofs_onlinepage_index(page);
 
-		/* only non-head page could be reused as a compressed page */
-		pagenr = z_erofs_onlinepage_index(page);
+			DBG_BUGON(pagenr >= nr_pages);
+			DBG_BUGON(pages[pagenr]);
+			++sparsemem_pages;
+			pages[pagenr] = page;
 
-		DBG_BUGON(pagenr >= nr_pages);
-		DBG_BUGON(pages[pagenr]);
-		++sparsemem_pages;
-		pages[pagenr] = page;
+			overlapped = true;
+		}
 
-		overlapped = true;
+		/* PG_error needs checking for inplaced and staging pages */
+		if (unlikely(PageError(page))) {
+			DBG_BUGON(PageUptodate(page));
+			err = -EIO;
+		}
 	}
 
+	if (unlikely(err))
+		goto out;
+
 	llen = (nr_pages << PAGE_SHIFT) - work->pageofs;
 
 	if (z_erofs_vle_workgrp_fmt(grp) == Z_EROFS_VLE_WORKGRP_FMT_PLAIN) {
@@ -1044,10 +1046,9 @@ static int z_erofs_vle_unzip(struct super_block *sb,
 	for (i = 0; i < clusterpages; ++i) {
 		page = compressed_pages[i];
 
-#ifdef EROFS_FS_HAS_MANAGED_CACHE
-		if (page->mapping == MNGD_MAPPING(sbi))
+		if (erofs_page_is_managed(sbi, page))
 			continue;
-#endif
+
 		/* recycle all individual staging pages */
 		(void)z_erofs_gather_if_stagingpage(page_pool, page);
 
@@ -1198,6 +1199,7 @@ pickup_page_for_submission(struct z_erofs_vle_workgroup *grp,
 	if (page->mapping == mc) {
 		WRITE_ONCE(grp->compressed_pages[nr], page);
 
+		ClearPageError(page);
 		if (!PagePrivate(page)) {
 			/*
 			 * impossible to be !PagePrivate(page) for
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
  2019-03-21  8:33 ` Dan Carpenter
@ 2019-03-21  8:58   ` Mika Kuoppala
  -1 siblings, 0 replies; 15+ messages in thread
From: Mika Kuoppala @ 2019-03-21  8:58 UTC (permalink / raw)
  To: Dan Carpenter, Jani Nikula, Chris Wilson
  Cc: David Airlie, intel-gfx, kernel-janitors, Matthew Auld

Dan Carpenter <dan.carpenter@oracle.com> writes:

> The mock_context() function returns NULL on error, it doesn't return
> error pointers.
>
> Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  .../gpu/drm/i915/selftests/i915_gem_context.c |  4 +-
>  drivers/staging/erofs/unzip_vle.c             | 70 ++++++++++---------
>  2 files changed, 38 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> index 4399ef9ebf15..a172dbd9cb9e 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> @@ -1620,8 +1620,8 @@ static int mock_context_barrier(void *arg)
>  	mutex_lock(&i915->drm.struct_mutex);
>  
>  	ctx = mock_context(i915, "mock");
> -	if (IS_ERR(ctx)) {
> -		err = PTR_ERR(ctx);
> +	if (!ctx) {
> +		err = -ENOMEM;
>  		goto unlock;
>  	}

Yup.

The rest of the diff is unrelated tho, please resend.

-Mika

>  
> diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
> index c7b3b21123c1..a711bf61f60c 100644
> --- a/drivers/staging/erofs/unzip_vle.c
> +++ b/drivers/staging/erofs/unzip_vle.c
> @@ -844,11 +844,9 @@ static void z_erofs_vle_unzip_kickoff(void *ptr, int bios)
>  static inline void z_erofs_vle_read_endio(struct bio *bio)
>  {
>  	const blk_status_t err = bio->bi_status;
> +	struct erofs_sb_info *sbi = NULL;
>  	unsigned int i;
>  	struct bio_vec *bvec;
> -#ifdef EROFS_FS_HAS_MANAGED_CACHE
> -	struct address_space *mc = NULL;
> -#endif
>  	struct bvec_iter_all iter_all;
>  
>  	bio_for_each_segment_all(bvec, bio, i, iter_all) {
> @@ -858,20 +856,12 @@ static inline void z_erofs_vle_read_endio(struct bio *bio)
>  		DBG_BUGON(PageUptodate(page));
>  		DBG_BUGON(!page->mapping);
>  
> -#ifdef EROFS_FS_HAS_MANAGED_CACHE
> -		if (unlikely(!mc && !z_erofs_is_stagingpage(page))) {
> -			struct inode *const inode = page->mapping->host;
> -			struct super_block *const sb = inode->i_sb;
> -
> -			mc = MNGD_MAPPING(EROFS_SB(sb));
> -		}
> +		if (unlikely(!sbi && !z_erofs_is_stagingpage(page)))
> +			sbi = EROFS_SB(page->mapping->host->i_sb);
>  
> -		/*
> -		 * If mc has not gotten, it equals NULL,
> -		 * however, page->mapping never be NULL if working properly.
> -		 */
> -		cachemngd = (page->mapping = mc);
> -#endif
> +		/* sbi should already be gotten if the page is managed */
> +		if (sbi)
> +			cachemngd = erofs_page_is_managed(sbi, page);
>  
>  		if (unlikely(err))
>  			SetPageError(page);
> @@ -972,6 +962,7 @@ static int z_erofs_vle_unzip(struct super_block *sb,
>  	overlapped = false;
>  	compressed_pages = grp->compressed_pages;
>  
> +	err = 0;
>  	for (i = 0; i < clusterpages; ++i) {
>  		unsigned int pagenr;
>  
> @@ -981,26 +972,37 @@ static int z_erofs_vle_unzip(struct super_block *sb,
>  		DBG_BUGON(!page);
>  		DBG_BUGON(!page->mapping);
>  
> -		if (z_erofs_is_stagingpage(page))
> -			continue;
> -#ifdef EROFS_FS_HAS_MANAGED_CACHE
> -		if (page->mapping = MNGD_MAPPING(sbi)) {
> -			DBG_BUGON(!PageUptodate(page));
> -			continue;
> -		}
> -#endif
> +		if (!z_erofs_is_stagingpage(page)) {
> +			if (erofs_page_is_managed(sbi, page)) {
> +				if (unlikely(!PageUptodate(page)))
> +					err = -EIO;
> +				continue;
> +			}
> +
> +			/*
> +			 * only if non-head page can be selected
> +			 * for inplace decompression
> +			 */
> +			pagenr = z_erofs_onlinepage_index(page);
>  
> -		/* only non-head page could be reused as a compressed page */
> -		pagenr = z_erofs_onlinepage_index(page);
> +			DBG_BUGON(pagenr >= nr_pages);
> +			DBG_BUGON(pages[pagenr]);
> +			++sparsemem_pages;
> +			pages[pagenr] = page;
>  
> -		DBG_BUGON(pagenr >= nr_pages);
> -		DBG_BUGON(pages[pagenr]);
> -		++sparsemem_pages;
> -		pages[pagenr] = page;
> +			overlapped = true;
> +		}
>  
> -		overlapped = true;
> +		/* PG_error needs checking for inplaced and staging pages */
> +		if (unlikely(PageError(page))) {
> +			DBG_BUGON(PageUptodate(page));
> +			err = -EIO;
> +		}
>  	}
>  
> +	if (unlikely(err))
> +		goto out;
> +
>  	llen = (nr_pages << PAGE_SHIFT) - work->pageofs;
>  
>  	if (z_erofs_vle_workgrp_fmt(grp) = Z_EROFS_VLE_WORKGRP_FMT_PLAIN) {
> @@ -1044,10 +1046,9 @@ static int z_erofs_vle_unzip(struct super_block *sb,
>  	for (i = 0; i < clusterpages; ++i) {
>  		page = compressed_pages[i];
>  
> -#ifdef EROFS_FS_HAS_MANAGED_CACHE
> -		if (page->mapping = MNGD_MAPPING(sbi))
> +		if (erofs_page_is_managed(sbi, page))
>  			continue;
> -#endif
> +
>  		/* recycle all individual staging pages */
>  		(void)z_erofs_gather_if_stagingpage(page_pool, page);
>  
> @@ -1198,6 +1199,7 @@ pickup_page_for_submission(struct z_erofs_vle_workgroup *grp,
>  	if (page->mapping = mc) {
>  		WRITE_ONCE(grp->compressed_pages[nr], page);
>  
> +		ClearPageError(page);
>  		if (!PagePrivate(page)) {
>  			/*
>  			 * impossible to be !PagePrivate(page) for
> -- 
> 2.17.1

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

* Re: [PATCH] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
@ 2019-03-21  8:58   ` Mika Kuoppala
  0 siblings, 0 replies; 15+ messages in thread
From: Mika Kuoppala @ 2019-03-21  8:58 UTC (permalink / raw)
  To: Dan Carpenter, Jani Nikula, Chris Wilson
  Cc: David Airlie, intel-gfx, kernel-janitors, Matthew Auld

Dan Carpenter <dan.carpenter@oracle.com> writes:

> The mock_context() function returns NULL on error, it doesn't return
> error pointers.
>
> Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  .../gpu/drm/i915/selftests/i915_gem_context.c |  4 +-
>  drivers/staging/erofs/unzip_vle.c             | 70 ++++++++++---------
>  2 files changed, 38 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> index 4399ef9ebf15..a172dbd9cb9e 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> @@ -1620,8 +1620,8 @@ static int mock_context_barrier(void *arg)
>  	mutex_lock(&i915->drm.struct_mutex);
>  
>  	ctx = mock_context(i915, "mock");
> -	if (IS_ERR(ctx)) {
> -		err = PTR_ERR(ctx);
> +	if (!ctx) {
> +		err = -ENOMEM;
>  		goto unlock;
>  	}

Yup.

The rest of the diff is unrelated tho, please resend.

-Mika

>  
> diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
> index c7b3b21123c1..a711bf61f60c 100644
> --- a/drivers/staging/erofs/unzip_vle.c
> +++ b/drivers/staging/erofs/unzip_vle.c
> @@ -844,11 +844,9 @@ static void z_erofs_vle_unzip_kickoff(void *ptr, int bios)
>  static inline void z_erofs_vle_read_endio(struct bio *bio)
>  {
>  	const blk_status_t err = bio->bi_status;
> +	struct erofs_sb_info *sbi = NULL;
>  	unsigned int i;
>  	struct bio_vec *bvec;
> -#ifdef EROFS_FS_HAS_MANAGED_CACHE
> -	struct address_space *mc = NULL;
> -#endif
>  	struct bvec_iter_all iter_all;
>  
>  	bio_for_each_segment_all(bvec, bio, i, iter_all) {
> @@ -858,20 +856,12 @@ static inline void z_erofs_vle_read_endio(struct bio *bio)
>  		DBG_BUGON(PageUptodate(page));
>  		DBG_BUGON(!page->mapping);
>  
> -#ifdef EROFS_FS_HAS_MANAGED_CACHE
> -		if (unlikely(!mc && !z_erofs_is_stagingpage(page))) {
> -			struct inode *const inode = page->mapping->host;
> -			struct super_block *const sb = inode->i_sb;
> -
> -			mc = MNGD_MAPPING(EROFS_SB(sb));
> -		}
> +		if (unlikely(!sbi && !z_erofs_is_stagingpage(page)))
> +			sbi = EROFS_SB(page->mapping->host->i_sb);
>  
> -		/*
> -		 * If mc has not gotten, it equals NULL,
> -		 * however, page->mapping never be NULL if working properly.
> -		 */
> -		cachemngd = (page->mapping == mc);
> -#endif
> +		/* sbi should already be gotten if the page is managed */
> +		if (sbi)
> +			cachemngd = erofs_page_is_managed(sbi, page);
>  
>  		if (unlikely(err))
>  			SetPageError(page);
> @@ -972,6 +962,7 @@ static int z_erofs_vle_unzip(struct super_block *sb,
>  	overlapped = false;
>  	compressed_pages = grp->compressed_pages;
>  
> +	err = 0;
>  	for (i = 0; i < clusterpages; ++i) {
>  		unsigned int pagenr;
>  
> @@ -981,26 +972,37 @@ static int z_erofs_vle_unzip(struct super_block *sb,
>  		DBG_BUGON(!page);
>  		DBG_BUGON(!page->mapping);
>  
> -		if (z_erofs_is_stagingpage(page))
> -			continue;
> -#ifdef EROFS_FS_HAS_MANAGED_CACHE
> -		if (page->mapping == MNGD_MAPPING(sbi)) {
> -			DBG_BUGON(!PageUptodate(page));
> -			continue;
> -		}
> -#endif
> +		if (!z_erofs_is_stagingpage(page)) {
> +			if (erofs_page_is_managed(sbi, page)) {
> +				if (unlikely(!PageUptodate(page)))
> +					err = -EIO;
> +				continue;
> +			}
> +
> +			/*
> +			 * only if non-head page can be selected
> +			 * for inplace decompression
> +			 */
> +			pagenr = z_erofs_onlinepage_index(page);
>  
> -		/* only non-head page could be reused as a compressed page */
> -		pagenr = z_erofs_onlinepage_index(page);
> +			DBG_BUGON(pagenr >= nr_pages);
> +			DBG_BUGON(pages[pagenr]);
> +			++sparsemem_pages;
> +			pages[pagenr] = page;
>  
> -		DBG_BUGON(pagenr >= nr_pages);
> -		DBG_BUGON(pages[pagenr]);
> -		++sparsemem_pages;
> -		pages[pagenr] = page;
> +			overlapped = true;
> +		}
>  
> -		overlapped = true;
> +		/* PG_error needs checking for inplaced and staging pages */
> +		if (unlikely(PageError(page))) {
> +			DBG_BUGON(PageUptodate(page));
> +			err = -EIO;
> +		}
>  	}
>  
> +	if (unlikely(err))
> +		goto out;
> +
>  	llen = (nr_pages << PAGE_SHIFT) - work->pageofs;
>  
>  	if (z_erofs_vle_workgrp_fmt(grp) == Z_EROFS_VLE_WORKGRP_FMT_PLAIN) {
> @@ -1044,10 +1046,9 @@ static int z_erofs_vle_unzip(struct super_block *sb,
>  	for (i = 0; i < clusterpages; ++i) {
>  		page = compressed_pages[i];
>  
> -#ifdef EROFS_FS_HAS_MANAGED_CACHE
> -		if (page->mapping == MNGD_MAPPING(sbi))
> +		if (erofs_page_is_managed(sbi, page))
>  			continue;
> -#endif
> +
>  		/* recycle all individual staging pages */
>  		(void)z_erofs_gather_if_stagingpage(page_pool, page);
>  
> @@ -1198,6 +1199,7 @@ pickup_page_for_submission(struct z_erofs_vle_workgroup *grp,
>  	if (page->mapping == mc) {
>  		WRITE_ONCE(grp->compressed_pages[nr], page);
>  
> +		ClearPageError(page);
>  		if (!PagePrivate(page)) {
>  			/*
>  			 * impossible to be !PagePrivate(page) for
> -- 
> 2.17.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
  2019-03-21  8:58   ` Mika Kuoppala
@ 2019-03-21  9:22     ` Dan Carpenter
  -1 siblings, 0 replies; 15+ messages in thread
From: Dan Carpenter @ 2019-03-21  9:22 UTC (permalink / raw)
  To: Mika Kuoppala; +Cc: David Airlie, intel-gfx, kernel-janitors, Matthew Auld

On Thu, Mar 21, 2019 at 10:58:40AM +0200, Mika Kuoppala wrote:
> Dan Carpenter <dan.carpenter@oracle.com> writes:
> 
> > The mock_context() function returns NULL on error, it doesn't return
> > error pointers.
> >
> > Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> >  .../gpu/drm/i915/selftests/i915_gem_context.c |  4 +-
> >  drivers/staging/erofs/unzip_vle.c             | 70 ++++++++++---------
> >  2 files changed, 38 insertions(+), 36 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > index 4399ef9ebf15..a172dbd9cb9e 100644
> > --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > @@ -1620,8 +1620,8 @@ static int mock_context_barrier(void *arg)
> >  	mutex_lock(&i915->drm.struct_mutex);
> >  
> >  	ctx = mock_context(i915, "mock");
> > -	if (IS_ERR(ctx)) {
> > -		err = PTR_ERR(ctx);
> > +	if (!ctx) {
> > +		err = -ENOMEM;
> >  		goto unlock;
> >  	}
> 
> Yup.
> 
> The rest of the diff is unrelated tho, please resend.
> 

Oh, crap.  Sorry!  It was below the bottom of my page in my email client
so I didn't see it.

regards,
dan carpenter

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

* Re: [PATCH] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
@ 2019-03-21  9:22     ` Dan Carpenter
  0 siblings, 0 replies; 15+ messages in thread
From: Dan Carpenter @ 2019-03-21  9:22 UTC (permalink / raw)
  To: Mika Kuoppala; +Cc: David Airlie, intel-gfx, kernel-janitors, Matthew Auld

On Thu, Mar 21, 2019 at 10:58:40AM +0200, Mika Kuoppala wrote:
> Dan Carpenter <dan.carpenter@oracle.com> writes:
> 
> > The mock_context() function returns NULL on error, it doesn't return
> > error pointers.
> >
> > Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> >  .../gpu/drm/i915/selftests/i915_gem_context.c |  4 +-
> >  drivers/staging/erofs/unzip_vle.c             | 70 ++++++++++---------
> >  2 files changed, 38 insertions(+), 36 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > index 4399ef9ebf15..a172dbd9cb9e 100644
> > --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > @@ -1620,8 +1620,8 @@ static int mock_context_barrier(void *arg)
> >  	mutex_lock(&i915->drm.struct_mutex);
> >  
> >  	ctx = mock_context(i915, "mock");
> > -	if (IS_ERR(ctx)) {
> > -		err = PTR_ERR(ctx);
> > +	if (!ctx) {
> > +		err = -ENOMEM;
> >  		goto unlock;
> >  	}
> 
> Yup.
> 
> The rest of the diff is unrelated tho, please resend.
> 

Oh, crap.  Sorry!  It was below the bottom of my page in my email client
so I didn't see it.

regards,
dan carpenter

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH v2] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
  2019-03-21  8:58   ` Mika Kuoppala
@ 2019-03-21  9:24     ` Dan Carpenter
  -1 siblings, 0 replies; 15+ messages in thread
From: Dan Carpenter @ 2019-03-21  9:24 UTC (permalink / raw)
  To: Jani Nikula, Chris Wilson
  Cc: David Airlie, intel-gfx, kernel-janitors, Matthew Auld

The mock_context() function returns NULL on error, it doesn't return
error pointers.

Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
V2: I accidentally sent a bunch of unrelated stuff...

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
index 4399ef9ebf15..a172dbd9cb9e 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
@@ -1620,8 +1620,8 @@ static int mock_context_barrier(void *arg)
 	mutex_lock(&i915->drm.struct_mutex);
 
 	ctx = mock_context(i915, "mock");
-	if (IS_ERR(ctx)) {
-		err = PTR_ERR(ctx);
+	if (!ctx) {
+		err = -ENOMEM;
 		goto unlock;
 	}
 

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

* [PATCH v2] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
@ 2019-03-21  9:24     ` Dan Carpenter
  0 siblings, 0 replies; 15+ messages in thread
From: Dan Carpenter @ 2019-03-21  9:24 UTC (permalink / raw)
  To: Jani Nikula, Chris Wilson
  Cc: David Airlie, intel-gfx, kernel-janitors, Matthew Auld

The mock_context() function returns NULL on error, it doesn't return
error pointers.

Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
V2: I accidentally sent a bunch of unrelated stuff...

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
index 4399ef9ebf15..a172dbd9cb9e 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
@@ -1620,8 +1620,8 @@ static int mock_context_barrier(void *arg)
 	mutex_lock(&i915->drm.struct_mutex);
 
 	ctx = mock_context(i915, "mock");
-	if (IS_ERR(ctx)) {
-		err = PTR_ERR(ctx);
+	if (!ctx) {
+		err = -ENOMEM;
 		goto unlock;
 	}
 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.BAT: success for drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
  2019-03-21  8:33 ` Dan Carpenter
  (?)
  (?)
@ 2019-03-21  9:25 ` Patchwork
  -1 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2019-03-21  9:25 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
URL   : https://patchwork.freedesktop.org/series/58337/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5785 -> Patchwork_12543
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/58337/revisions/1/mbox/

Known issues
------------

  Here are the changes found in Patchwork_12543 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@kms_frontbuffer_tracking@basic:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103167]

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103191] / [fdo#107362]

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
    - fi-byt-clapper:     PASS -> FAIL [fdo#107362]

  * igt@prime_vgem@basic-fence-flip:
    - fi-gdg-551:         PASS -> FAIL [fdo#103182]

  * igt@runner@aborted:
    - fi-apl-guc:         NOTRUN -> FAIL [fdo#108622] / [fdo#109720]

  
#### Possible fixes ####

  * igt@kms_busy@basic-flip-b:
    - fi-gdg-551:         FAIL [fdo#103182] -> PASS

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
    - fi-byt-clapper:     FAIL [fdo#103191] / [fdo#107362] -> PASS

  * igt@prime_vgem@basic-fence-flip:
    - fi-ilk-650:         FAIL [fdo#104008] -> PASS

  
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
  [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720


Participating hosts (47 -> 38)
------------------------------

  Missing    (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-bsw-n3050 fi-hsw-peppy fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus 


Build changes
-------------

    * Linux: CI_DRM_5785 -> Patchwork_12543

  CI_DRM_5785: 1e3d80c25878b7d97ad6c0680a452d55baeb28e0 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4894: fedd92f4022837e2c20e472b65bd7d0849f484a3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12543: e1d32fd6d36cc77eac841ab1b20a7574698f510d @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

e1d32fd6d36c drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12543/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
  2019-03-21  9:24     ` Dan Carpenter
@ 2019-03-21 10:01       ` Mika Kuoppala
  -1 siblings, 0 replies; 15+ messages in thread
From: Mika Kuoppala @ 2019-03-21 10:01 UTC (permalink / raw)
  To: Dan Carpenter, Jani Nikula, Chris Wilson
  Cc: David Airlie, intel-gfx, kernel-janitors, Matthew Auld

Dan Carpenter <dan.carpenter@oracle.com> writes:

> The mock_context() function returns NULL on error, it doesn't return
> error pointers.
>
> Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
> V2: I accidentally sent a bunch of unrelated stuff...
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> index 4399ef9ebf15..a172dbd9cb9e 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> @@ -1620,8 +1620,8 @@ static int mock_context_barrier(void *arg)
>  	mutex_lock(&i915->drm.struct_mutex);
>  
>  	ctx = mock_context(i915, "mock");
> -	if (IS_ERR(ctx)) {
> -		err = PTR_ERR(ctx);
> +	if (!ctx) {
> +		err = -ENOMEM;
>  		goto unlock;
>  	}
>  

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

* Re: [PATCH v2] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
@ 2019-03-21 10:01       ` Mika Kuoppala
  0 siblings, 0 replies; 15+ messages in thread
From: Mika Kuoppala @ 2019-03-21 10:01 UTC (permalink / raw)
  To: Dan Carpenter, Jani Nikula, Chris Wilson
  Cc: David Airlie, intel-gfx, kernel-janitors, Matthew Auld

Dan Carpenter <dan.carpenter@oracle.com> writes:

> The mock_context() function returns NULL on error, it doesn't return
> error pointers.
>
> Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
> V2: I accidentally sent a bunch of unrelated stuff...
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> index 4399ef9ebf15..a172dbd9cb9e 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> @@ -1620,8 +1620,8 @@ static int mock_context_barrier(void *arg)
>  	mutex_lock(&i915->drm.struct_mutex);
>  
>  	ctx = mock_context(i915, "mock");
> -	if (IS_ERR(ctx)) {
> -		err = PTR_ERR(ctx);
> +	if (!ctx) {
> +		err = -ENOMEM;
>  		goto unlock;
>  	}
>  
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.BAT: success for drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier() (rev2)
  2019-03-21  8:33 ` Dan Carpenter
                   ` (2 preceding siblings ...)
  (?)
@ 2019-03-21 12:40 ` Patchwork
  -1 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2019-03-21 12:40 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier() (rev2)
URL   : https://patchwork.freedesktop.org/series/58337/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5787 -> Patchwork_12545
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/58337/revisions/2/mbox/

Known issues
------------

  Here are the changes found in Patchwork_12545 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@kms_busy@basic-flip-a:
    - fi-bsw-n3050:       NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

  * igt@kms_chamelium@hdmi-crc-fast:
    - fi-bsw-n3050:       NOTRUN -> SKIP [fdo#109271] +62

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-bxt-j4205:       NOTRUN -> SKIP [fdo#109271] +47

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103191] / [fdo#107362] +1

  * igt@kms_psr@primary_mmap_gtt:
    - fi-blb-e6850:       NOTRUN -> SKIP [fdo#109271] +27

  
#### Possible fixes ####

  * igt@kms_frontbuffer_tracking@basic:
    - fi-byt-clapper:     FAIL [fdo#103167] -> PASS

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-blb-e6850:       INCOMPLETE [fdo#107718] -> PASS

  
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278


Participating hosts (42 -> 33)
------------------------------

  Additional (2): fi-bxt-j4205 fi-bsw-n3050 
  Missing    (11): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-gdg-551 fi-icl-u3 fi-pnv-d510 fi-bsw-kefka fi-bdw-samus 


Build changes
-------------

    * Linux: CI_DRM_5787 -> Patchwork_12545

  CI_DRM_5787: 8a27af0b94f56d403bc7806a64a50013a2dd9396 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4896: 0f9c061247fb7aba21c9459f19f437927a28f32c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12545: 3b5fd61728257fea61f0d405abc63aa30c8b6154 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

3b5fd6172825 drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12545/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
  2019-03-21 10:01       ` Mika Kuoppala
@ 2019-03-21 13:31         ` Chris Wilson
  -1 siblings, 0 replies; 15+ messages in thread
From: Chris Wilson @ 2019-03-21 13:31 UTC (permalink / raw)
  To: Dan Carpenter, Jani Nikula, Mika Kuoppala
  Cc: David Airlie, intel-gfx, kernel-janitors, Matthew Auld

Quoting Mika Kuoppala (2019-03-21 10:01:13)
> Dan Carpenter <dan.carpenter@oracle.com> writes:
> 
> > The mock_context() function returns NULL on error, it doesn't return
> > error pointers.
> >
> > Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

And pushed, thanks for the fix!
-Chris

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

* Re: [PATCH v2] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier()
@ 2019-03-21 13:31         ` Chris Wilson
  0 siblings, 0 replies; 15+ messages in thread
From: Chris Wilson @ 2019-03-21 13:31 UTC (permalink / raw)
  To: Dan Carpenter, Jani Nikula, Mika Kuoppala
  Cc: David Airlie, intel-gfx, kernel-janitors, Matthew Auld

Quoting Mika Kuoppala (2019-03-21 10:01:13)
> Dan Carpenter <dan.carpenter@oracle.com> writes:
> 
> > The mock_context() function returns NULL on error, it doesn't return
> > error pointers.
> >
> > Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

And pushed, thanks for the fix!
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier() (rev2)
  2019-03-21  8:33 ` Dan Carpenter
                   ` (3 preceding siblings ...)
  (?)
@ 2019-03-22  0:26 ` Patchwork
  -1 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2019-03-22  0:26 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier() (rev2)
URL   : https://patchwork.freedesktop.org/series/58337/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5787_full -> Patchwork_12545_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_12545_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_bad_reloc@negative-reloc-lut-bsd1:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109276] +5

  * igt@gem_exec_parallel@vebox-contexts:
    - shard-glk:          PASS -> DMESG-WARN [fdo#105763] / [fdo#106538]

  * igt@gem_linear_blits@interruptible:
    - shard-iclb:         PASS -> TIMEOUT [fdo#109673] +1

  * igt@gem_mmap_gtt@hang:
    - shard-iclb:         PASS -> FAIL [fdo#109677]

  * igt@gem_mocs_settings@mocs-reset-dirty-render:
    - shard-iclb:         NOTRUN -> SKIP [fdo#110206]

  * igt@gem_pwrite@big-cpu-fbr:
    - shard-skl:          NOTRUN -> SKIP [fdo#109271] +117

  * igt@gem_stolen@stolen-pread:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109277]

  * igt@gem_wait@wait-bsd2:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] +34

  * igt@i915_pm_lpsp@edp-native:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109301]

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - shard-kbl:          PASS -> SKIP [fdo#109271]

  * igt@i915_pm_rpm@debugfs-forcewake-user:
    - shard-skl:          PASS -> INCOMPLETE [fdo#107807]

  * igt@i915_pm_rpm@i2c:
    - shard-iclb:         PASS -> DMESG-WARN [fdo#109982]

  * igt@i915_pm_rpm@modeset-non-lpsp-stress-no-wait:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109308]

  * igt@kms_atomic_transition@3x-modeset-transitions:
    - shard-skl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +9

  * igt@kms_busy@extended-modeset-hang-newfb-render-b:
    - shard-kbl:          NOTRUN -> DMESG-WARN [fdo#107956]
    - shard-iclb:         NOTRUN -> DMESG-WARN [fdo#107956]

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
    - shard-kbl:          PASS -> DMESG-WARN [fdo#107956]
    - shard-skl:          NOTRUN -> DMESG-WARN [fdo#107956]

  * igt@kms_busy@extended-pageflip-hang-oldfb-render-e:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2
    - shard-iclb:         NOTRUN -> SKIP [fdo#109278] +2

  * igt@kms_chamelium@vga-frame-dump:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109284]

  * igt@kms_cursor_legacy@cursor-vs-flip-legacy:
    - shard-iclb:         PASS -> FAIL [fdo#103355]

  * igt@kms_cursor_legacy@cursorb-vs-flipb-legacy:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109274] +1

  * igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite:
    - shard-iclb:         PASS -> FAIL [fdo#103167] +3

  * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-pwrite:
    - shard-iclb:         PASS -> FAIL [fdo#105682] / [fdo#109247]

  * igt@kms_frontbuffer_tracking@fbcpsr-stridechange:
    - shard-skl:          NOTRUN -> FAIL [fdo#105683]

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-cpu:
    - shard-iclb:         PASS -> FAIL [fdo#109247] +24

  * igt@kms_frontbuffer_tracking@psr-2p-primscrn-spr-indfb-draw-pwrite:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] +38

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-cur-indfb-draw-mmap-wc:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109280] +6

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
    - shard-kbl:          PASS -> INCOMPLETE [fdo#103665]

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
    - shard-skl:          PASS -> INCOMPLETE [fdo#104108] / [fdo#107773]

  * igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
    - shard-kbl:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
    - shard-skl:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
    - shard-skl:          NOTRUN -> FAIL [fdo#107815]

  * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-mid:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3

  * igt@kms_psr@primary_mmap_cpu:
    - shard-iclb:         PASS -> FAIL [fdo#107383] / [fdo#110215] +2

  * igt@kms_psr@psr2_dpms:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109441]

  * igt@kms_psr@psr2_primary_page_flip:
    - shard-iclb:         PASS -> SKIP [fdo#109441] +3

  * igt@kms_universal_plane@disable-primary-vs-flip-pipe-d:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_vblank@pipe-b-ts-continuation-modeset-rpm:
    - shard-apl:          PASS -> FAIL [fdo#104894] +1

  * igt@kms_vrr@flip-basic:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109502]

  * igt@perf_pmu@rc6-runtime-pm-long:
    - shard-skl:          PASS -> FAIL [fdo#105010]

  * igt@prime_nv_test@i915_import_pread_pwrite:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271]

  * igt@prime_vgem@fence-read-hang:
    - shard-iclb:         NOTRUN -> SKIP [fdo#109295]

  
#### Possible fixes ####

  * igt@gem_tiled_swapping@non-threaded:
    - shard-iclb:         FAIL [fdo#108686] -> PASS

  * igt@i915_selftest@live_workarounds:
    - shard-iclb:         DMESG-FAIL [fdo#108954] -> PASS

  * igt@kms_cursor_crc@cursor-128x128-suspend:
    - shard-skl:          INCOMPLETE [fdo#104108] -> PASS

  * igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions-varying-size:
    - shard-iclb:         FAIL [fdo#103355] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-stridechange:
    - shard-iclb:         FAIL [fdo#105682] / [fdo#108040] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-tilingchange:
    - shard-iclb:         FAIL [fdo#103167] -> PASS +4

  * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-mmap-wc:
    - shard-iclb:         FAIL [fdo#105682] / [fdo#109247] -> PASS +1

  * igt@kms_frontbuffer_tracking@psr-rgb101010-draw-blt:
    - shard-iclb:         FAIL [fdo#109247] -> PASS +20

  * {igt@kms_plane@pixel-format-pipe-c-planes}:
    - shard-glk:          SKIP [fdo#109271] -> PASS +1

  * igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
    - shard-skl:          FAIL [fdo#107815] / [fdo#108145] -> PASS

  * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
    - shard-skl:          FAIL [fdo#108145] -> PASS

  * igt@kms_psr2_su@frontbuffer:
    - shard-iclb:         SKIP [fdo#109642] -> PASS

  * igt@kms_psr@primary_render:
    - shard-iclb:         FAIL [fdo#107383] / [fdo#110215] -> PASS +2

  * igt@kms_psr@psr2_no_drrs:
    - shard-iclb:         SKIP [fdo#109441] -> PASS +2

  * igt@kms_setmode@basic:
    - shard-apl:          FAIL [fdo#99912] -> PASS
    - shard-hsw:          FAIL [fdo#99912] -> PASS

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-skl:          INCOMPLETE [fdo#104108] / [fdo#107773] -> PASS
    - shard-iclb:         FAIL [fdo#104894] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
  [fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
  [fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
  [fdo#105683]: https://bugs.freedesktop.org/show_bug.cgi?id=105683
  [fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
  [fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
  [fdo#107383]: https://bugs.freedesktop.org/show_bug.cgi?id=107383
  [fdo#107773]: https://bugs.freedesktop.org/show_bug.cgi?id=107773
  [fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
  [fdo#107815]: https://bugs.freedesktop.org/show_bug.cgi?id=107815
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108040]: https://bugs.freedesktop.org/show_bug.cgi?id=108040
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#108954]: https://bugs.freedesktop.org/show_bug.cgi?id=108954
  [fdo#109247]: https://bugs.freedesktop.org/show_bug.cgi?id=109247
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109277]: https://bugs.freedesktop.org/show_bug.cgi?id=109277
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [fdo#109301]: https://bugs.freedesktop.org/show_bug.cgi?id=109301
  [fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109502]: https://bugs.freedesktop.org/show_bug.cgi?id=109502
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
  [fdo#109677]: https://bugs.freedesktop.org/show_bug.cgi?id=109677
  [fdo#109982]: https://bugs.freedesktop.org/show_bug.cgi?id=109982
  [fdo#110206]: https://bugs.freedesktop.org/show_bug.cgi?id=110206
  [fdo#110215]: https://bugs.freedesktop.org/show_bug.cgi?id=110215
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts


Build changes
-------------

    * Linux: CI_DRM_5787 -> Patchwork_12545

  CI_DRM_5787: 8a27af0b94f56d403bc7806a64a50013a2dd9396 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4896: 0f9c061247fb7aba21c9459f19f437927a28f32c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12545: 3b5fd61728257fea61f0d405abc63aa30c8b6154 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12545/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2019-03-22  0:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21  8:33 [PATCH] drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier() Dan Carpenter
2019-03-21  8:33 ` Dan Carpenter
2019-03-21  8:58 ` Mika Kuoppala
2019-03-21  8:58   ` Mika Kuoppala
2019-03-21  9:22   ` Dan Carpenter
2019-03-21  9:22     ` Dan Carpenter
2019-03-21  9:24   ` [PATCH v2] " Dan Carpenter
2019-03-21  9:24     ` Dan Carpenter
2019-03-21 10:01     ` Mika Kuoppala
2019-03-21 10:01       ` Mika Kuoppala
2019-03-21 13:31       ` Chris Wilson
2019-03-21 13:31         ` Chris Wilson
2019-03-21  9:25 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-03-21 12:40 ` ✓ Fi.CI.BAT: success for drm/i915/selftests: fix NULL vs IS_ERR() check in mock_context_barrier() (rev2) Patchwork
2019-03-22  0:26 ` ✓ Fi.CI.IGT: " Patchwork

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.