linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the hte tree
@ 2022-05-04  6:59 Stephen Rothwell
  2022-05-04  7:04 ` Thierry Reding
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2022-05-04  6:59 UTC (permalink / raw)
  To: Thierry Reding, Dipen Patel
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2259 bytes --]

Hi all,

After merging the hte tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/gpio/gpiolib-cdev.c:572:8: error: unknown type name 'hte_return_t'
  572 | static hte_return_t process_hw_ts_thread(void *p)
      |        ^~~~~~~~~~~~
drivers/gpio/gpiolib-cdev.c:623:8: error: unknown type name 'hte_return_t'
  623 | static hte_return_t process_hw_ts(struct hte_ts_data *ts, void *p)
      |        ^~~~~~~~~~~~
drivers/gpio/gpiolib-cdev.c: In function 'hte_edge_setup':
drivers/gpio/gpiolib-cdev.c:851:41: error: passing argument 2 of 'hte_request_ts_ns' from incompatible pointer type [-Werror=incompatible-pointer-types]
  851 |         return hte_request_ts_ns(hdesc, process_hw_ts,
      |                                         ^~~~~~~~~~~~~
      |                                         |
      |                                         int (*)(struct hte_ts_data *, void *)
In file included from drivers/gpio/gpiolib-cdev.c:27:
include/linux/hte.h:234:75: note: expected 'hte_ts_cb_t' {aka 'enum hte_return (*)(struct hte_ts_data *, void *)'} but argument is of type 'int (*)(struct hte_ts_data *, void *)'
  234 | static inline int hte_request_ts_ns(struct hte_ts_desc *desc, hte_ts_cb_t cb,
      |                                                               ~~~~~~~~~~~~^~
drivers/gpio/gpiolib-cdev.c:852:34: error: passing argument 3 of 'hte_request_ts_ns' from incompatible pointer type [-Werror=incompatible-pointer-types]
  852 |                                  process_hw_ts_thread, line);
      |                                  ^~~~~~~~~~~~~~~~~~~~
      |                                  |
      |                                  int (*)(void *)
In file included from drivers/gpio/gpiolib-cdev.c:27:
include/linux/hte.h:235:53: note: expected 'hte_ts_sec_cb_t' {aka 'enum hte_return (*)(void *)'} but argument is of type 'int (*)(void *)'
  235 |                                     hte_ts_sec_cb_t tcb, void *data)
      |                                     ~~~~~~~~~~~~~~~~^~~
cc1: some warnings being treated as errors

Something has been missed in the contruction of the git tree :-(

I have dropped the hte tree for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the hte tree
  2022-05-04  6:59 linux-next: build failure after merge of the hte tree Stephen Rothwell
@ 2022-05-04  7:04 ` Thierry Reding
  2022-05-05  3:17   ` Dipen Patel
  0 siblings, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2022-05-04  7:04 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dipen Patel, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2501 bytes --]

On Wed, May 04, 2022 at 04:59:56PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the hte tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
> 
> drivers/gpio/gpiolib-cdev.c:572:8: error: unknown type name 'hte_return_t'
>   572 | static hte_return_t process_hw_ts_thread(void *p)
>       |        ^~~~~~~~~~~~
> drivers/gpio/gpiolib-cdev.c:623:8: error: unknown type name 'hte_return_t'
>   623 | static hte_return_t process_hw_ts(struct hte_ts_data *ts, void *p)
>       |        ^~~~~~~~~~~~
> drivers/gpio/gpiolib-cdev.c: In function 'hte_edge_setup':
> drivers/gpio/gpiolib-cdev.c:851:41: error: passing argument 2 of 'hte_request_ts_ns' from incompatible pointer type [-Werror=incompatible-pointer-types]
>   851 |         return hte_request_ts_ns(hdesc, process_hw_ts,
>       |                                         ^~~~~~~~~~~~~
>       |                                         |
>       |                                         int (*)(struct hte_ts_data *, void *)
> In file included from drivers/gpio/gpiolib-cdev.c:27:
> include/linux/hte.h:234:75: note: expected 'hte_ts_cb_t' {aka 'enum hte_return (*)(struct hte_ts_data *, void *)'} but argument is of type 'int (*)(struct hte_ts_data *, void *)'
>   234 | static inline int hte_request_ts_ns(struct hte_ts_desc *desc, hte_ts_cb_t cb,
>       |                                                               ~~~~~~~~~~~~^~
> drivers/gpio/gpiolib-cdev.c:852:34: error: passing argument 3 of 'hte_request_ts_ns' from incompatible pointer type [-Werror=incompatible-pointer-types]
>   852 |                                  process_hw_ts_thread, line);
>       |                                  ^~~~~~~~~~~~~~~~~~~~
>       |                                  |
>       |                                  int (*)(void *)
> In file included from drivers/gpio/gpiolib-cdev.c:27:
> include/linux/hte.h:235:53: note: expected 'hte_ts_sec_cb_t' {aka 'enum hte_return (*)(void *)'} but argument is of type 'int (*)(void *)'
>   235 |                                     hte_ts_sec_cb_t tcb, void *data)
>       |                                     ~~~~~~~~~~~~~~~~^~~
> cc1: some warnings being treated as errors
> 
> Something has been missed in the contruction of the git tree :-(
> 
> I have dropped the hte tree for today.

Yeah, oddly I didn't catch that when I was doing the test build. Let me
recheck what went wrong there.

Sorry for the mess,
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: linux-next: build failure after merge of the hte tree
  2022-05-04  7:04 ` Thierry Reding
