All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] drm/fb-helper: Include prototype for drm_fb_helper_modinit()
@ 2019-07-10 12:51 Ville Syrjala
  2019-07-10 12:51 ` [PATCH 2/5] drm/dsc: Fix bogus cpu_to_be16() usage Ville Syrjala
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Ville Syrjala @ 2019-07-10 12:51 UTC (permalink / raw)
  To: dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Sparse complains:
drivers/gpu/drm/drm_fb_helper.c:2409:12: warning: symbol 'drm_fb_helper_modinit' was not declared. Should it be static?

Include the header with the correct prototype.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_fb_helper.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index a7ba5b4902d6..b75ae8555baf 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -46,6 +46,7 @@
 #include <drm/drm_print.h>
 #include <drm/drm_vblank.h>
 
+#include "drm_crtc_helper_internal.h"
 #include "drm_internal.h"
 
 static bool drm_fbdev_emulation = true;
-- 
2.21.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 2/5] drm/dsc: Fix bogus cpu_to_be16() usage
  2019-07-10 12:51 [PATCH 1/5] drm/fb-helper: Include prototype for drm_fb_helper_modinit() Ville Syrjala
@ 2019-07-10 12:51 ` Ville Syrjala
  2019-07-11 15:36   ` Sean Paul
  2019-07-10 12:51 ` [PATCH 3/5] drm: Include prototype for drm_need_swiotlb() Ville Syrjala
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Ville Syrjala @ 2019-07-10 12:51 UTC (permalink / raw)
  To: dri-devel; +Cc: Manasi Navare, David Francis

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

__be16 = cpu_to_be16(__be16) is nonsense. Do it right.

../drivers/gpu/drm/drm_dsc.c:218:53: warning: incorrect type in assignment (different base types)
../drivers/gpu/drm/drm_dsc.c:218:53:    expected restricted __be16
../drivers/gpu/drm/drm_dsc.c:218:53:    got int
../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16
../drivers/gpu/drm/drm_dsc.c:225:25: warning: incorrect type in argument 1 (different base types)
../drivers/gpu/drm/drm_dsc.c:225:25:    expected unsigned short [usertype] val
../drivers/gpu/drm/drm_dsc.c:225:25:    got restricted __be16
../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16
../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: David Francis <David.Francis@amd.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_dsc.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/drm_dsc.c b/drivers/gpu/drm/drm_dsc.c
index 77f4e5ae4197..f2fc47f123d2 100644
--- a/drivers/gpu/drm/drm_dsc.c
+++ b/drivers/gpu/drm/drm_dsc.c
@@ -216,13 +216,11 @@ void drm_dsc_pps_payload_pack(struct drm_dsc_picture_parameter_set *pps_payload,
 	 */
 	for (i = 0; i < DSC_NUM_BUF_RANGES; i++) {
 		pps_payload->rc_range_parameters[i] =
-			((dsc_cfg->rc_range_params[i].range_min_qp <<
-			  DSC_PPS_RC_RANGE_MINQP_SHIFT) |
-			 (dsc_cfg->rc_range_params[i].range_max_qp <<
-			  DSC_PPS_RC_RANGE_MAXQP_SHIFT) |
-			 (dsc_cfg->rc_range_params[i].range_bpg_offset));
-		pps_payload->rc_range_parameters[i] =
-			cpu_to_be16(pps_payload->rc_range_parameters[i]);
+			cpu_to_be16((dsc_cfg->rc_range_params[i].range_min_qp <<
+				     DSC_PPS_RC_RANGE_MINQP_SHIFT) |
+				    (dsc_cfg->rc_range_params[i].range_max_qp <<
+				     DSC_PPS_RC_RANGE_MAXQP_SHIFT) |
+				    (dsc_cfg->rc_range_params[i].range_bpg_offset));
 	}
 
 	/* PPS 88 */
-- 
2.21.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 3/5] drm: Include prototype for drm_need_swiotlb()
  2019-07-10 12:51 [PATCH 1/5] drm/fb-helper: Include prototype for drm_fb_helper_modinit() Ville Syrjala
  2019-07-10 12:51 ` [PATCH 2/5] drm/dsc: Fix bogus cpu_to_be16() usage Ville Syrjala
@ 2019-07-10 12:51 ` Ville Syrjala
  2019-07-11 15:37   ` Sean Paul
  2019-07-10 12:51 ` [PATCH 4/5] drm/syncobj: Include the prototype for drm_timeout_abs_to_jiffies() Ville Syrjala
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Ville Syrjala @ 2019-07-10 12:51 UTC (permalink / raw)
  To: dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Sparse is not happy:
../drivers/gpu/drm/drm_memory.c:159:6: warning: symbol 'drm_need_swiotlb' was not declared. Should it be static?

Include the correct header for drm_need_swiotlb() prototype.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_memory.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c
index b634e1670190..477937bb902e 100644
--- a/drivers/gpu/drm/drm_memory.c
+++ b/drivers/gpu/drm/drm_memory.c
@@ -40,6 +40,7 @@
 #include <xen/xen.h>
 
 #include <drm/drm_agpsupport.h>
+#include <drm/drm_cache.h>
 #include <drm/drm_device.h>
 
 #include "drm_legacy.h"
-- 
2.21.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 4/5] drm/syncobj: Include the prototype for drm_timeout_abs_to_jiffies()
  2019-07-10 12:51 [PATCH 1/5] drm/fb-helper: Include prototype for drm_fb_helper_modinit() Ville Syrjala
  2019-07-10 12:51 ` [PATCH 2/5] drm/dsc: Fix bogus cpu_to_be16() usage Ville Syrjala
  2019-07-10 12:51 ` [PATCH 3/5] drm: Include prototype for drm_need_swiotlb() Ville Syrjala
@ 2019-07-10 12:51 ` Ville Syrjala
  2019-07-11 15:39   ` Sean Paul
  2019-07-10 12:51 ` [PATCH 5/5] drm: Fix return type of crc .poll() Ville Syrjala
  2019-07-11 15:35 ` [PATCH 1/5] drm/fb-helper: Include prototype for drm_fb_helper_modinit() Sean Paul
  4 siblings, 1 reply; 11+ messages in thread
From: Ville Syrjala @ 2019-07-10 12:51 UTC (permalink / raw)
  To: dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Sparse complains:
../drivers/gpu/drm/drm_syncobj.c:942:13: warning: symbol 'drm_timeout_abs_to_jiffies' was not declared. Should it be static?

Include the correct header with the prototype.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_syncobj.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index a199c8d56b95..00eecc9c464b 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -58,6 +58,7 @@
 #include <drm/drm_gem.h>
 #include <drm/drm_print.h>
 #include <drm/drm_syncobj.h>
+#include <drm/drm_utils.h>
 
 #include "drm_internal.h"
 
-- 
2.21.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 5/5] drm: Fix return type of crc .poll()
  2019-07-10 12:51 [PATCH 1/5] drm/fb-helper: Include prototype for drm_fb_helper_modinit() Ville Syrjala
                   ` (2 preceding siblings ...)
  2019-07-10 12:51 ` [PATCH 4/5] drm/syncobj: Include the prototype for drm_timeout_abs_to_jiffies() Ville Syrjala
