All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Kent Overstreet <kent.overstreet@linux.dev>,
	Dave Airlie <airlied@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	DRI <dri-devel@lists.freedesktop.org>
Subject: Re: linux-next: build failure after merge of the header_cleanup tree
Date: Tue, 19 Dec 2023 15:53:38 +0200	[thread overview]
Message-ID: <ZYGgYvsCHmazP2jH@intel.com> (raw)
In-Reply-To: <20231219145734.13e40e1e@canb.auug.org.au>

On Tue, Dec 19, 2023 at 02:57:34PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> On Mon, 18 Dec 2023 17:40:30 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the header_cleanup tree, today's linux-next build (arm
> > multi_v7_defconfig) failed like this:
> > 
> > In file included from include/linux/kernel.h:27,
> >                  from drivers/gpu/ipu-v3/ipu-dp.c:7:
> > include/drm/drm_color_mgmt.h: In function 'drm_color_lut_extract':
> > include/drm/drm_color_mgmt.h:45:46: error: implicit declaration of function 'mul_u32_u32' [-Werror=implicit-function-declaration]
> >    45 |                 return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1),
> >       |                                              ^~~~~~~~~~~
> > include/linux/math.h:104:36: note: in definition of macro 'DIV_ROUND_CLOSEST_ULL'
> >   104 |         unsigned long long _tmp = (x) + (__d) / 2;      \
> >       |                                    ^
> > In file included from include/linux/time.h:6,
> >                  from include/linux/videodev2.h:59,
> >                  from include/video/imx-ipu-v3.h:16,
> >                  from drivers/gpu/ipu-v3/ipu-dp.c:14:
> > include/linux/math64.h: At top level:
> > include/linux/math64.h:155:19: error: conflicting types for 'mul_u32_u32'; have 'u64(u32,  u32)' {aka 'long long unsigned int(unsigned int,  unsigned int)'}
> >   155 | static inline u64 mul_u32_u32(u32 a, u32 b)
> >       |                   ^~~~~~~~~~~
> > include/drm/drm_color_mgmt.h:45:46: note: previous implicit declaration of 'mul_u32_u32' with type 'int()'
> >    45 |                 return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1),
> >       |                                              ^~~~~~~~~~~
> > include/linux/math.h:104:36: note: in definition of macro 'DIV_ROUND_CLOSEST_ULL'
> >   104 |         unsigned long long _tmp = (x) + (__d) / 2;      \
> >       |                                    ^
> > cc1: some warnings being treated as errors
> > In file included from include/linux/kernel.h:27,
> >                  from drivers/gpu/drm/omapdrm/dss/dispc_coefs.c:7:
> > include/drm/drm_color_mgmt.h: In function 'drm_color_lut_extract':
> > include/drm/drm_color_mgmt.h:45:46: error: implicit declaration of function 'mul_u32_u32' [-Werror=implicit-function-declaration]
> >    45 |                 return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1),
> >       |                                              ^~~~~~~~~~~
> > include/linux/math.h:104:36: note: in definition of macro 'DIV_ROUND_CLOSEST_ULL'
> >   104 |         unsigned long long _tmp = (x) + (__d) / 2;      \
> >       |                                    ^
> > In file included from include/linux/jiffies.h:7,
> >                  from include/linux/ktime.h:25,
> >                  from include/linux/timer.h:6,
> >                  from include/linux/workqueue.h:9,
> >                  from include/linux/mm_types.h:19,
> >                  from include/linux/mmzone.h:22,
> >                  from include/linux/gfp.h:7,
> >                  from include/linux/stackdepot.h:25,
> >                  from include/drm/drm_modeset_lock.h:28,
> >                  from include/drm/drm_crtc.h:30,
> >                  from drivers/gpu/drm/omapdrm/dss/omapdss.h:11,
> >                  from drivers/gpu/drm/omapdrm/dss/dispc_coefs.c:9:
> > include/linux/math64.h: At top level:
> > include/linux/math64.h:155:19: error: conflicting types for 'mul_u32_u32'; have 'u64(u32,  u32)' {aka 'long long unsigned int(unsigned int,  unsigned int)'}
> >   155 | static inline u64 mul_u32_u32(u32 a, u32 b)
> >       |                   ^~~~~~~~~~~
> > include/drm/drm_color_mgmt.h:45:46: note: previous implicit declaration of 'mul_u32_u32' with type 'int()'
> >    45 |                 return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1),
> >       |                                              ^~~~~~~~~~~
> > include/linux/math.h:104:36: note: in definition of macro 'DIV_ROUND_CLOSEST_ULL'
> >   104 |         unsigned long long _tmp = (x) + (__d) / 2;      \
> >       |                                    ^
> > cc1: some warnings being treated as errors
> 
> This turns out to be a semantic conflict (or exposing a bug in commit
> 
>  c6fbb6bca108 ("drm: Fix color LUT rounding")
> 
> from the drm tree.
> 
> I have applied the following merge fix up patch (which should probably
> be applied to the drm tree, if possible).
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 19 Dec 2023 14:43:41 +1100
> Subject: [PATCH] drm: using mul_u32_u32() requires linux/math64.h
> 
> Some pending include file cleanups produced this error:
> 
> In file included from include/linux/kernel.h:27,
>                  from drivers/gpu/ipu-v3/ipu-dp.c:7:
> include/drm/drm_color_mgmt.h: In function 'drm_color_lut_extract':
> include/drm/drm_color_mgmt.h:45:46: error: implicit declaration of function 'mul_u32_u32' [-Werror=implicit-function-declaration]
>    45 |                 return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1),
>       |                                              ^~~~~~~~~~~
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Mea culpa.