@ 2022-05-05  3:17   ` Dipen Patel
  2022-05-05 14:04     ` Thierry Reding
  0 siblings, 1 reply; 5+ messages in thread
From: Dipen Patel @ 2022-05-05  3:17 UTC (permalink / raw)
  To: Thierry Reding, Stephen Rothwell
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

Hi Stephen, Thierry,

Before sending patches I compiled and tested with or without HTE config successfully, I used gcc arm64 cross compiler. The initial problem kernel boat reported (reproduce step snippet below) used clang as compiler and that gives typedef issue which is what hte_return_t is. Do you know if we have to treat it differently with clang vs gcc or did I miss something?

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git hte/for-next
head:   cedbe14082d169f4c1136c70c5170a76bd9a076a
commit: 98935236600d4e179b664ffcfcd54e0ec3a1b4e3 [7/10] gpiolib: cdev: Add hardware timestamp clock type
config: arm-ep93xx_defconfig (https://download.01.org/0day-ci/archive/20220504/202205040454.CGWxoTt3-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 363b3a645a1e30011cc8da624f13dac5fd915628)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git/commit/?id=98935236600d4e179b664ffcfcd54e0ec3a1b4e3
        git remote add arm-tegra https://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git
        git fetch --no-tags arm-tegra hte/for-next
        git checkout 98935236600d4e179b664ffcfcd54e0ec3a1b4e3
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash


However below failure seems like (correct me if I am wrong) Thierry might have changed typedef to int in one place and possibly not all other places.

On 5/4/22 12:04 AM, Thierry Reding wrote:
> On Wed, May 04, 2022 at 04:59:56PM +1000, Stephen Rothwell wrote:
>> Hi all,
>>
>> After merging the hte tree, today's linux-next build (arm
>> multi_v7_defconfig) failed like this:
>>
>> drivers/gpio/gpiolib-cdev.c:572:8: error: unknown type name 'hte_return_t'
>>   572 | static hte_return_t process_hw_ts_thread(void *p)
>>       |        ^~~~~~~~~~~~
>> drivers/gpio/gpiolib-cdev.c:623:8: error: unknown type name 'hte_return_t'
>>   623 | static hte_return_t process_hw_ts(struct hte_ts_data *ts, void *p)
>>       |        ^~~~~~~~~~~~
>> drivers/gpio/gpiolib-cdev.c: In function 'hte_edge_setup':
>> drivers/gpio/gpiolib-cdev.c:851:41: error: passing argument 2 of 'hte_request_ts_ns' from incompatible pointer type [-Werror=incompatible-pointer-types]
>>   851 |         return hte_request_ts_ns(hdesc, process_hw_ts,
>>       |                                         ^~~~~~~~~~~~~
>>       |                                         |
>>       |                                         int (*)(struct hte_ts_data *, void *)
>> In file included from drivers/gpio/gpiolib-cdev.c:27:
>> include/linux/hte.h:234:75: note: expected 'hte_ts_cb_t' {aka 'enum hte_return (*)(struct hte_ts_data *, void *)'} but argument is of type 'int (*)(struct hte_ts_data *, void *)'
>>   234 | static inline int hte_request_ts_ns(struct hte_ts_desc *desc, hte_ts_cb_t cb,
>>       |                                                               ~~~~~~~~~~~~^~
>> drivers/gpio/gpiolib-cdev.c:852:34: error: passing argument 3 of 'hte_request_ts_ns' from incompatible pointer type [-Werror=incompatible-pointer-types]
>>   852 |                                  process_hw_ts_thread, line);
>>       |                                  ^~~~~~~~~~~~~~~~~~~~
>>       |                                  |
>>       |                                  int (*)(void *)
>> In file included from drivers/gpio/gpiolib-cdev.c:27:
>> include/linux/hte.h:235:53: note: expected 'hte_ts_sec_cb_t' {aka 'enum hte_return (*)(void *)'} but argument is of type 'int (*)(void *)'
>>   235 |                                     hte_ts_sec_cb_t tcb, void *data)
>>       |                                     ~~~~~~~~~~~~~~~~^~~
>> cc1: some warnings being treated as errors
>>
>> Something has been missed in the contruction of the git tree :-(
>>
>> I have dropped the hte tree for today.
> Yeah, oddly I didn't catch that when I was doing the test build. Let me
> recheck what went wrong there.
>
> Sorry for the mess,
> Thierry

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

* Re: linux-next: build failure after merge of the hte tree
  2022-05-05  3:17   ` Dipen Patel
@ 2022-05-05 14:04     ` Thierry Reding
  2022-05-05 18:11       ` Dipen Patel
  0 siblings, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2022-05-05 14:04 UTC (permalink / raw)
  To: Dipen Patel
  Cc: Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]

On Wed, May 04, 2022 at 08:17:50PM -0700, Dipen Patel wrote:
> Hi Stephen, Thierry,
> 
> Before sending patches I compiled and tested with or without HTE
> config successfully, I used gcc arm64 cross compiler. The initial
> problem kernel boat reported (reproduce step snippet below) used clang
> as compiler and that gives typedef issue which is what hte_return_t
> is. Do you know if we have to treat it differently with clang vs gcc
> or did I miss something?

It's probably a good idea to do builds with clang at this point since
apparently it can catch some cases that GCC doesn't. There's some
documentation on how to do that here:

	https://www.kernel.org/doc/html/latest/kbuild/llvm.html

The process is quite similar to using GCC and it has the advantage that
clang ships with built-in cross-compilers, so less hassle setting things
up.

> However below failure seems like (correct me if I am wrong) Thierry
> might have changed typedef to int in one place and possibly not all
> other places.

Yes, the hte_return_t failures were my fault. Turns out due to some
dependencies not being fulfilled my test builds didn't cover gpiolib
character devices, so I didn't catch those.

I've not got a couple of configurations that I can build and a short
script that will verify that all the necessary files have been built, so
that should hopefully catch such issues in the future.

I had also pushed a fixed branch yesterday and it looks like today's
linux-next built fine for HTE, so it's now included.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: linux-next: build failure after merge of the hte tree
  2022-05-05 14:04     ` Thierry Reding
@ 2022-05-05 18:11       ` Dipen Patel
  0 siblings, 0 replies; 5+ messages in thread
From: Dipen Patel @ 2022-05-05 18:11 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List

Thanks for the help Thierry.

Best Regards, Dipen Patel

On 5/5/22 7:04 AM, Thierry Reding wrote:
> On Wed, May 04, 2022 at 08:17:50PM -0700, Dipen Patel wrote:
>> Hi Stephen, Thierry,
>>
>> Before sending patches I compiled and tested with or without HTE
>> config successfully, I used gcc arm64 cross compiler. The initial
>> problem kernel boat reported (reproduce step snippet below) used clang
>> as compiler and that gives typedef issue which is what hte_return_t
>> is. Do you know if we have to treat it differently with clang vs gcc
>> or did I miss something?
> It's probably a good idea to do builds with clang at this point since
> apparently it can catch some cases that GCC doesn't. There's some
> documentation on how to do that here:
>
> 	https://www.kernel.org/doc/html/latest/kbuild/llvm.html
>
> The process is quite similar to using GCC and it has the advantage that
> clang ships with built-in cross-compilers, so less hassle setting things
> up.
>
>> However below failure seems like (correct me if I am wrong) Thierry
>> might have changed typedef to int in one place and possibly not all
>> other places.
> Yes, the hte_return_t failures were my fault. Turns out due to some
> dependencies not being fulfilled my test builds didn't cover gpiolib
> character devices, so I didn't catch those.
>
> I've not got a couple of configurations that I can build and a short
> script that will verify that all the necessary files have been built, so
> that should hopefully catch such issues in the future.
>
> I had also pushed a fixed branch yesterday and it looks like today's
> linux-next built fine for HTE, so it's now included.
>
> Thierry

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

end of thread, other threads:[~2022-05-05 18:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-04  6:59 linux-next: build failure after merge of the hte tree Stephen Rothwell
2022-05-04  7:04 ` Thierry Reding
2022-05-05  3:17   ` Dipen Patel
2022-05-05 14:04     ` Thierry Reding
2022-05-05 18:11       ` Dipen Patel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).