From: "Krzysztof Wilczyński" <kw@linux.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
"lpieralisi@kernel.org" <lpieralisi@kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"jingoohan1@gmail.com" <jingoohan1@gmail.com>,
"gustavo.pimentel@synopsys.com" <gustavo.pimentel@synopsys.com>,
"mani@kernel.org" <mani@kernel.org>,
"minghuan.Lian@nxp.com" <minghuan.Lian@nxp.com>,
"mingkai.hu@nxp.com" <mingkai.hu@nxp.com>,
"roy.zang@nxp.com" <roy.zang@nxp.com>,
"marek.vasut+renesas@gmail.com" <marek.vasut+renesas@gmail.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH 0/3] PCI: dwc: Improve code readability
Date: Mon, 13 Nov 2023 22:18:47 +0900 [thread overview]
Message-ID: <20231113131847.GA2770646@rocinante> (raw)
In-Reply-To: <CAMuHMdX2D-Ui=6Xt_x_yDAYQYoooP51ZwZTmoASwcUeZTcME4g@mail.gmail.com>
Hello,
[...]
> > > I confirmed that the uintptr_t fixed the issue.
> >
> > We declined a similar fix in the past[1] ...
> >
> > > I also think that adding a new struct with the mode is overkill.
> >
> > ... with the hopes that a driver could drop the switch statements in place
> > of using the other pattern. Also, to be consistent with other drivers that
> > do this already.
>
> Note that the issue of casting is something we cannot fix easily:
> some *_device_id structs use "kernel_ulong_t" for the "data" member,
> others use "void *".
>
> git grep -W "_device_id" -- include/linux/mod_devicetable.h | grep data
>
> In addition, several drivers use multiple types of device IDs, so you
> cannot settle on one type to avoid casts.
>
> Also, putting enum values in instances of that struct, as suggested,
> increases kernel size, for IMHO no additional gain.
All good points! Thank you for taking the time to get back to me. Appreciated. :)
> If there is more data to put in the struct, I agree it makes sense to use
> a struct.
Yeah. Perhaps if there is such a need in the future, indeed.
Krzysztof
next prev parent reply other threads:[~2023-11-13 13:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 1:32 [PATCH 0/3] PCI: dwc: Improve code readability Yoshihiro Shimoda
2023-11-13 1:32 ` [PATCH 1/3] PCI: dwc: Rename to .init in struct dw_pcie_ep_ops Yoshihiro Shimoda
2023-11-13 10:14 ` Serge Semin
2023-11-13 11:49 ` Yoshihiro Shimoda
2023-11-13 1:32 ` [PATCH 2/3] PCI: dwc: Rename to .get_dbi_offset " Yoshihiro Shimoda
2023-11-13 10:34 ` Serge Semin
2023-11-13 1:33 ` [PATCH 3/3] PCI: dwc: Add dw_pcie_ep_{read,write}_dbi[2] helpers Yoshihiro Shimoda
2023-11-13 12:41 ` Serge Semin
2023-11-14 1:29 ` Yoshihiro Shimoda
2023-11-13 10:09 ` [PATCH 0/3] PCI: dwc: Improve code readability Krzysztof Wilczyński
2023-11-13 11:07 ` Geert Uytterhoeven
2023-11-13 11:47 ` Yoshihiro Shimoda
2023-11-13 12:22 ` Krzysztof Wilczyński
2023-11-13 12:57 ` Geert Uytterhoeven
2023-11-13 13:18 ` Krzysztof Wilczyński [this message]
2023-11-14 0:20 ` Yoshihiro Shimoda
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=20231113131847.GA2770646@rocinante \
--to=kw@linux.com \
--cc=bhelgaas@google.com \
--cc=geert@linux-m68k.org \
--cc=gustavo.pimentel@synopsys.com \
--cc=jingoohan1@gmail.com \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=marek.vasut+renesas@gmail.com \
--cc=minghuan.Lian@nxp.com \
--cc=mingkai.hu@nxp.com \
--cc=robh@kernel.org \
--cc=roy.zang@nxp.com \
--cc=yoshihiro.shimoda.uh@renesas.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;
as well as URLs for NNTP newsgroup(s).