* [PATCH] driver core: fix up some missing class.devnode() conversions.
@ 2022-11-28 17:35 ` Greg Kroah-Hartman
0 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2022-11-28 17:35 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, Stephen Rothwell, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Frederic Barrat,
Andrew Donnellan, Arnd Bergmann, linuxppc-dev
In commit ff62b8e6588f ("driver core: make struct class.devnode() take a
const *") the ->devnode callback changed the pointer to be const, but a
few instances of PowerPC drivers were not caught for some reason.
Fix this up by changing the pointers to be const.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Frederic Barrat <fbarrat@linux.ibm.com>
Cc: Andrew Donnellan <ajd@linux.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@lists.ozlabs.org
Fixes: ff62b8e6588f ("driver core: make struct class.devnode() take a const *")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/platforms/book3s/vas-api.c | 2 +-
drivers/misc/cxl/file.c | 2 +-
drivers/misc/ocxl/file.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/platforms/book3s/vas-api.c b/arch/powerpc/platforms/book3s/vas-api.c
index 40f5ae5e1238..eb5bed333750 100644
--- a/arch/powerpc/platforms/book3s/vas-api.c
+++ b/arch/powerpc/platforms/book3s/vas-api.c
@@ -53,7 +53,7 @@ struct coproc_instance {
struct vas_window *txwin;
};
-static char *coproc_devnode(struct device *dev, umode_t *mode)
+static char *coproc_devnode(const struct device *dev, umode_t *mode)
{
return kasprintf(GFP_KERNEL, "crypto/%s", dev_name(dev));
}
diff --git a/drivers/misc/cxl/file.c b/drivers/misc/cxl/file.c
index 3dbdce96fae0..5878329b011a 100644
--- a/drivers/misc/cxl/file.c
+++ b/drivers/misc/cxl/file.c
@@ -546,7 +546,7 @@ static const struct file_operations afu_master_fops = {
};
-static char *cxl_devnode(struct device *dev, umode_t *mode)
+static char *cxl_devnode(const struct device *dev, umode_t *mode)
{
if (cpu_has_feature(CPU_FTR_HVMODE) &&
CXL_DEVT_IS_CARD(dev->devt)) {
diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c
index d46dba2df5a1..d96be36405a0 100644
--- a/drivers/misc/ocxl/file.c
+++ b/drivers/misc/ocxl/file.c
@@ -581,7 +581,7 @@ void ocxl_file_unregister_afu(struct ocxl_afu *afu)
device_unregister(&info->dev);
}
-static char *ocxl_devnode(struct device *dev, umode_t *mode)
+static char *ocxl_devnode(const struct device *dev, umode_t *mode)
{
return kasprintf(GFP_KERNEL, "ocxl/%s", dev_name(dev));
}
--
2.38.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] driver core: fix up some missing class.devnode() conversions.
@ 2022-11-28 17:35 ` Greg Kroah-Hartman
0 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2022-11-28 17:35 UTC (permalink / raw)
To: linux-kernel
Cc: Stephen Rothwell, Andrew Donnellan, Arnd Bergmann,
Greg Kroah-Hartman, Nicholas Piggin, Frederic Barrat,
linuxppc-dev
In commit ff62b8e6588f ("driver core: make struct class.devnode() take a
const *") the ->devnode callback changed the pointer to be const, but a
few instances of PowerPC drivers were not caught for some reason.
Fix this up by changing the pointers to be const.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Frederic Barrat <fbarrat@linux.ibm.com>
Cc: Andrew Donnellan <ajd@linux.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@lists.ozlabs.org
Fixes: ff62b8e6588f ("driver core: make struct class.devnode() take a const *")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/platforms/book3s/vas-api.c | 2 +-
drivers/misc/cxl/file.c | 2 +-
drivers/misc/ocxl/file.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/platforms/book3s/vas-api.c b/arch/powerpc/platforms/book3s/vas-api.c
index 40f5ae5e1238..eb5bed333750 100644
--- a/arch/powerpc/platforms/book3s/vas-api.c
+++ b/arch/powerpc/platforms/book3s/vas-api.c
@@ -53,7 +53,7 @@ struct coproc_instance {
struct vas_window *txwin;
};
-static char *coproc_devnode(struct device *dev, umode_t *mode)
+static char *coproc_devnode(const struct device *dev, umode_t *mode)
{
return kasprintf(GFP_KERNEL, "crypto/%s", dev_name(dev));
}
diff --git a/drivers/misc/cxl/file.c b/drivers/misc/cxl/file.c
index 3dbdce96fae0..5878329b011a 100644
--- a/drivers/misc/cxl/file.c
+++ b/drivers/misc/cxl/file.c
@@ -546,7 +546,7 @@ static const struct file_operations afu_master_fops = {
};
-static char *cxl_devnode(struct device *dev, umode_t *mode)
+static char *cxl_devnode(const struct device *dev, umode_t *mode)
{
if (cpu_has_feature(CPU_FTR_HVMODE) &&
CXL_DEVT_IS_CARD(dev->devt)) {
diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c
index d46dba2df5a1..d96be36405a0 100644
--- a/drivers/misc/ocxl/file.c
+++ b/drivers/misc/ocxl/file.c
@@ -581,7 +581,7 @@ void ocxl_file_unregister_afu(struct ocxl_afu *afu)
device_unregister(&info->dev);
}
-static char *ocxl_devnode(struct device *dev, umode_t *mode)
+static char *ocxl_devnode(const struct device *dev, umode_t *mode)
{
return kasprintf(GFP_KERNEL, "ocxl/%s", dev_name(dev));
}
--
2.38.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] driver core: fix up some missing class.devnode() conversions.
2022-11-28 17:35 ` Greg Kroah-Hartman
@ 2022-11-29 6:33 ` Christophe Leroy
-1 siblings, 0 replies; 8+ messages in thread
From: Christophe Leroy @ 2022-11-29 6:33 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel
Cc: Stephen Rothwell, Michael Ellerman, Nicholas Piggin,
Frederic Barrat, Andrew Donnellan, Arnd Bergmann, linuxppc-dev
Le 28/11/2022 à 18:35, Greg Kroah-Hartman a écrit :
> In commit ff62b8e6588f ("driver core: make struct class.devnode() take a
> const *") the ->devnode callback changed the pointer to be const, but a
> few instances of PowerPC drivers were not caught for some reason.
>
> Fix this up by changing the pointers to be const.
Build fails:
/linux/arch/powerpc/platforms/book3s/vas-api.c: In function
'vas_register_coproc_api':
/linux/arch/powerpc/platforms/book3s/vas-api.c:590:31: error: assignment
from incompatible pointer type [-Werror=incompatible-pointer-types]
coproc_device.class->devnode = coproc_devnode;
^
cc1: all warnings being treated as errors
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
> Cc: Frederic Barrat <fbarrat@linux.ibm.com>
> Cc: Andrew Donnellan <ajd@linux.ibm.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: linuxppc-dev@lists.ozlabs.org
> Fixes: ff62b8e6588f ("driver core: make struct class.devnode() take a const *")
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> arch/powerpc/platforms/book3s/vas-api.c | 2 +-
> drivers/misc/cxl/file.c | 2 +-
> drivers/misc/ocxl/file.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/platforms/book3s/vas-api.c b/arch/powerpc/platforms/book3s/vas-api.c
> index 40f5ae5e1238..eb5bed333750 100644
> --- a/arch/powerpc/platforms/book3s/vas-api.c
> +++ b/arch/powerpc/platforms/book3s/vas-api.c
> @@ -53,7 +53,7 @@ struct coproc_instance {
> struct vas_window *txwin;
> };
>
> -static char *coproc_devnode(struct device *dev, umode_t *mode)
> +static char *coproc_devnode(const struct device *dev, umode_t *mode)
> {
> return kasprintf(GFP_KERNEL, "crypto/%s", dev_name(dev));
> }
> diff --git a/drivers/misc/cxl/file.c b/drivers/misc/cxl/file.c
> index 3dbdce96fae0..5878329b011a 100644
> --- a/drivers/misc/cxl/file.c
> +++ b/drivers/misc/cxl/file.c
> @@ -546,7 +546,7 @@ static const struct file_operations afu_master_fops = {
> };
>
>
> -static char *cxl_devnode(struct device *dev, umode_t *mode)
> +static char *cxl_devnode(const struct device *dev, umode_t *mode)
> {
> if (cpu_has_feature(CPU_FTR_HVMODE) &&
> CXL_DEVT_IS_CARD(dev->devt)) {
> diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c
> index d46dba2df5a1..d96be36405a0 100644
> --- a/drivers/misc/ocxl/file.c
> +++ b/drivers/misc/ocxl/file.c
> @@ -581,7 +581,7 @@ void ocxl_file_unregister_afu(struct ocxl_afu *afu)
> device_unregister(&info->dev);
> }
>
> -static char *ocxl_devnode(struct device *dev, umode_t *mode)
> +static char *ocxl_devnode(const struct device *dev, umode_t *mode)
> {
> return kasprintf(GFP_KERNEL, "ocxl/%s", dev_name(dev));
> }
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] driver core: fix up some missing class.devnode() conversions.
@ 2022-11-29 6:33 ` Christophe Leroy
0 siblings, 0 replies; 8+ messages in thread
From: Christophe Leroy @ 2022-11-29 6:33 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel
Cc: Stephen Rothwell, Andrew Donnellan, Arnd Bergmann,
Nicholas Piggin, Frederic Barrat, linuxppc-dev
Le 28/11/2022 à 18:35, Greg Kroah-Hartman a écrit :
> In commit ff62b8e6588f ("driver core: make struct class.devnode() take a
> const *") the ->devnode callback changed the pointer to be const, but a
> few instances of PowerPC drivers were not caught for some reason.
>
> Fix this up by changing the pointers to be const.
Build fails:
/linux/arch/powerpc/platforms/book3s/vas-api.c: In function
'vas_register_coproc_api':
/linux/arch/powerpc/platforms/book3s/vas-api.c:590:31: error: assignment
from incompatible pointer type [-Werror=incompatible-pointer-types]
coproc_device.class->devnode = coproc_devnode;
^
cc1: all warnings being treated as errors
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
> Cc: Frederic Barrat <fbarrat@linux.ibm.com>
> Cc: Andrew Donnellan <ajd@linux.ibm.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: linuxppc-dev@lists.ozlabs.org
> Fixes: ff62b8e6588f ("driver core: make struct class.devnode() take a const *")
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> arch/powerpc/platforms/book3s/vas-api.c | 2 +-
> drivers/misc/cxl/file.c | 2 +-
> drivers/misc/ocxl/file.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/platforms/book3s/vas-api.c b/arch/powerpc/platforms/book3s/vas-api.c
> index 40f5ae5e1238..eb5bed333750 100644
> --- a/arch/powerpc/platforms/book3s/vas-api.c
> +++ b/arch/powerpc/platforms/book3s/vas-api.c
> @@ -53,7 +53,7 @@ struct coproc_instance {
> struct vas_window *txwin;
> };
>
> -static char *coproc_devnode(struct device *dev, umode_t *mode)
> +static char *coproc_devnode(const struct device *dev, umode_t *mode)
> {
> return kasprintf(GFP_KERNEL, "crypto/%s", dev_name(dev));
> }
> diff --git a/drivers/misc/cxl/file.c b/drivers/misc/cxl/file.c
> index 3dbdce96fae0..5878329b011a 100644
> --- a/drivers/misc/cxl/file.c
> +++ b/drivers/misc/cxl/file.c
> @@ -546,7 +546,7 @@ static const struct file_operations afu_master_fops = {
> };
>
>
> -static char *cxl_devnode(struct device *dev, umode_t *mode)
> +static char *cxl_devnode(const struct device *dev, umode_t *mode)
> {
> if (cpu_has_feature(CPU_FTR_HVMODE) &&
> CXL_DEVT_IS_CARD(dev->devt)) {
> diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c
> index d46dba2df5a1..d96be36405a0 100644
> --- a/drivers/misc/ocxl/file.c
> +++ b/drivers/misc/ocxl/file.c
> @@ -581,7 +581,7 @@ void ocxl_file_unregister_afu(struct ocxl_afu *afu)
> device_unregister(&info->dev);
> }
>
> -static char *ocxl_devnode(struct device *dev, umode_t *mode)
> +static char *ocxl_devnode(const struct device *dev, umode_t *mode)
> {
> return kasprintf(GFP_KERNEL, "ocxl/%s", dev_name(dev));
> }
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] driver core: fix up some missing class.devnode() conversions.
2022-11-29 6:33 ` Christophe Leroy
@ 2022-11-29 8:27 ` Greg Kroah-Hartman
-1 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2022-11-29 8:27 UTC (permalink / raw)
To: Christophe Leroy
Cc: linux-kernel, Stephen Rothwell, Michael Ellerman,
Nicholas Piggin, Frederic Barrat, Andrew Donnellan,
Arnd Bergmann, linuxppc-dev
On Tue, Nov 29, 2022 at 06:33:04AM +0000, Christophe Leroy wrote:
>
>
> Le 28/11/2022 à 18:35, Greg Kroah-Hartman a écrit :
> > In commit ff62b8e6588f ("driver core: make struct class.devnode() take a
> > const *") the ->devnode callback changed the pointer to be const, but a
> > few instances of PowerPC drivers were not caught for some reason.
> >
> > Fix this up by changing the pointers to be const.
>
> Build fails:
>
> /linux/arch/powerpc/platforms/book3s/vas-api.c: In function
> 'vas_register_coproc_api':
> /linux/arch/powerpc/platforms/book3s/vas-api.c:590:31: error: assignment
> from incompatible pointer type [-Werror=incompatible-pointer-types]
> coproc_device.class->devnode = coproc_devnode;
> ^
> cc1: all warnings being treated as errors
What did you build this against? It has to be be against my
driver-core-next tree as that is where the Fixes: commit is.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] driver core: fix up some missing class.devnode() conversions.
@ 2022-11-29 8:27 ` Greg Kroah-Hartman
0 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2022-11-29 8:27 UTC (permalink / raw)
To: Christophe Leroy
Cc: Stephen Rothwell, Andrew Donnellan, Arnd Bergmann, linux-kernel,
Nicholas Piggin, Frederic Barrat, linuxppc-dev
On Tue, Nov 29, 2022 at 06:33:04AM +0000, Christophe Leroy wrote:
>
>
> Le 28/11/2022 à 18:35, Greg Kroah-Hartman a écrit :
> > In commit ff62b8e6588f ("driver core: make struct class.devnode() take a
> > const *") the ->devnode callback changed the pointer to be const, but a
> > few instances of PowerPC drivers were not caught for some reason.
> >
> > Fix this up by changing the pointers to be const.
>
> Build fails:
>
> /linux/arch/powerpc/platforms/book3s/vas-api.c: In function
> 'vas_register_coproc_api':
> /linux/arch/powerpc/platforms/book3s/vas-api.c:590:31: error: assignment
> from incompatible pointer type [-Werror=incompatible-pointer-types]
> coproc_device.class->devnode = coproc_devnode;
> ^
> cc1: all warnings being treated as errors
What did you build this against? It has to be be against my
driver-core-next tree as that is where the Fixes: commit is.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] driver core: fix up some missing class.devnode() conversions.
2022-11-29 8:27 ` Greg Kroah-Hartman
@ 2022-11-29 9:02 ` Christophe Leroy
-1 siblings, 0 replies; 8+ messages in thread
From: Christophe Leroy @ 2022-11-29 9:02 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Stephen Rothwell, Michael Ellerman,
Nicholas Piggin, Frederic Barrat, Andrew Donnellan,
Arnd Bergmann, linuxppc-dev
Le 29/11/2022 à 09:27, Greg Kroah-Hartman a écrit :
> On Tue, Nov 29, 2022 at 06:33:04AM +0000, Christophe Leroy wrote:
>>
>>
>> Le 28/11/2022 à 18:35, Greg Kroah-Hartman a écrit :
>>> In commit ff62b8e6588f ("driver core: make struct class.devnode() take a
>>> const *") the ->devnode callback changed the pointer to be const, but a
>>> few instances of PowerPC drivers were not caught for some reason.
>>>
>>> Fix this up by changing the pointers to be const.
>>
>> Build fails:
>>
>> /linux/arch/powerpc/platforms/book3s/vas-api.c: In function
>> 'vas_register_coproc_api':
>> /linux/arch/powerpc/platforms/book3s/vas-api.c:590:31: error: assignment
>> from incompatible pointer type [-Werror=incompatible-pointer-types]
>> coproc_device.class->devnode = coproc_devnode;
>> ^
>> cc1: all warnings being treated as errors
>
> What did you build this against? It has to be be against my
> driver-core-next tree as that is where the Fixes: commit is.
>
Failure was reported by powerpc patchwork :
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20221128173539.3112234-1-gregkh@linuxfoundation.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] driver core: fix up some missing class.devnode() conversions.
@ 2022-11-29 9:02 ` Christophe Leroy
0 siblings, 0 replies; 8+ messages in thread
From: Christophe Leroy @ 2022-11-29 9:02 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Stephen Rothwell, Andrew Donnellan, Arnd Bergmann, linux-kernel,
Nicholas Piggin, Frederic Barrat, linuxppc-dev
Le 29/11/2022 à 09:27, Greg Kroah-Hartman a écrit :
> On Tue, Nov 29, 2022 at 06:33:04AM +0000, Christophe Leroy wrote:
>>
>>
>> Le 28/11/2022 à 18:35, Greg Kroah-Hartman a écrit :
>>> In commit ff62b8e6588f ("driver core: make struct class.devnode() take a
>>> const *") the ->devnode callback changed the pointer to be const, but a
>>> few instances of PowerPC drivers were not caught for some reason.
>>>
>>> Fix this up by changing the pointers to be const.
>>
>> Build fails:
>>
>> /linux/arch/powerpc/platforms/book3s/vas-api.c: In function
>> 'vas_register_coproc_api':
>> /linux/arch/powerpc/platforms/book3s/vas-api.c:590:31: error: assignment
>> from incompatible pointer type [-Werror=incompatible-pointer-types]
>> coproc_device.class->devnode = coproc_devnode;
>> ^
>> cc1: all warnings being treated as errors
>
> What did you build this against? It has to be be against my
> driver-core-next tree as that is where the Fixes: commit is.
>
Failure was reported by powerpc patchwork :
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20221128173539.3112234-1-gregkh@linuxfoundation.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-11-29 9:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 17:35 [PATCH] driver core: fix up some missing class.devnode() conversions Greg Kroah-Hartman
2022-11-28 17:35 ` Greg Kroah-Hartman
2022-11-29 6:33 ` Christophe Leroy
2022-11-29 6:33 ` Christophe Leroy
2022-11-29 8:27 ` Greg Kroah-Hartman
2022-11-29 8:27 ` Greg Kroah-Hartman
2022-11-29 9:02 ` Christophe Leroy
2022-11-29 9:02 ` Christophe Leroy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.