2021-12-20 11:08:54

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the akpm tree

Hi all,

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

drivers/hwmon/dell-smm-hwmon.c: In function 'i8k_ioctl':
drivers/hwmon/dell-smm-hwmon.c:454:31: error: implicit declaration of function 'PDE_DATA'; did you mean 'NODE_DATA'? [-Werror=implicit-function-declaration]
454 | struct dell_smm_data *data = PDE_DATA(file_inode(fp));
| ^~~~~~~~
| NODE_DATA
drivers/hwmon/dell-smm-hwmon.c:454:31: error: initialization of 'struct dell_smm_data *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
cc1: all warnings being treated as errors

Caused by commit

2dd082773083 ("proc: remove PDE_DATA() completely")

interacting with commit

073bd07205af ("hwmon: (dell-smm) Unify i8k_ioctl() and i8k_ioctl_unlocked()")

from the hwmon-staging tree.

I applied the following fixup patch.

From: Stephen Rothwell <[email protected]>
Date: Mon, 20 Dec 2021 22:04:57 +1100
Subject: [PATCH] fixup for "proc: remove PDE_DATA() completely"

Signed-off-by: Stephen Rothwell <[email protected]>
---
drivers/hwmon/dell-smm-hwmon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index baec55c1d83d..145034a324c4 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -451,7 +451,7 @@ static int i8k_get_power_status(void)

static long i8k_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
{
- struct dell_smm_data *data = PDE_DATA(file_inode(fp));
+ struct dell_smm_data *data = pde_data(file_inode(fp));
int __user *argp = (int __user *)arg;
int speed, err;
int val = 0;
--
2.33.0

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (488.00 B)
OpenPGP digital signature

2021-12-20 12:45:03

by Muchun Song

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the akpm tree

On Mon, Dec 20, 2021 at 7:08 PM Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/hwmon/dell-smm-hwmon.c: In function 'i8k_ioctl':
> drivers/hwmon/dell-smm-hwmon.c:454:31: error: implicit declaration of function 'PDE_DATA'; did you mean 'NODE_DATA'? [-Werror=implicit-function-declaration]
> 454 | struct dell_smm_data *data = PDE_DATA(file_inode(fp));
> | ^~~~~~~~
> | NODE_DATA
> drivers/hwmon/dell-smm-hwmon.c:454:31: error: initialization of 'struct dell_smm_data *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
> cc1: all warnings being treated as errors
>
> Caused by commit
>
> 2dd082773083 ("proc: remove PDE_DATA() completely")
>
> interacting with commit
>
> 073bd07205af ("hwmon: (dell-smm) Unify i8k_ioctl() and i8k_ioctl_unlocked()")
>
> from the hwmon-staging tree.
>
> I applied the following fixup patch.
>
> From: Stephen Rothwell <[email protected]>
> Date: Mon, 20 Dec 2021 22:04:57 +1100
> Subject: [PATCH] fixup for "proc: remove PDE_DATA() completely"
>
> Signed-off-by: Stephen Rothwell <[email protected]>

Thanks Stephen.

Reviewed-by: Muchun Song <[email protected]>

2022-03-08 00:11:28

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the akpm tree

Hi Johannes,

On Mon, 7 Mar 2022 11:43:21 -0500 Johannes Weiner <[email protected]> wrote:
>
> Sorry about that. This should fix it:
>
> ---
> From a4d90a5faa418d98f925abe47b1a4fcffc4283f9 Mon Sep 17 00:00:00 2001
> From: Johannes Weiner <[email protected]>
> Date: Mon, 7 Mar 2022 11:38:42 -0500
> Subject: [PATCH] mm: madvise: MADV_DONTNEED_LOCKED fix
>
> On MiPS:
> mm/madvise.c:55:7: error: 'MADV_DONTNEED_LOCKED' undeclared (first use in this function); did you mean 'MADV_DONTNEED'?
>
> Define MADV_DONTNEED_LOCKED on archs that don't use the common mman.h
>
> Reported-by: Stephen Rothwell <[email protected]>
> Reported-by: Linux Kernel Functional Testing <[email protected]>
> Signed-off-by: Johannes Weiner <[email protected]>

Thanks.

Added to linux-next today.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-03-08 01:08:18

by Johannes Weiner

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the akpm tree

Sorry about that. This should fix it:

---
From a4d90a5faa418d98f925abe47b1a4fcffc4283f9 Mon Sep 17 00:00:00 2001
From: Johannes Weiner <[email protected]>
Date: Mon, 7 Mar 2022 11:38:42 -0500
Subject: [PATCH] mm: madvise: MADV_DONTNEED_LOCKED fix

On MiPS:
mm/madvise.c:55:7: error: 'MADV_DONTNEED_LOCKED' undeclared (first use in this function); did you mean 'MADV_DONTNEED'?

Define MADV_DONTNEED_LOCKED on archs that don't use the common mman.h

Reported-by: Stephen Rothwell <[email protected]>
Reported-by: Linux Kernel Functional Testing <[email protected]>
Signed-off-by: Johannes Weiner <[email protected]>
---
arch/alpha/include/uapi/asm/mman.h | 2 ++
arch/mips/include/uapi/asm/mman.h | 2 ++
arch/parisc/include/uapi/asm/mman.h | 2 ++
arch/xtensa/include/uapi/asm/mman.h | 2 ++
4 files changed, 8 insertions(+)

diff --git a/arch/alpha/include/uapi/asm/mman.h b/arch/alpha/include/uapi/asm/mman.h
index 56b4ee5a6c9e..4aa996423b0d 100644
--- a/arch/alpha/include/uapi/asm/mman.h
+++ b/arch/alpha/include/uapi/asm/mman.h
@@ -74,6 +74,8 @@
#define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */
#define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */

+#define MADV_DONTNEED_LOCKED 24 /* like DONTNEED, but drop locked pages too */
+
/* compatibility flags */
#define MAP_FILE 0

diff --git a/arch/mips/include/uapi/asm/mman.h b/arch/mips/include/uapi/asm/mman.h
index 40b210c65a5a..1be428663c10 100644
--- a/arch/mips/include/uapi/asm/mman.h
+++ b/arch/mips/include/uapi/asm/mman.h
@@ -101,6 +101,8 @@
#define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */
#define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */

+#define MADV_DONTNEED_LOCKED 24 /* like DONTNEED, but drop locked pages too */
+
/* compatibility flags */
#define MAP_FILE 0

diff --git a/arch/parisc/include/uapi/asm/mman.h b/arch/parisc/include/uapi/asm/mman.h
index 9e3c010c0f61..a7ea3204a5fa 100644
--- a/arch/parisc/include/uapi/asm/mman.h
+++ b/arch/parisc/include/uapi/asm/mman.h
@@ -55,6 +55,8 @@
#define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */
#define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */

+#define MADV_DONTNEED_LOCKED 24 /* like DONTNEED, but drop locked pages too */
+
#define MADV_MERGEABLE 65 /* KSM may merge identical pages */
#define MADV_UNMERGEABLE 66 /* KSM may not merge identical pages */

diff --git a/arch/xtensa/include/uapi/asm/mman.h b/arch/xtensa/include/uapi/asm/mman.h
index b3a22095371b..7966a58af472 100644
--- a/arch/xtensa/include/uapi/asm/mman.h
+++ b/arch/xtensa/include/uapi/asm/mman.h
@@ -109,6 +109,8 @@
#define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */
#define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */

+#define MADV_DONTNEED_LOCKED 24 /* like DONTNEED, but drop locked pages too */
+
/* compatibility flags */
#define MAP_FILE 0

--
2.35.1