Re: [PATCH] staging: wfx: Get descriptors for GPIOs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Linus,

I love your patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Linus-Walleij/staging-wfx-Get-descriptors-for-GPIOs/20200627-200038
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git a8e773132f131511357d9529c289ed52330e232a
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project ee3620643dfc88a178fa4ca116cf83014e4ee547)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All error/warnings (new ones prefixed by >>):

>> drivers/staging/wfx/main.c:308:10: warning: incompatible integer to pointer conversion returning 'long' from a function with result type 'struct wfx_dev *' [-Wint-conversion]
                   return PTR_ERR(wdev->pdata.gpio_wakeup);
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/wfx/main.c:309:38: error: no member named 'gpio_wakep' in 'struct wfx_platform_data'; did you mean 'gpio_wakeup'?
           gpiod_set_consumer_name(wdev->pdata.gpio_wakep, "wfx wakeup");
                                               ^~~~~~~~~~
                                               gpio_wakeup
   drivers/staging/wfx/main.h:25:20: note: 'gpio_wakeup' declared here
           struct gpio_desc *gpio_wakeup;
                             ^
   1 warning and 1 error generated.
--
>> drivers/staging/wfx/bus_spi.c:210:9: error: expected ')'
                                                     GPIOD_OUT_HIGH);
                                                     ^
   drivers/staging/wfx/bus_spi.c:209:43: note: to match this '('
           bus->gpio_reset = devm_gpiod_get_optional(&func->dev, "reset"
                                                    ^
   1 error generated.

vim +309 drivers/staging/wfx/main.c

   245	
   246	struct wfx_dev *wfx_init_common(struct device *dev,
   247					const struct wfx_platform_data *pdata,
   248					const struct hwbus_ops *hwbus_ops,
   249					void *hwbus_priv)
   250	{
   251		struct ieee80211_hw *hw;
   252		struct wfx_dev *wdev;
   253	
   254		hw = ieee80211_alloc_hw(sizeof(struct wfx_dev), &wfx_ops);
   255		if (!hw)
   256			return NULL;
   257	
   258		SET_IEEE80211_DEV(hw, dev);
   259	
   260		ieee80211_hw_set(hw, TX_AMPDU_SETUP_IN_HW);
   261		ieee80211_hw_set(hw, AMPDU_AGGREGATION);
   262		ieee80211_hw_set(hw, CONNECTION_MONITOR);
   263		ieee80211_hw_set(hw, REPORTS_TX_ACK_STATUS);
   264		ieee80211_hw_set(hw, SUPPORTS_DYNAMIC_PS);
   265		ieee80211_hw_set(hw, SIGNAL_DBM);
   266		ieee80211_hw_set(hw, SUPPORTS_PS);
   267		ieee80211_hw_set(hw, MFP_CAPABLE);
   268	
   269		hw->vif_data_size = sizeof(struct wfx_vif);
   270		hw->sta_data_size = sizeof(struct wfx_sta_priv);
   271		hw->queues = 4;
   272		hw->max_rates = 8;
   273		hw->max_rate_tries = 8;
   274		hw->extra_tx_headroom = sizeof(struct hif_sl_msg_hdr) +
   275					sizeof(struct hif_msg)
   276					+ sizeof(struct hif_req_tx)
   277					+ 4 /* alignment */ + 8 /* TKIP IV */;
   278		hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
   279					     BIT(NL80211_IFTYPE_ADHOC) |
   280					     BIT(NL80211_IFTYPE_AP);
   281		hw->wiphy->probe_resp_offload = NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS |
   282						NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 |
   283						NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P |
   284						NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U;
   285		hw->wiphy->flags |= WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD;
   286		hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD;
   287		hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
   288		hw->wiphy->max_ap_assoc_sta = HIF_LINK_ID_MAX;
   289		hw->wiphy->max_scan_ssids = 2;
   290		hw->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN;
   291		hw->wiphy->n_iface_combinations = ARRAY_SIZE(wfx_iface_combinations);
   292		hw->wiphy->iface_combinations = wfx_iface_combinations;
   293		hw->wiphy->bands[NL80211_BAND_2GHZ] = devm_kmalloc(dev, sizeof(wfx_band_2ghz), GFP_KERNEL);
   294		// FIXME: also copy wfx_rates and wfx_2ghz_chantable
   295		memcpy(hw->wiphy->bands[NL80211_BAND_2GHZ], &wfx_band_2ghz,
   296		       sizeof(wfx_band_2ghz));
   297	
   298		wdev = hw->priv;
   299		wdev->hw = hw;
   300		wdev->dev = dev;
   301		wdev->hwbus_ops = hwbus_ops;
   302		wdev->hwbus_priv = hwbus_priv;
   303		memcpy(&wdev->pdata, pdata, sizeof(*pdata));
   304		of_property_read_string(dev->of_node, "config-file",
   305					&wdev->pdata.file_pds);
   306		wdev->pdata.gpio_wakeup = devm_gpiod_get(dev, "wakeup", GPIOD_IN);
   307		if (IS_ERR(wdev->pdata.gpio_wakeup))
 > 308			return PTR_ERR(wdev->pdata.gpio_wakeup);
 > 309		gpiod_set_consumer_name(wdev->pdata.gpio_wakep, "wfx wakeup");
   310		wfx_sl_fill_pdata(dev, &wdev->pdata);
   311	
   312		mutex_init(&wdev->conf_mutex);
   313		mutex_init(&wdev->rx_stats_lock);
   314		mutex_init(&wdev->tx_power_loop_info_lock);
   315		init_completion(&wdev->firmware_ready);
   316		INIT_DELAYED_WORK(&wdev->cooling_timeout_work,
   317				  wfx_cooling_timeout_work);
   318		wfx_init_hif_cmd(&wdev->hif_cmd);
   319		wfx_tx_queues_init(wdev);
   320	
   321		if (devm_add_action_or_reset(dev, wfx_free_common, wdev))
   322			return NULL;
   323	
   324		return wdev;
   325	}
   326	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux