From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, davem@davemloft.net,
linux-can@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH net-next 0/14] pull-request: can-next 2022-10-31
Date: Fri, 4 Nov 2022 15:53:57 +0100 [thread overview]
Message-ID: <Y2UnhZf5/HkY6vwm@kroah.com> (raw)
In-Reply-To: <20221104130857.amzwa2mzmwhbljmk@pengutronix.de>
On Fri, Nov 04, 2022 at 02:08:57PM +0100, Marc Kleine-Budde wrote:
> On 01.11.2022 06:06:13, Greg Kroah-Hartman wrote:
> > Also, the line:
> >
> > + .attrs = (struct attribute **)peak_usb_sysfs_attrs,
> >
> > Is odd, there should never be a need to cast anything like this if you
> > are doing things properly.
>
> After marking the struct attribute not as const, we can remove the cast:
>
> | --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c
> | +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
> | @@ -64,14 +64,14 @@ static ssize_t user_devid_show(struct device *dev, struct device_attribute *attr
> | }
> | static DEVICE_ATTR_RO(user_devid);
> |
> | -static const struct attribute *peak_usb_sysfs_attrs[] = {
> | +static struct attribute *peak_usb_sysfs_attrs[] = {
Ah. Yeah, I would love to make this a const pointer, but people do some
pretty crazy dynamic stuff with attribute groups at times, so that it
will not always work.
I have a long series of patches I'm working on that add more const
markings to the kobject and then the driver core apis, I'll add this
type of thing to the idea list as what to work on next.
thanks,
greg k-h
next prev parent reply other threads:[~2022-11-04 14:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-31 15:43 [PATCH net-next 0/14] pull-request: can-next 2022-10-31 Marc Kleine-Budde
2022-10-31 15:43 ` [PATCH net-next 01/14] can: peak_usb: rename device_id to a more explicit name Marc Kleine-Budde
2022-10-31 15:43 ` [PATCH net-next 02/14] can: peak_usb: add callback to read user value of CANFD devices Marc Kleine-Budde
2022-10-31 15:43 ` [PATCH net-next 03/14] can: peak_usb: allow flashing of the user device id Marc Kleine-Budde
2022-10-31 15:43 ` [PATCH net-next 04/14] can: peak_usb: replace unregister_netdev() with unregister_candev() Marc Kleine-Budde
2022-10-31 15:43 ` [PATCH net-next 05/14] can: peak_usb: add ethtool interface to user defined flashed device number Marc Kleine-Budde
2022-10-31 15:43 ` [PATCH net-next 06/14] can: peak_usb: export PCAN user device ID as sysfs device attribute Marc Kleine-Budde
2022-10-31 15:43 ` [PATCH net-next 07/14] can: peak_usb: align user device id format in log with sysfs attribute Marc Kleine-Budde
2022-10-31 15:44 ` [PATCH net-next 08/14] can: kvaser_usb: kvaser_usb_set_bittiming(): fix redundant initialization warning for err Marc Kleine-Budde
2022-10-31 15:44 ` [PATCH net-next 09/14] can: kvaser_usb: kvaser_usb_set_{,data}bittiming(): remove empty lines in variable declaration Marc Kleine-Budde
2022-10-31 15:44 ` [PATCH net-next 10/14] can: rcar_canfd: rcar_canfd_probe: Add struct rcar_canfd_hw_info to driver data Marc Kleine-Budde
2022-10-31 15:44 ` [PATCH net-next 11/14] can: rcar_canfd: Add max_channels to struct rcar_canfd_hw_info Marc Kleine-Budde
2022-10-31 15:44 ` [PATCH net-next 12/14] can: rcar_canfd: Add shared_global_irqs " Marc Kleine-Budde
2022-10-31 15:44 ` [PATCH net-next 13/14] can: rcar_canfd: Add postdiv " Marc Kleine-Budde
2022-10-31 15:44 ` [PATCH net-next 14/14] can: rcar_canfd: Add multi_channel_irqs " Marc Kleine-Budde
2022-11-01 3:27 ` [PATCH net-next 0/14] pull-request: can-next 2022-10-31 Jakub Kicinski
2022-11-01 5:06 ` Greg Kroah-Hartman
2022-11-04 13:08 ` Marc Kleine-Budde
2022-11-04 14:53 ` Greg Kroah-Hartman [this message]
2022-11-08 19:07 ` Lukas Magel
2022-11-01 8:26 ` Marc Kleine-Budde
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=Y2UnhZf5/HkY6vwm@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
/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).