Subject: linux-next: build failure after merge of the tty tree

From: [email-masked]
Date: Tue, 2 Aug 2022 21:06:49 +0100

Hi all,

After merging the tty tree, today's linux-next build (x86 allmodconfig)
failed like this:

In file included from /tmp/next/build/include/linux/device.h:15,
                 from /tmp/next/build/include/linux/node.h:18,
                 from /tmp/next/build/include/linux/cpu.h:17,
                 from /tmp/next/build/include/linux/of_device.h:5,
                 from /tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:14:
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c: In function 'qcom_geni_serial_set_termios':
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1039:4: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Werror=format=]
 1039 |    "Couldn't find suitable clock rate for %lu\n",
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/dev_printk.h:110:16: note: in definition of macro 'dev_printk_index_wrap'
  110 |   _p_func(dev, fmt, ##__VA_ARGS__);   \
      |                ^~~
/tmp/next/build/include/linux/dev_printk.h:144:49: note: in expansion of macro 'dev_fmt'
  144 |  dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                 ^~~~~~~
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1038:3: note: in expansion of macro 'dev_err'
 1038 |   dev_err(port->se.dev,
      |   ^~~~~~~
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1039:45: note: format string is defined here
 1039 |    "Couldn't find suitable clock rate for %lu\n",
      |                                           ~~^
      |                                             |
      |                                             long unsigned int
      |                                           %u
In file included from /tmp/next/build/include/linux/printk.h:573,
                 from /tmp/next/build/include/linux/kernel.h:29,
                 from /tmp/next/build/include/linux/clk.h:13,
                 from /tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:7:
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1044:24: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format=]
 1044 |  dev_dbg(port->se.dev, "desired_rate-%lu, clk_rate-%lu, clk_div-%u\n",
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/dynamic_debug.h:134:15: note: in definition of macro '__dynamic_func_call'
  134 |   func(&id, ##__VA_ARGS__);  \
      |               ^~~~~~~~~~~
/tmp/next/build/include/linux/dynamic_debug.h:166:2: note: in expansion of macro '_dynamic_func_call'
  166 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
      |  ^~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/dev_printk.h:155:2: note: in expansion of macro 'dynamic_dev_dbg'
  155 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~
/tmp/next/build/include/linux/dev_printk.h:155:23: note: in expansion of macro 'dev_fmt'
  155 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                       ^~~~~~~
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1044:2: note: in expansion of macro 'dev_dbg'
 1044 |  dev_dbg(port->se.dev, "desired_rate-%lu, clk_rate-%lu, clk_div-%u\n",
      |  ^~~~~~~
/tmp/next/build/drivers/tty/serial/qcom_geni_serial.c:1044:40: note: format string is defined here
 1044 |  dev_dbg(port->se.dev, "desired_rate-%lu, clk_rate-%lu, clk_div-%u\n",
      |                                      ~~^
      |                                        |
      |                                        long unsigned int
      |                                      %u

Caused by commit

  c474c775716edd46a5 ("tty: serial: qcom-geni-serial: Fix get_clk_div_rate() which otherwise could return a sub-optimal clock rate.")

I have used the tree from 20220727 instead.