I slapped on a
Fixes: c6fbb6bca108 ("drm: Fix color LUT rounding")

and applied this to drm-misc-next-fixes. Thanks.

> ---
>  include/drm/drm_color_mgmt.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h
> index 54b2b2467bfd..ed81741036d7 100644
> --- a/include/drm/drm_color_mgmt.h
> +++ b/include/drm/drm_color_mgmt.h
> @@ -24,6 +24,7 @@
>  #define __DRM_COLOR_MGMT_H__
>  
>  #include <linux/ctype.h>
> +#include <linux/math64.h>
>  #include <drm/drm_property.h>
>  
>  struct drm_crtc;
> -- 
> 2.40.1
> 
> -- 
> Cheers,
> Stephen Rothwell



-- 
Ville Syrjälä
Intel

WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Dave Airlie <airlied@redhat.com>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Kent Overstreet <kent.overstreet@linux.dev>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	DRI <dri-devel@lists.freedesktop.org>
Subject: Re: linux-next: build failure after merge of the header_cleanup tree
Date: Tue, 19 Dec 2023 15:53:38 +0200	[thread overview]
Message-ID: <ZYGgYvsCHmazP2jH@intel.com> (raw)
In-Reply-To: <20231219145734.13e40e1e@canb.auug.org.au>

