All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>,
	linux-kernel@vger.kernel.org, Niklas Cassel <cassel@kernel.org>,
	Saeed Bishara <saeed@ubuntu-saeed.il.marvell.com>
Cc: "Arnd Bergmann" <arnd@arndb.de>, "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: Wed, 3 Apr 2024 17:32:23 +0900	[thread overview]
Message-ID: <a1ca8aa3-d122-4ec9-b239-8180a02106e1@kernel.org> (raw)
In-Reply-To: <20240403080702.3509288-31-arnd@kernel.org>

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

?

> ---
>  drivers/ata/sata_mv.c | 64 +++++++++++++++++++++----------------------
>  1 file changed, 32 insertions(+), 32 deletions(-)
> 
> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
> index e82786c63fbd..697063890f5d 100644
> --- a/drivers/ata/sata_mv.c
> +++ b/drivers/ata/sata_mv.c
> @@ -787,37 +787,6 @@ static const struct ata_port_info mv_port_info[] = {
>  	},
>  };
>  
> -static const struct pci_device_id mv_pci_tbl[] = {
> -	{ PCI_VDEVICE(MARVELL, 0x5040), chip_504x },
> -	{ PCI_VDEVICE(MARVELL, 0x5041), chip_504x },
> -	{ PCI_VDEVICE(MARVELL, 0x5080), chip_5080 },
> -	{ PCI_VDEVICE(MARVELL, 0x5081), chip_508x },
> -	/* RocketRAID 1720/174x have different identifiers */
> -	{ PCI_VDEVICE(TTI, 0x1720), chip_6042 },
> -	{ PCI_VDEVICE(TTI, 0x1740), chip_6042 },
> -	{ PCI_VDEVICE(TTI, 0x1742), chip_6042 },
> -
> -	{ PCI_VDEVICE(MARVELL, 0x6040), chip_604x },
> -	{ PCI_VDEVICE(MARVELL, 0x6041), chip_604x },
> -	{ PCI_VDEVICE(MARVELL, 0x6042), chip_6042 },
> -	{ PCI_VDEVICE(MARVELL, 0x6080), chip_608x },
> -	{ PCI_VDEVICE(MARVELL, 0x6081), chip_608x },
> -
> -	{ PCI_VDEVICE(ADAPTEC2, 0x0241), chip_604x },
> -
> -	/* Adaptec 1430SA */
> -	{ PCI_VDEVICE(ADAPTEC2, 0x0243), chip_7042 },
> -
> -	/* Marvell 7042 support */
> -	{ PCI_VDEVICE(MARVELL, 0x7042), chip_7042 },
> -
> -	/* Highpoint RocketRAID PCIe series */
> -	{ PCI_VDEVICE(TTI, 0x2300), chip_7042 },
> -	{ PCI_VDEVICE(TTI, 0x2310), chip_7042 },
> -
> -	{ }			/* terminate list */
> -};
> -
>  static const struct mv_hw_ops mv5xxx_ops = {
>  	.phy_errata		= mv5_phy_errata,
>  	.enable_leds		= mv5_enable_leds,
> @@ -4303,6 +4272,37 @@ static int mv_pci_init_one(struct pci_dev *pdev,
>  static int mv_pci_device_resume(struct pci_dev *pdev);
>  #endif
>  
> +static const struct pci_device_id mv_pci_tbl[] = {
> +	{ PCI_VDEVICE(MARVELL, 0x5040), chip_504x },
> +	{ PCI_VDEVICE(MARVELL, 0x5041), chip_504x },
> +	{ PCI_VDEVICE(MARVELL, 0x5080), chip_5080 },
> +	{ PCI_VDEVICE(MARVELL, 0x5081), chip_508x },
> +	/* RocketRAID 1720/174x have different identifiers */
> +	{ PCI_VDEVICE(TTI, 0x1720), chip_6042 },
> +	{ PCI_VDEVICE(TTI, 0x1740), chip_6042 },
> +	{ PCI_VDEVICE(TTI, 0x1742), chip_6042 },
> +
> +	{ PCI_VDEVICE(MARVELL, 0x6040), chip_604x },
> +	{ PCI_VDEVICE(MARVELL, 0x6041), chip_604x },
> +	{ PCI_VDEVICE(MARVELL, 0x6042), chip_6042 },
> +	{ PCI_VDEVICE(MARVELL, 0x6080), chip_608x },
> +	{ PCI_VDEVICE(MARVELL, 0x6081), chip_608x },
> +
> +	{ PCI_VDEVICE(ADAPTEC2, 0x0241), chip_604x },
> +
> +	/* Adaptec 1430SA */
> +	{ PCI_VDEVICE(ADAPTEC2, 0x0243), chip_7042 },
> +
> +	/* Marvell 7042 support */
> +	{ PCI_VDEVICE(MARVELL, 0x7042), chip_7042 },
> +
> +	/* Highpoint RocketRAID PCIe series */
> +	{ PCI_VDEVICE(TTI, 0x2300), chip_7042 },
> +	{ PCI_VDEVICE(TTI, 0x2310), chip_7042 },
> +
> +	{ }			/* terminate list */
> +};
> +
>  
>  static struct pci_driver mv_pci_driver = {
>  	.name			= DRV_NAME,
> @@ -4315,6 +4315,7 @@ static struct pci_driver mv_pci_driver = {
>  #endif
>  
>  };
> +MODULE_DEVICE_TABLE(pci, mv_pci_tbl);
>  
>  /**
>   *      mv_print_info - Dump key info to kernel log for perusal.
> @@ -4487,7 +4488,6 @@ static void __exit mv_exit(void)
>  MODULE_AUTHOR("Brett Russ");
>  MODULE_DESCRIPTION("SCSI low-level driver for Marvell SATA controllers");
>  MODULE_LICENSE("GPL v2");
> -MODULE_DEVICE_TABLE(pci, mv_pci_tbl);
>  MODULE_VERSION(DRV_VERSION);
>  MODULE_ALIAS("platform:" DRV_NAME);
>  

-- 
Damien Le Moal
Western Digital Research


  parent reply	other threads:[~2024-04-03  8:32 UTC|newest]

Thread overview: 140+ 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 ` Arnd Bergmann
2024-04-03  8:06 ` Arnd Bergmann
2024-04-03  8:06 ` [PATCH 01/34] powerpc/fsl-soc: hide unused const variable Arnd Bergmann
2024-04-03  8:06   ` Arnd Bergmann
2024-04-03  8:19   ` Christophe Leroy
2024-04-03  8:19     ` Christophe Leroy
2024-04-03  8:06 ` [PATCH 02/34] ubsan: fix unused variable warning in test module Arnd Bergmann
2024-04-03 21:36   ` (subset) " Kees Cook
2024-04-03  8:06 ` [PATCH 03/34] platform: goldfish: remove ACPI_PTR() annotations Arnd Bergmann
2024-04-03  9:08   ` Andy Shevchenko
2024-04-03  8:06 ` [PATCH 04/34] i2c: pxa: hide unused icr_bits[] variable Arnd Bergmann
2024-04-03 23:17   ` Andi Shyti
2024-04-03  8:06 ` [PATCH 05/34] 3c515: remove unused 'mtu' variable Arnd Bergmann
2024-04-03  8:06 ` [PATCH 06/34] tracing: hide unused ftrace_event_id_fops Arnd Bergmann
2024-04-03  8:06 ` [PATCH 07/34] Input: stmpe-ts - mark OF related data as maybe unused Arnd Bergmann
2024-04-03  8:06   ` Arnd Bergmann
2024-04-03  9:40   ` Andy Shevchenko
2024-04-03  9:40     ` Andy Shevchenko
2024-04-03  9:52     ` Krzysztof Kozlowski
2024-04-03  9:52       ` Krzysztof Kozlowski
2024-04-03 10:03       ` Andy Shevchenko
2024-04-03 10:03         ` Andy Shevchenko
2024-04-03 10:10         ` Krzysztof Kozlowski
2024-04-03 10:10           ` Krzysztof Kozlowski
2024-04-03 13:17   ` Uwe Kleine-König
2024-04-03 13:17     ` Uwe Kleine-König
2024-04-03 13:27     ` Uwe Kleine-König
2024-04-03 13:27       ` Uwe Kleine-König
2024-04-03  8:06 ` [PATCH 08/34] Input: synaptics: hide unused smbus_pnp_ids[] array Arnd Bergmann
2024-04-03  8:06 ` [PATCH 09/34] power: rt9455: hide unused rt9455_boost_voltage_values Arnd Bergmann
2024-04-03  8:06 ` [PATCH 10/34] efi: sysfb: don't build when EFI is disabled Arnd Bergmann
2024-04-03 13:03   ` Ard Biesheuvel
2024-04-03 13:15     ` Javier Martinez Canillas
2024-04-03  8:06 ` [PATCH 11/34] clk: ti: dpll: fix incorrect #ifdef checks Arnd Bergmann
2024-04-03  9:00   ` Tony Lindgren
2024-04-05 21:13   ` Stephen Boyd
2024-04-03  8:06 ` [PATCH 12/34] apm-emulation: hide an unused variable Arnd Bergmann
2024-04-03 12:23   ` Jiri Kosina
2024-04-03  8:06 ` [PATCH 13/34] sisfb: hide unused variables Arnd Bergmann
2024-04-03 12:39   ` Helge Deller
2024-04-03  8:06 ` [PATCH 14/34] dma/congiguous: avoid warning about unused size_bytes Arnd Bergmann
2024-04-03  9:42   ` Christoph Hellwig
2024-04-03  8:06 ` [PATCH 15/34] leds: apu: remove duplicate DMI lookup data Arnd Bergmann
2024-04-11 15:51   ` (subset) " Lee Jones
2024-04-03  8:06 ` [PATCH 16/34] iio: ad5755: hook up of_device_id lookup to platform driver Arnd Bergmann
2024-04-03  9:36   ` Andy Shevchenko
2024-04-03  9:55   ` Krzysztof Kozlowski
2024-04-03 10:01     ` Arnd Bergmann
2024-04-06 15:30       ` Jonathan Cameron
2024-04-06 15:31     ` Jonathan Cameron
2024-04-03  8:06 ` [PATCH 17/34] greybus: arche-ctrl: move device table to its right location Arnd Bergmann
2024-04-30 23:41   ` Alex Elder
2024-04-03  8:06 ` [PATCH 18/34] lib: checksum: hide unused expected_csum_ipv6_magic[] Arnd Bergmann
2024-04-03  8:41   ` Christophe Leroy
2024-04-03  8:58     ` Arnd Bergmann
2024-04-03  9:03       ` Christophe Leroy
2024-04-04 11:43         ` Arnd Bergmann
2024-04-03  8:06 ` [PATCH 19/34] sunrpc: suppress warnings for unused procfs functions Arnd Bergmann
2024-04-03  8:59   ` Jeff Layton
2024-04-03 13:20   ` Chuck Lever
2024-04-03  8:06 ` [PATCH 20/34] comedi: ni_atmio: avoid warning for unused device_ids[] table Arnd Bergmann
2024-04-03  8:06 ` [PATCH 21/34] iwlegacy: don't warn for unused variables with DEBUG_FS=n Arnd Bergmann
2024-04-03  9:33   ` Andy Shevchenko
2024-04-03 14:26   ` Jeff Johnson
2024-04-03  8:06 ` [PATCH 22/34] drm/komeda: don't warn for unused debugfs files Arnd Bergmann
2024-04-03  8:06 ` [PATCH 23/34] firmware: qcom_scm: mark qcom_scm_qseecom_allowlist as __maybe_unused Arnd Bergmann
2024-04-03  9:31   ` Krzysztof Kozlowski
2024-04-03  8:06 ` [PATCH 24/34] crypto: ccp - drop platform ifdef checks Arnd Bergmann
2024-04-03 15:17   ` Tom Lendacky
2024-04-03 15:50     ` Arnd Bergmann
2024-04-12  7:30   ` Herbert Xu
2024-04-03  8:06 ` [PATCH 25/34] usb: gadget: omap_udc: remove unused variable Arnd Bergmann
2024-04-05 22:51   ` Aaro Koskinen
2024-04-03  8:06 ` [PATCH 26/34] isdn: kcapi: don't build unused procfs code Arnd Bergmann
2024-04-03  8:06 ` [PATCH 27/34] cpufreq: intel_pstate: hide unused intel_pstate_cpu_oob_ids[] Arnd Bergmann
2024-04-03 14:43   ` Rafael J. Wysocki
2024-04-03  8:06 ` [PATCH 28/34] net: xgbe: remove extraneous #ifdef checks Arnd Bergmann
2024-04-03  8:06 ` [PATCH 29/34] Input: imagis - remove incorrect ifdef checks 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 [this message]
2024-04-03  8:50     ` Arnd Bergmann
2024-04-04  3:45       ` Damien Le Moal
2024-04-03  9:10   ` Andy Shevchenko
2024-04-03  8:06 ` [PATCH 31/34] spi: remove incorrect of_match_ptr annotations Arnd Bergmann
2024-04-03  8:06   ` Arnd Bergmann
2024-04-03  8:06   ` Arnd Bergmann
2024-04-03  8:06   ` Arnd Bergmann
2024-04-03  9:04   ` Andy Shevchenko
2024-04-03  9:04     ` Andy Shevchenko
2024-04-03  9:04     ` Andy Shevchenko
2024-04-03  9:04     ` Andy Shevchenko
2024-04-03  9:05   ` Krzysztof Kozlowski
2024-04-03  9:05     ` Krzysztof Kozlowski
2024-04-03  9:05     ` Krzysztof Kozlowski
2024-04-03  9:05     ` Krzysztof Kozlowski
2024-04-03  9:56   ` Mark Brown
2024-04-03  9:56     ` Mark Brown
2024-04-03  9:56     ` Mark Brown
2024-04-03  9:56     ` Mark Brown
2024-04-03 21:05     ` Uwe Kleine-König
2024-04-03 21:05       ` Uwe Kleine-König
2024-04-03 21:05       ` Uwe Kleine-König
2024-04-03 21:05       ` Uwe Kleine-König
2024-04-03 21:13       ` Andy Shevchenko
2024-04-03 21:13         ` Andy Shevchenko
2024-04-03 21:13         ` Andy Shevchenko
2024-04-03 21:13         ` Andy Shevchenko
2024-04-03 22:19         ` Arnd Bergmann
2024-04-03 22:19           ` Arnd Bergmann
2024-04-03 22:19           ` Arnd Bergmann
2024-04-03 22:19           ` Arnd Bergmann
2024-04-03  8:06 ` [PATCH 32/34] ASoC: remove incorrect of_match_ptr/ACPI_PTR annotations Arnd Bergmann
2024-04-03  8:06   ` Arnd Bergmann
2024-04-03  9:06   ` Krzysztof Kozlowski
2024-04-03  9:06     ` Krzysztof Kozlowski
2024-04-03  9:15   ` Andy Shevchenko
2024-04-03  9:15     ` Andy Shevchenko
2024-04-03  8:06 ` [PATCH 33/34] drivers: " Arnd Bergmann
2024-04-03  9:13   ` Krzysztof Kozlowski
2024-04-03  9:30   ` Andy Shevchenko
2024-04-03 12:47     ` Corey Minyard
2024-04-03 13:23       ` Andy Shevchenko
2024-04-03 12:47   ` Corey Minyard
2024-04-03 16:09   ` Jarkko Sakkinen
2024-04-09 13:48   ` Greg Kroah-Hartman
2024-04-23  7:33   ` Xu Yilun
2024-04-23  9:52   ` Peter Rosin
2024-04-03  8:06 ` [PATCH 34/34] kbuild: always enable -Wunused-const-variable Arnd Bergmann
2024-04-03  9:19   ` Andy Shevchenko
2024-04-03  9:26     ` Arnd Bergmann
2024-04-06  5:20 ` [PATCH 00/34] address all -Wunused-const warnings patchwork-bot+netdevbpf
2024-04-06  5:20   ` patchwork-bot+netdevbpf
2024-04-10  8:02 ` (subset) " Sebastian Reichel
2024-04-10  8:02   ` Sebastian Reichel
2024-04-22  8:16 ` Michael Ellerman
2024-04-22  8:16   ` Michael Ellerman
2024-04-22  8:16   ` Michael Ellerman
2024-04-22  8:16   ` Michael Ellerman

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=a1ca8aa3-d122-4ec9-b239-8180a02106e1@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.