Message ID | 20220928222210.1922758-1-dmitry.torokhov@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
Series | [1/2] wifi: wl1251: drop support for platform data | expand |
Hi Dmitry,
I love your patch! Yet something to improve:
[auto build test ERROR on wireless-next/main]
[also build test ERROR on wireless/main linus/master v6.0-rc7 next-20220928]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Dmitry-Torokhov/wifi-wl1251-drop-support-for-platform-data/20220929-062332
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
config: sh-allmodconfig
compiler: sh4-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/2d135eb2586e60f5c806ce1f17dbeed40dbc2d50
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Dmitry-Torokhov/wifi-wl1251-drop-support-for-platform-data/20220929-062332
git checkout 2d135eb2586e60f5c806ce1f17dbeed40dbc2d50
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/net/wireless/ti/wlcore/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/net/wireless/ti/wlcore/spi.c:17:10: fatal error: linux/wl12xx.h: No such file or directory
17 | #include <linux/wl12xx.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
vim +17 drivers/net/wireless/ti/wlcore/spi.c
c1f9a095600e07 drivers/net/wireless/wl12xx/wl1271_spi.c Ohad Ben-Cohen 2010-09-16 @17 #include <linux/wl12xx.h>
0969d6793f4899 drivers/net/wireless/wl12xx/spi.c Felipe Balbi 2011-10-05 18 #include <linux/platform_device.h>
04654c38614523 drivers/net/wireless/ti/wlcore/spi.c Uri Mashiach 2015-12-30 19 #include <linux/of_irq.h>
4c1ce07bcf6253 drivers/net/wireless/ti/wlcore/spi.c Uri Mashiach 2015-12-30 20 #include <linux/regulator/consumer.h>
f5fc0f86b02afe drivers/net/wireless/wl12xx/wl1271_spi.c Luciano Coelho 2009-08-06 21
Hi Dmitry,
I love your patch! Yet something to improve:
[auto build test ERROR on wireless-next/main]
[also build test ERROR on wireless/main linus/master v6.0-rc7 next-20220928]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Dmitry-Torokhov/wifi-wl1251-drop-support-for-platform-data/20220929-062332
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
config: arm-defconfig
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/2d135eb2586e60f5c806ce1f17dbeed40dbc2d50
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Dmitry-Torokhov/wifi-wl1251-drop-support-for-platform-data/20220929-062332
git checkout 2d135eb2586e60f5c806ce1f17dbeed40dbc2d50
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/arm/mach-omap2/pdata-quirks.c:13:10: fatal error: linux/wl12xx.h: No such file or directory
13 | #include <linux/wl12xx.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
vim +13 arch/arm/mach-omap2/pdata-quirks.c
f9d50fef4b6447 Grazvydas Ignotas 2015-07-21 @13 #include <linux/wl12xx.h>
f9d50fef4b6447 Grazvydas Ignotas 2015-07-21 14 #include <linux/mmc/card.h>
f9d50fef4b6447 Grazvydas Ignotas 2015-07-21 15 #include <linux/mmc/host.h>
d060b40523dcd9 Tony Lindgren 2018-02-22 16 #include <linux/power/smartreflex.h>
f9d50fef4b6447 Grazvydas Ignotas 2015-07-21 17 #include <linux/regulator/machine.h>
f9d50fef4b6447 Grazvydas Ignotas 2015-07-21 18 #include <linux/regulator/fixed.h>
6a08e1e6f7fafa Tony Lindgren 2013-09-25 19
On Wed, Sep 28, 2022 at 03:22:09PM -0700, Dmitry Torokhov wrote: > There are no users of wl1251_platform_data left in the mainline kernel, > so let's remove it. > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> > --- > .../net/wireless/ti/wilink_platform_data.c | 35 --------------- > drivers/net/wireless/ti/wl1251/sdio.c | 8 +--- > drivers/net/wireless/ti/wl1251/spi.c | 15 ++----- > include/linux/wl12xx.h | 44 ------------------- Apparently there are a few places still referencing this header. I will resubmit. Thanks.
diff --git a/drivers/net/wireless/ti/wilink_platform_data.c b/drivers/net/wireless/ti/wilink_platform_data.c deleted file mode 100644 index 1de6a62d526f..000000000000 --- a/drivers/net/wireless/ti/wilink_platform_data.c +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * This file is part of wl12xx - * - * Copyright (C) 2010-2011 Texas Instruments, Inc. - */ - -#include <linux/module.h> -#include <linux/err.h> -#include <linux/wl12xx.h> - -static struct wl1251_platform_data *wl1251_platform_data; - -int __init wl1251_set_platform_data(const struct wl1251_platform_data *data) -{ - if (wl1251_platform_data) - return -EBUSY; - if (!data) - return -EINVAL; - - wl1251_platform_data = kmemdup(data, sizeof(*data), GFP_KERNEL); - if (!wl1251_platform_data) - return -ENOMEM; - - return 0; -} - -struct wl1251_platform_data *wl1251_get_platform_data(void) -{ - if (!wl1251_platform_data) - return ERR_PTR(-ENODEV); - - return wl1251_platform_data; -} -EXPORT_SYMBOL(wl1251_get_platform_data); diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c index c9a4e9a43400..301bd0043a43 100644 --- a/drivers/net/wireless/ti/wl1251/sdio.c +++ b/drivers/net/wireless/ti/wl1251/sdio.c @@ -12,7 +12,6 @@ #include <linux/mmc/sdio_func.h> #include <linux/mmc/sdio_ids.h> #include <linux/platform_device.h> -#include <linux/wl12xx.h> #include <linux/irq.h> #include <linux/pm_runtime.h> #include <linux/of.h> @@ -197,7 +196,6 @@ static int wl1251_sdio_probe(struct sdio_func *func, struct wl1251 *wl; struct ieee80211_hw *hw; struct wl1251_sdio *wl_sdio; - const struct wl1251_platform_data *wl1251_board_data; struct device_node *np = func->dev.of_node; hw = wl1251_alloc_hw(); @@ -225,11 +223,7 @@ static int wl1251_sdio_probe(struct sdio_func *func, wl->if_priv = wl_sdio; wl->if_ops = &wl1251_sdio_ops; - wl1251_board_data = wl1251_get_platform_data(); - if (!IS_ERR(wl1251_board_data)) { - wl->irq = wl1251_board_data->irq; - wl->use_eeprom = wl1251_board_data->use_eeprom; - } else if (np) { + if (np) { wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom"); wl->irq = of_irq_get(np, 0); if (wl->irq == -EPROBE_DEFER) { diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c index 9df38726e8b0..08d9814b49c1 100644 --- a/drivers/net/wireless/ti/wl1251/spi.c +++ b/drivers/net/wireless/ti/wl1251/spi.c @@ -12,7 +12,6 @@ #include <linux/swab.h> #include <linux/crc7.h> #include <linux/spi/spi.h> -#include <linux/wl12xx.h> #include <linux/gpio.h> #include <linux/of.h> #include <linux/of_gpio.h> @@ -226,16 +225,13 @@ static const struct wl1251_if_operations wl1251_spi_ops = { static int wl1251_spi_probe(struct spi_device *spi) { - struct wl1251_platform_data *pdata = dev_get_platdata(&spi->dev); struct device_node *np = spi->dev.of_node; struct ieee80211_hw *hw; struct wl1251 *wl; int ret; - if (!np && !pdata) { - wl1251_error("no platform data"); + if (!np) return -ENODEV; - } hw = wl1251_alloc_hw(); if (IS_ERR(hw)) @@ -259,14 +255,9 @@ static int wl1251_spi_probe(struct spi_device *spi) goto out_free; } - if (np) { - wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom"); - wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0); - } else if (pdata) { - wl->power_gpio = pdata->power_gpio; - wl->use_eeprom = pdata->use_eeprom; - } + wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom"); + wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0); if (wl->power_gpio == -EPROBE_DEFER) { ret = -EPROBE_DEFER; goto out_free; diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h deleted file mode 100644 index 03d61f1d23ab..000000000000 --- a/include/linux/wl12xx.h +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * This file is part of wl12xx - * - * Copyright (C) 2009 Nokia Corporation - * - * Contact: Luciano Coelho <luciano.coelho@nokia.com> - */ - -#ifndef _LINUX_WL12XX_H -#define _LINUX_WL12XX_H - -#include <linux/err.h> - -struct wl1251_platform_data { - int power_gpio; - /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */ - int irq; - bool use_eeprom; -}; - -#ifdef CONFIG_WILINK_PLATFORM_DATA - -int wl1251_set_platform_data(const struct wl1251_platform_data *data); - -struct wl1251_platform_data *wl1251_get_platform_data(void); - -#else - -static inline -int wl1251_set_platform_data(const struct wl1251_platform_data *data) -{ - return -ENOSYS; -} - -static inline -struct wl1251_platform_data *wl1251_get_platform_data(void) -{ - return ERR_PTR(-ENODATA); -} - -#endif - -#endif
There are no users of wl1251_platform_data left in the mainline kernel, so let's remove it. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> --- .../net/wireless/ti/wilink_platform_data.c | 35 --------------- drivers/net/wireless/ti/wl1251/sdio.c | 8 +--- drivers/net/wireless/ti/wl1251/spi.c | 15 ++----- include/linux/wl12xx.h | 44 ------------------- 4 files changed, 4 insertions(+), 98 deletions(-) delete mode 100644 drivers/net/wireless/ti/wilink_platform_data.c delete mode 100644 include/linux/wl12xx.h