From: Damien Le Moal <dlemoal@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>, Arnd Bergmann <arnd@kernel.org>,
linux-kernel@vger.kernel.org, Niklas Cassel <cassel@kernel.org>,
Saeed Bishara <saeed@ubuntu-saeed.il.marvell.com>
Cc: "Ma Ke" <make_ruc2021@163.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Sergey Shtylyov" <s.shtylyov@omp.ru>,
"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
"Jeff Garzik" <jeff@garzik.org>,
linux-ide@vger.kernel.org
Subject: Re: [PATCH 30/34] sata: mv: drop unnecessary #ifdef checks
Date: Thu, 4 Apr 2024 12:45:02 +0900 [thread overview]
Message-ID: <3423b438-62eb-4bb7-ace5-ded592a8d89b@kernel.org> (raw)
In-Reply-To: <78731619-58a3-406b-9112-5eb991bc6e7e@app.fastmail.com>
On 4/3/24 17:50, Arnd Bergmann wrote:
> On Wed, Apr 3, 2024, at 10:32, Damien Le Moal wrote:
>> On 4/3/24 17:06, Arnd Bergmann wrote:
>>> From: Arnd Bergmann <arnd@arndb.de>
>>>
>>> Building with W=1 shows a warning for an unused variable when CONFIG_PCI
>>> is diabled:
>>>
>>> drivers/ata/sata_mv.c:790:35: error: unused variable 'mv_pci_tbl' [-Werror,-Wunused-const-variable]
>>> static const struct pci_device_id mv_pci_tbl[] = {
>>>
>>> Move the table into the same block that containsn the pci_driver
>>> definition.
>>>
>>> Fixes: 7bb3c5290ca0 ("sata_mv: Remove PCI dependency")
>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>
>> The patch title is also not describing what the patch does.
>> Are you OK with changing that to:
>>
>> ata: sata_mv: Fix PCI device ID table declaration warning
>>
>> ?
>
> Yes, please do, thanks!
Applied to for-6.9-fixes with discussed tweaks and removal of extra blanklines
pointed out by Andy. Thanks !
>
> I had first tried to remove all the #ifdef checks and just
> rely on dead-code-elimination doing the same when
> pci_register_driver() is stubbed out and IS_ENABLED(CONFIG_OF)
> checks turn off the rest. Unfortunately, the include/linux/pci.h
> interfaces are not all stubbed out here and cause compile-time
> failures without CONFIG_PCI, so that didn't work out.
>
> Arnd
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2024-04-04 3:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 8:06 [PATCH 00/34] address all -Wunused-const warnings Arnd Bergmann
2024-04-03 8:06 ` [PATCH 30/34] sata: mv: drop unnecessary #ifdef checks Arnd Bergmann
2024-04-03 8:29 ` Damien Le Moal
2024-04-03 8:32 ` Damien Le Moal
2024-04-03 8:50 ` Arnd Bergmann
2024-04-04 3:45 ` Damien Le Moal [this message]
2024-04-03 9:10 ` Andy Shevchenko
2024-04-06 5:20 ` [PATCH 00/34] address all -Wunused-const warnings patchwork-bot+netdevbpf
2024-04-10 8:02 ` (subset) " Sebastian Reichel
2024-04-22 8:16 ` Michael Ellerman
2025-01-27 13:24 ` Andy Shevchenko
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=3423b438-62eb-4bb7-ace5-ded592a8d89b@kernel.org \
--to=dlemoal@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=cassel@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=make_ruc2021@163.com \
--cc=s.shtylyov@omp.ru \
--cc=saeed@ubuntu-saeed.il.marvell.com \
--cc=u.kleine-koenig@pengutronix.de \
/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).