@ 2019-07-10 12:51 ` Ville Syrjala
  2019-07-11 15:40   ` Sean Paul
  2019-07-11 15:35 ` [PATCH 1/5] drm/fb-helper: Include prototype for drm_fb_helper_modinit() Sean Paul
  4 siblings, 1 reply; 11+ messages in thread
From: Ville Syrjala @ 2019-07-10 12:51 UTC (permalink / raw)
  To: dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Sparse compains:
../drivers/gpu/drm/drm_debugfs_crc.c:350:17: warning: incorrect type in initializer (different base types)
../drivers/gpu/drm/drm_debugfs_crc.c:350:17:    expected restricted __poll_t ( *poll )( ... )
../drivers/gpu/drm/drm_debugfs_crc.c:350:17:    got unsigned int ( * )( ... )

Change the .poll() return type to __poll_t to silence it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_debugfs_crc.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c
index 7ca486d750e9..284d615ed08b 100644
--- a/drivers/gpu/drm/drm_debugfs_crc.c
+++ b/drivers/gpu/drm/drm_debugfs_crc.c
@@ -325,19 +325,17 @@ static ssize_t crtc_crc_read(struct file *filep, char __user *user_buf,
 	return LINE_LEN(crc->values_cnt);
 }
 
-static unsigned int crtc_crc_poll(struct file *file, poll_table *wait)
+static __poll_t crtc_crc_poll(struct file *file, poll_table *wait)
 {
 	struct drm_crtc *crtc = file->f_inode->i_private;
 	struct drm_crtc_crc *crc = &crtc->crc;
-	unsigned ret;
+	__poll_t ret = 0;
 
 	poll_wait(file, &crc->wq, wait);
 
 	spin_lock_irq(&crc->lock);
 	if (crc->source && crtc_crc_data_count(crc))
-		ret = POLLIN | POLLRDNORM;
-	else
-		ret = 0;
+		ret |= EPOLLIN | EPOLLRDNORM;
 	spin_unlock_irq(&crc->lock);
 
 	return ret;
-- 
2.21.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/5] drm/fb-helper: Include prototype for drm_fb_helper_modinit()
  2019-07-10 12:51 [PATCH 1/5] drm/fb-helper: Include prototype for drm_fb_helper_modinit() Ville Syrjala
                   ` (3 preceding siblings ...)
  2019-07-10 12:51 ` [PATCH 5/5] drm: Fix return type of crc .poll() Ville Syrjala
@ 2019-07-11 15:35 ` Sean Paul
  4 siblings, 0 replies; 11+ messages in thread
From: Sean Paul @ 2019-07-11 15:35 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: dri-devel

On Wed, Jul 10, 2019 at 03:51:39PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Sparse complains:
> drivers/gpu/drm/drm_fb_helper.c:2409:12: warning: symbol 'drm_fb_helper_modinit' was not declared. Should it be static?
> 
> Include the header with the correct prototype.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Sean Paul <sean@poorly.run>

> ---
>  drivers/gpu/drm/drm_fb_helper.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index a7ba5b4902d6..b75ae8555baf 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -46,6 +46,7 @@
>  #include <drm/drm_print.h>
>  #include <drm/drm_vblank.h>
>  
> +#include "drm_crtc_helper_internal.h"
>  #include "drm_internal.h"
>  
>  static bool drm_fbdev_emulation = true;
> -- 
> 2.21.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/5] drm/dsc: Fix bogus cpu_to_be16() usage
  2019-07-10 12:51 ` [PATCH 2/5] drm/dsc: Fix bogus cpu_to_be16() usage Ville Syrjala
@ 2019-07-11 15:36   ` Sean Paul
  0 siblings, 0 replies; 11+ messages in thread
From: Sean Paul @ 2019-07-11 15:36 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: Manasi Navare, David Francis, dri-devel

On Wed, Jul 10, 2019 at 03:51:40PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> __be16 = cpu_to_be16(__be16) is nonsense. Do it right.
> 
> ../drivers/gpu/drm/drm_dsc.c:218:53: warning: incorrect type in assignment (different base types)
> ../drivers/gpu/drm/drm_dsc.c:218:53:    expected restricted __be16
> ../drivers/gpu/drm/drm_dsc.c:218:53:    got int
> ../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16
> ../drivers/gpu/drm/drm_dsc.c:225:25: warning: incorrect type in argument 1 (different base types)
> ../drivers/gpu/drm/drm_dsc.c:225:25:    expected unsigned short [usertype] val
> ../drivers/gpu/drm/drm_dsc.c:225:25:    got restricted __be16
> ../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16
> ../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16
> 
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: David Francis <David.Francis@amd.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Sean Paul <sean@poorly.run>

