Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generic: routerbootpart: fix compilation on 64-bit #15640

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

robimarko
Copy link
Contributor

Trying to compile routerbootpart parsers on 64-bit platforms will fail:

drivers/mtd/parsers/routerbootpart.c: In function 'routerboot_find_dynparts': ./include/linux/kern_levels.h:5:25: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:427:25: note: in definition of macro 'printk_index_wrap'
  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
./include/linux/printk.h:498:9: note: in expansion of macro 'printk'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~
./include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
   11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
      |                         ^~~~~~~~
./include/linux/printk.h:498:16: note: in expansion of macro 'KERN_ERR'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |                ^~~~~~~~
drivers/mtd/parsers/routerbootpart.c:170:25: note: in expansion of macro 'pr_err'
  170 |                         pr_err("%s: mtd_read error while parsing (offset: 0x%X): %d\n",

So, lets simply add the length modifier 'z' to fix compilation.

@f00b4r0

@github-actions github-actions bot added the kernel pull request/issue with Linux kernel related changes label Jun 6, 2024
@f00b4r0
Copy link
Contributor

f00b4r0 commented Jun 6, 2024

ACK
Thx

Trying to compile routerbootpart parsers on 64-bit platforms will fail:
drivers/mtd/parsers/routerbootpart.c: In function 'routerboot_find_dynparts':
./include/linux/kern_levels.h:5:25: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:427:25: note: in definition of macro 'printk_index_wrap'
  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
./include/linux/printk.h:498:9: note: in expansion of macro 'printk'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~
./include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
   11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
      |                         ^~~~~~~~
./include/linux/printk.h:498:16: note: in expansion of macro 'KERN_ERR'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |                ^~~~~~~~
drivers/mtd/parsers/routerbootpart.c:170:25: note: in expansion of macro 'pr_err'
  170 |                         pr_err("%s: mtd_read error while parsing (offset: 0x%X): %d\n",

So, lets simply add the length modifier 'z' to fix compilation.

Link: openwrt#15640
Signed-off-by: Robert Marko <robimarko@gmail.com>
@openwrt-bot openwrt-bot merged commit 458cafd into openwrt:main Jun 6, 2024
2 checks passed
@robimarko
Copy link
Contributor Author

Thanks! Rebased on top of main and merged!

@robimarko robimarko deleted the routerboot-parser branch June 6, 2024 11:05
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this pull request Jun 8, 2024
Trying to compile routerbootpart parsers on 64-bit platforms will fail:
drivers/mtd/parsers/routerbootpart.c: In function 'routerboot_find_dynparts':
./include/linux/kern_levels.h:5:25: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:427:25: note: in definition of macro 'printk_index_wrap'
  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
./include/linux/printk.h:498:9: note: in expansion of macro 'printk'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~
./include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
   11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
      |                         ^~~~~~~~
./include/linux/printk.h:498:16: note: in expansion of macro 'KERN_ERR'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |                ^~~~~~~~
drivers/mtd/parsers/routerbootpart.c:170:25: note: in expansion of macro 'pr_err'
  170 |                         pr_err("%s: mtd_read error while parsing (offset: 0x%X): %d\n",

So, lets simply add the length modifier 'z' to fix compilation.

Link: openwrt#15640
Signed-off-by: Robert Marko <robimarko@gmail.com>
RolandoMagico pushed a commit to RolandoMagico/openwrt that referenced this pull request Aug 11, 2024
Trying to compile routerbootpart parsers on 64-bit platforms will fail:
drivers/mtd/parsers/routerbootpart.c: In function 'routerboot_find_dynparts':
./include/linux/kern_levels.h:5:25: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:427:25: note: in definition of macro 'printk_index_wrap'
  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
./include/linux/printk.h:498:9: note: in expansion of macro 'printk'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~
./include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
   11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
      |                         ^~~~~~~~
./include/linux/printk.h:498:16: note: in expansion of macro 'KERN_ERR'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |                ^~~~~~~~
drivers/mtd/parsers/routerbootpart.c:170:25: note: in expansion of macro 'pr_err'
  170 |                         pr_err("%s: mtd_read error while parsing (offset: 0x%X): %d\n",

So, lets simply add the length modifier 'z' to fix compilation.

Link: openwrt#15640
Signed-off-by: Robert Marko <robimarko@gmail.com>
c-herz pushed a commit to c-herz/openwrt that referenced this pull request Sep 5, 2024
Trying to compile routerbootpart parsers on 64-bit platforms will fail:
drivers/mtd/parsers/routerbootpart.c: In function 'routerboot_find_dynparts':
./include/linux/kern_levels.h:5:25: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:427:25: note: in definition of macro 'printk_index_wrap'
  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
./include/linux/printk.h:498:9: note: in expansion of macro 'printk'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~
./include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
   11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
      |                         ^~~~~~~~
./include/linux/printk.h:498:16: note: in expansion of macro 'KERN_ERR'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |                ^~~~~~~~
drivers/mtd/parsers/routerbootpart.c:170:25: note: in expansion of macro 'pr_err'
  170 |                         pr_err("%s: mtd_read error while parsing (offset: 0x%X): %d\n",

So, lets simply add the length modifier 'z' to fix compilation.

Link: openwrt#15640
Signed-off-by: Robert Marko <robimarko@gmail.com>
dzzinstant pushed a commit to dzzinstant/openwrt that referenced this pull request Sep 9, 2024
Trying to compile routerbootpart parsers on 64-bit platforms will fail:
drivers/mtd/parsers/routerbootpart.c: In function 'routerboot_find_dynparts':
./include/linux/kern_levels.h:5:25: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:427:25: note: in definition of macro 'printk_index_wrap'
  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
./include/linux/printk.h:498:9: note: in expansion of macro 'printk'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~
./include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
   11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
      |                         ^~~~~~~~
./include/linux/printk.h:498:16: note: in expansion of macro 'KERN_ERR'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |                ^~~~~~~~
drivers/mtd/parsers/routerbootpart.c:170:25: note: in expansion of macro 'pr_err'
  170 |                         pr_err("%s: mtd_read error while parsing (offset: 0x%X): %d\n",

So, lets simply add the length modifier 'z' to fix compilation.

Link: openwrt#15640
Signed-off-by: Robert Marko <robimarko@gmail.com>
dzzinstant pushed a commit to dzzinstant/openwrt that referenced this pull request Sep 9, 2024
Trying to compile routerbootpart parsers on 64-bit platforms will fail:
drivers/mtd/parsers/routerbootpart.c: In function 'routerboot_find_dynparts':
./include/linux/kern_levels.h:5:25: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:427:25: note: in definition of macro 'printk_index_wrap'
  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
./include/linux/printk.h:498:9: note: in expansion of macro 'printk'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~
./include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
   11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
      |                         ^~~~~~~~
./include/linux/printk.h:498:16: note: in expansion of macro 'KERN_ERR'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |                ^~~~~~~~
drivers/mtd/parsers/routerbootpart.c:170:25: note: in expansion of macro 'pr_err'
  170 |                         pr_err("%s: mtd_read error while parsing (offset: 0x%X): %d\n",

So, lets simply add the length modifier 'z' to fix compilation.

Link: openwrt#15640
Signed-off-by: Robert Marko <robimarko@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel pull request/issue with Linux kernel related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants