public inbox for linux-edac@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Borislav Petkov <bp@alien8.de>
Cc: tony.luck@intel.com, linux-kernel@vger.kernel.org,
	James Morse <james.morse@arm.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Robert Richter <rric@kernel.org>,
	linux-edac@vger.kernel.org
Subject: Re: [PATCH] EDAC: constantify the struct bus_type usage
Date: Fri, 29 Dec 2023 09:10:02 +0000	[thread overview]
Message-ID: <2023122918-tiring-isolating-3f4a@gregkh> (raw)
In-Reply-To: <20231228150003.GAZY2Nc38sAIa0bat/@fat_crate.local>

On Thu, Dec 28, 2023 at 04:00:03PM +0100, Borislav Petkov wrote:
> On Tue, Dec 19, 2023 at 02:13:10PM +0100, Greg Kroah-Hartman wrote:
> > In many places in the edac code, struct bus_type pointers are passed
> > around and then eventually sent to the driver core, which can handle a
> > constant pointer.  So constantify all of the edac usage of these as well
> > because the data in them is never modified by the edac code either.
> 
> "constantify", huh? Not enough words in the English language so let's do
> new ones?
> 
> :-)

Hey, we could be using German and then it would be something like
"Konstantifizierung" :)

> So what's the plan with this "constantification"?
> 
> Because:
> 
> drivers/edac/edac_module.c: In function ‘edac_subsys_init’:
> drivers/edac/edac_module.c:80:38: warning: passing argument 1 of ‘subsys_system_register’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
>    80 |         err = subsys_system_register(&edac_subsys, NULL);
>       |                                      ^~~~~~~~~~~~
> In file included from ./include/linux/edac.h:16,
>                  from drivers/edac/edac_module.c:13:
> ./include/linux/device.h:75:45: note: expected ‘struct bus_type *’ but argument is of type ‘const struct bus_type *’
>    75 | int subsys_system_register(struct bus_type *subsys,
>       |

Ah, oops, that means this depends on a patch in my trees already that
fix this up.  You can wait until after 6.8-rc1 to get to this, or I can
take it in my tree if you want now, which ever is easiest for you.

thanks,

greg k-h

  reply	other threads:[~2023-12-29  9:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19 13:13 [PATCH] EDAC: constantify the struct bus_type usage Greg Kroah-Hartman
2023-12-28 15:00 ` Borislav Petkov
2023-12-29  9:10   ` Greg Kroah-Hartman [this message]
2023-12-29  9:29     ` Borislav Petkov

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=2023122918-tiring-isolating-3f4a@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rric@kernel.org \
    --cc=tony.luck@intel.com \
    /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