lkml.org 
[lkml]   [2019]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] nilfs2: do not use unexported cpu_to_le32()/le32_to_cpu() in uapi header
On Wed,  5 Jun 2019 14:30:06 +0900 Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> cpu_to_le32/le32_to_cpu is defined in include/linux/byteorder/generic.h,
> which is not exported to user-space.
>
> UAPI headers must use the ones prefixed with double-underscore.
>
> Detected by compile-testing exported headers:
>
> ./usr/include/linux/nilfs2_ondisk.h: In function ‘nilfs_checkpoint_set_snapshot’:
> ./usr/include/linux/nilfs2_ondisk.h:536:17: error: implicit declaration of function ‘cpu_to_le32’ [-Werror=implicit-function-declaration]
> cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) | \
> ^
> ./usr/include/linux/nilfs2_ondisk.h:552:1: note: in expansion of macro ‘NILFS_CHECKPOINT_FNS’
> NILFS_CHECKPOINT_FNS(SNAPSHOT, snapshot)
> ^~~~~~~~~~~~~~~~~~~~
> ./usr/include/linux/nilfs2_ondisk.h:536:29: error: implicit declaration of function ‘le32_to_cpu’ [-Werror=implicit-function-declaration]
> cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) | \
> ^
> ./usr/include/linux/nilfs2_ondisk.h:552:1: note: in expansion of macro ‘NILFS_CHECKPOINT_FNS’
> NILFS_CHECKPOINT_FNS(SNAPSHOT, snapshot)
> ^~~~~~~~~~~~~~~~~~~~
> ./usr/include/linux/nilfs2_ondisk.h: In function ‘nilfs_segment_usage_set_clean’:
> ./usr/include/linux/nilfs2_ondisk.h:622:19: error: implicit declaration of function ‘cpu_to_le64’ [-Werror=implicit-function-declaration]
> su->su_lastmod = cpu_to_le64(0);
> ^~~~~~~~~~~

Seems fairly serious. I'm thinking this needs a cc:stable?

\
 
 \ /
  Last update: 2019-07-07 05:38    [W:0.062 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site