linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Andrew Donnellan <ajd@linux.ibm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Nicholas Piggin <npiggin@gmail.com>,
	Frederic Barrat <fbarrat@linux.ibm.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] driver core: fix up some missing class.devnode() conversions.
Date: Tue, 29 Nov 2022 06:33:04 +0000	[thread overview]
Message-ID: <9da4f875-7fb3-803f-379e-0352eb824d8f@csgroup.eu> (raw)
In-Reply-To: <20221128173539.3112234-1-gregkh@linuxfoundation.org>



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));
>   }

  reply	other threads:[~2022-11-29  6:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 17:35 [PATCH] driver core: fix up some missing class.devnode() conversions Greg Kroah-Hartman
2022-11-29  6:33 ` Christophe Leroy [this message]
2022-11-29  8:27   ` Greg Kroah-Hartman
2022-11-29  9:02     ` Christophe Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9da4f875-7fb3-803f-379e-0352eb824d8f@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=ajd@linux.ibm.com \
    --cc=arnd@arndb.de \
    --cc=fbarrat@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).