> ---
>  drivers/gpu/drm/drm_dsc.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_dsc.c b/drivers/gpu/drm/drm_dsc.c
> index 77f4e5ae4197..f2fc47f123d2 100644
> --- a/drivers/gpu/drm/drm_dsc.c
> +++ b/drivers/gpu/drm/drm_dsc.c
> @@ -216,13 +216,11 @@ void drm_dsc_pps_payload_pack(struct drm_dsc_picture_parameter_set *pps_payload,
>  	 */
>  	for (i = 0; i < DSC_NUM_BUF_RANGES; i++) {
>  		pps_payload->rc_range_parameters[i] =
> -			((dsc_cfg->rc_range_params[i].range_min_qp <<
> -			  DSC_PPS_RC_RANGE_MINQP_SHIFT) |
> -			 (dsc_cfg->rc_range_params[i].range_max_qp <<
> -			  DSC_PPS_RC_RANGE_MAXQP_SHIFT) |
> -			 (dsc_cfg->rc_range_params[i].range_bpg_offset));
> -		pps_payload->rc_range_parameters[i] =
> -			cpu_to_be16(pps_payload->rc_range_parameters[i]);
> +			cpu_to_be16((dsc_cfg->rc_range_params[i].range_min_qp <<
> +				     DSC_PPS_RC_RANGE_MINQP_SHIFT) |
> +				    (dsc_cfg->rc_range_params[i].range_max_qp <<
> +				     DSC_PPS_RC_RANGE_MAXQP_SHIFT) |
> +				    (dsc_cfg->rc_range_params[i].range_bpg_offset));
>  	}
>  
>  	/* PPS 88 */
> -- 
> 2.21.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 3/5] drm: Include prototype for drm_need_swiotlb()
  2019-07-10 12:51 ` [PATCH 3/5] drm: Include prototype for drm_need_swiotlb() Ville Syrjala
@ 2019-07-11 15:37   ` Sean Paul
  0 siblings, 0 replies; 11+ messages in thread
From: Sean Paul @ 2019-07-11 15:37 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: dri-devel

On Wed, Jul 10, 2019 at 03:51:41PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Sparse is not happy:
> ../drivers/gpu/drm/drm_memory.c:159:6: warning: symbol 'drm_need_swiotlb' was not declared. Should it be static?
> 
> Include the correct header for drm_need_swiotlb() prototype.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Sean Paul <sean@poorly.run>

> ---
>  drivers/gpu/drm/drm_memory.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c
> index b634e1670190..477937bb902e 100644
> --- a/drivers/gpu/drm/drm_memory.c
> +++ b/drivers/gpu/drm/drm_memory.c
> @@ -40,6 +40,7 @@
>  #include <xen/xen.h>
>  
>  #include <drm/drm_agpsupport.h>
> +#include <drm/drm_cache.h>
>  #include <drm/drm_device.h>
>  
>  #include "drm_legacy.h"
> -- 
> 2.21.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 4/5] drm/syncobj: Include the prototype for drm_timeout_abs_to_jiffies()
  2019-07-10 12:51 ` [PATCH 4/5] drm/syncobj: Include the prototype for drm_timeout_abs_to_jiffies() Ville Syrjala
@ 2019-07-11 15:39   ` Sean Paul
  2019-07-11 16:32     ` Sam Ravnborg
  0 siblings, 1 reply; 11+ messages in thread
From: Sean Paul @ 2019-07-11 15:39 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: dri-devel

On Wed, Jul 10, 2019 at 03:51:42PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Sparse complains:
> ../drivers/gpu/drm/drm_syncobj.c:942:13: warning: symbol 'drm_timeout_abs_to_jiffies' was not declared. Should it be static?
> 
> Include the correct header with the prototype.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/drm_syncobj.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
> index a199c8d56b95..00eecc9c464b 100644
> --- a/drivers/gpu/drm/drm_syncobj.c
> +++ b/drivers/gpu/drm/drm_syncobj.c
> @@ -58,6 +58,7 @@
>  #include <drm/drm_gem.h>
>  #include <drm/drm_print.h>
>  #include <drm/drm_syncobj.h>
> +#include <drm/drm_utils.h>

Just realized we have both drm_util.h and drm_utils.h, what a world!

Reviewed-by: Sean Paul <sean@poorly.run>

>  
>  #include "drm_internal.h"
>  
> -- 
> 2.21.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 5/5] drm: Fix return type of crc .poll()
  2019-07-10 12:51 ` [PATCH 5/5] drm: Fix return type of crc .poll() Ville Syrjala