On Tue, Dec 19, 2023 at 02:57:34PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> On Mon, 18 Dec 2023 17:40:30 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the header_cleanup tree, today's linux-next build (arm
> > multi_v7_defconfig) failed like this:
> > 
> > In file included from include/linux/kernel.h:27,
> >                  from drivers/gpu/ipu-v3/ipu-dp.c:7:
> > include/drm/drm_color_mgmt.h: In function 'drm_color_lut_extract':
> > include/drm/drm_color_mgmt.h:45:46: error: implicit declaration of function 'mul_u32_u32' [-Werror=implicit-function-declaration]
> >    45 |                 return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1),
> >       |                                              ^~~~~~~~~~~
> > include/linux/math.h:104:36: note: in definition of macro 'DIV_ROUND_CLOSEST_ULL'
> >   104 |         unsigned long long _tmp = (x) + (__d) / 2;      \
> >       |                                    ^
> > In file included from include/linux/time.h:6,
> >                  from include/linux/videodev2.h:59,
> >                  from include/video/imx-ipu-v3.h:16,
> >                  from drivers/gpu/ipu-v3/ipu-dp.c:14:
> > include/linux/math64.h: At top level:
> > include/linux/math64.h:155:19: error: conflicting types for 'mul_u32_u32'; have 'u64(u32,  u32)' {aka 'long long unsigned int(unsigned int,  unsigned int)'}
> >   155 | static inline u64 mul_u32_u32(u32 a, u32 b)
> >       |                   ^~~~~~~~~~~
> > include/drm/drm_color_mgmt.h:45:46: note: previous implicit declaration of 'mul_u32_u32' with type 'int()'
> >    45 |                 return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1),
> >       |                                              ^~~~~~~~~~~
> > include/linux/math.h:104:36: note: in definition of macro 'DIV_ROUND_CLOSEST_ULL'
> >   104 |         unsigned long long _tmp = (x) + (__d) / 2;      \
> >       |                                    ^
> > cc1: some warnings being treated as errors
> > In file included from include/linux/kernel.h:27,
> >                  from drivers/gpu/drm/omapdrm/dss/dispc_coefs.c:7:
> > include/drm/drm_color_mgmt.h: In function 'drm_color_lut_extract':
> > include/drm/drm_color_mgmt.h:45:46: error: implicit declaration of function 'mul_u32_u32' [-Werror=implicit-function-declaration]
> >    45 |                 return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1),
> >       |                                              ^~~~~~~~~~~
> > include/linux/math.h:104:36: note: in definition of macro 'DIV_ROUND_CLOSEST_ULL'
> >   104 |         unsigned long long _tmp = (x) + (__d) / 2;      \
> >       |                                    ^
> > In file included from include/linux/jiffies.h:7,
> >                  from include/linux/ktime.h:25,
> >                  from include/linux/timer.h:6,
> >                  from include/linux/workqueue.h:9,
> >                  from include/linux/mm_types.h:19,
> >                  from include/linux/mmzone.h:22,
> >                  from include/linux/gfp.h:7,
> >                  from include/linux/stackdepot.h:25,
> >                  from include/drm/drm_modeset_lock.h:28,
> >                  from include/drm/drm_crtc.h:30,
> >                  from drivers/gpu/drm/omapdrm/dss/omapdss.h:11,
> >                  from drivers/gpu/drm/omapdrm/dss/dispc_coefs.c:9:
> > include/linux/math64.h: At top level:
> > include/linux/math64.h:155:19: error: conflicting types for 'mul_u32_u32'; have 'u64(u32,  u32)' {aka 'long long unsigned int(unsigned int,  unsigned int)'}
> >   155 | static inline u64 mul_u32_u32(u32 a, u32 b)
> >       |                   ^~~~~~~~~~~
> > include/drm/drm_color_mgmt.h:45:46: note: previous implicit declaration of 'mul_u32_u32' with type 'int()'
> >    45 |                 return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1),
> >       |                                              ^~~~~~~~~~~
> > include/linux/math.h:104:36: note: in definition of macro 'DIV_ROUND_CLOSEST_ULL'
> >   104 |         unsigned long long _tmp = (x) + (__d) / 2;      \
> >       |                                    ^
> > cc1: some warnings being treated as errors
> 
> This turns out to be a semantic conflict (or exposing a bug in commit
> 
>  c6fbb6bca108 ("drm: Fix color LUT rounding")
> 
> from the drm tree.
> 
> I have applied the following merge fix up patch (which should probably
> be applied to the drm tree, if possible).
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 19 Dec 2023 14:43:41 +1100
> Subject: [PATCH] drm: using mul_u32_u32() requires linux/math64.h
> 
> Some pending include file cleanups produced this error:
> 
> In file included from include/linux/kernel.h:27,
>                  from drivers/gpu/ipu-v3/ipu-dp.c:7:
> include/drm/drm_color_mgmt.h: In function 'drm_color_lut_extract':
> include/drm/drm_color_mgmt.h:45:46: error: implicit declaration of function 'mul_u32_u32' [-Werror=implicit-function-declaration]
>    45 |                 return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1),
>       |                                              ^~~~~~~~~~~
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Mea culpa.

I slapped on a
Fixes: c6fbb6bca108 ("drm: Fix color LUT rounding")

and applied this to drm-misc-next-fixes. Thanks.

> ---
>  include/drm/drm_color_mgmt.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h
> index 54b2b2467bfd..ed81741036d7 100644
> --- a/include/drm/drm_color_mgmt.h
> +++ b/include/drm/drm_color_mgmt.h
> @@ -24,6 +24,7 @@
>  #define __DRM_COLOR_MGMT_H__
>  
>  #include <linux/ctype.h>
> +#include <linux/math64.h>
>  #include <drm/drm_property.h>
>  
>  struct drm_crtc;
> -- 
> 2.40.1
> 
> -- 
> Cheers,
> Stephen Rothwell



-- 
Ville Syrjälä
Intel

  reply	other threads:[~2023-12-19 13:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-18  6:40 linux-next: build failure after merge of the header_cleanup tree Stephen Rothwell
2023-12-19  3:57 ` Stephen Rothwell
2023-12-19  3:57   ` Stephen Rothwell
2023-12-19 13:53   ` Ville Syrjälä [this message]
2023-12-19 13:53     ` Ville Syrjälä
  -- strict thread matches above, loose matches on Subject: below --
2023-12-19  4:25 Stephen Rothwell
2023-12-19  4:59 ` Kent Overstreet
2023-12-18  6:29 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZYGgYvsCHmazP2jH@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.