@ 2019-07-11 15:40   ` Sean Paul
  0 siblings, 0 replies; 11+ messages in thread
From: Sean Paul @ 2019-07-11 15:40 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: dri-devel

On Wed, Jul 10, 2019 at 03:51:43PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Sparse compains:
> ../drivers/gpu/drm/drm_debugfs_crc.c:350:17: warning: incorrect type in initializer (different base types)
> ../drivers/gpu/drm/drm_debugfs_crc.c:350:17:    expected restricted __poll_t ( *poll )( ... )
> ../drivers/gpu/drm/drm_debugfs_crc.c:350:17:    got unsigned int ( * )( ... )
> 
> Change the .poll() return type to __poll_t to silence it.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Sean Paul <sean@poorly.run>

> ---
>  drivers/gpu/drm/drm_debugfs_crc.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c
> index 7ca486d750e9..284d615ed08b 100644
> --- a/drivers/gpu/drm/drm_debugfs_crc.c
> +++ b/drivers/gpu/drm/drm_debugfs_crc.c
> @@ -325,19 +325,17 @@ static ssize_t crtc_crc_read(struct file *filep, char __user *user_buf,
>  	return LINE_LEN(crc->values_cnt);
>  }
>  
> -static unsigned int crtc_crc_poll(struct file *file, poll_table *wait)
> +static __poll_t crtc_crc_poll(struct file *file, poll_table *wait)
>  {
>  	struct drm_crtc *crtc = file->f_inode->i_private;
>  	struct drm_crtc_crc *crc = &crtc->crc;
> -	unsigned ret;
> +	__poll_t ret = 0;
>  
>  	poll_wait(file, &crc->wq, wait);
>  
>  	spin_lock_irq(&crc->lock);
>  	if (crc->source && crtc_crc_data_count(crc))
> -		ret = POLLIN | POLLRDNORM;
> -	else
> -		ret = 0;
> +		ret |= EPOLLIN | EPOLLRDNORM;
>  	spin_unlock_irq(&crc->lock);
>  
>  	return ret;
> -- 
> 2.21.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 4/5] drm/syncobj: Include the prototype for drm_timeout_abs_to_jiffies()
  2019-07-11 15:39   ` Sean Paul
@ 2019-07-11 16:32     ` Sam Ravnborg
  0 siblings, 0 replies; 11+ messages in thread
From: Sam Ravnborg @ 2019-07-11 16:32 UTC (permalink / raw)
  To: Sean Paul; +Cc: dri-devel

On Thu, Jul 11, 2019 at 11:39:15AM -0400, Sean Paul wrote:
> On Wed, Jul 10, 2019 at 03:51:42PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Sparse complains:
> > ../drivers/gpu/drm/drm_syncobj.c:942:13: warning: symbol 'drm_timeout_abs_to_jiffies' was not declared. Should it be static?
> > 
> > Include the correct header with the prototype.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/drm_syncobj.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
> > index a199c8d56b95..00eecc9c464b 100644
> > --- a/drivers/gpu/drm/drm_syncobj.c
> > +++ b/drivers/gpu/drm/drm_syncobj.c
> > @@ -58,6 +58,7 @@
> >  #include <drm/drm_gem.h>
> >  #include <drm/drm_print.h>
> >  #include <drm/drm_syncobj.h>
> > +#include <drm/drm_utils.h>
> 
> Just realized we have both drm_util.h and drm_utils.h, what a world!
On my TODO list to get rid of one of them.

	Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-07-11 16:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-10 12:51 [PATCH 1/5] drm/fb-helper: Include prototype for drm_fb_helper_modinit() Ville Syrjala
2019-07-10 12:51 ` [PATCH 2/5] drm/dsc: Fix bogus cpu_to_be16() usage Ville Syrjala
2019-07-11 15:36   ` Sean Paul
2019-07-10 12:51 ` [PATCH 3/5] drm: Include prototype for drm_need_swiotlb() Ville Syrjala
2019-07-11 15:37   ` Sean Paul
2019-07-10 12:51 ` [PATCH 4/5] drm/syncobj: Include the prototype for drm_timeout_abs_to_jiffies() Ville Syrjala
2019-07-11 15:39   ` Sean Paul
2019-07-11 16:32     ` Sam Ravnborg
2019-07-10 12:51 ` [PATCH 5/5] drm: Fix return type of crc .poll() Ville Syrjala
2019-07-11 15:40   ` Sean Paul
2019-07-11 15:35 ` [PATCH 1/5] drm/fb-helper: Include prototype for drm_fb_helper_modinit() Sean Paul

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.