All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
Cc: devel@driverdev.osuosl.org, ulf.hansson@linaro.org,
	baolin.wang@linaro.org, gregkh@linuxfoundation.org,
	linus.walleij@linaro.org, linux-mmc@vger.kernel.org,
	adrian.hunter@intel.com,
	Quentin Schulz <quentin.schulz@free-electrons.com>,
	linux-kernel@vger.kernel.org, hdegoede@redhat.com, wens@csie.org,
	kbuild-all@01.org, maxime.ripard@free-electrons.com,
	shawn.lin@rock-chips.com, icenowy@aosc.xyz
Subject: Re: [PATCH 1/2] staging: net: wireless: add ESP8089 WiFi driver
Date: Sun, 23 Jul 2017 15:06:52 +0800	[thread overview]
Message-ID: <201707231453.dp4AFRPU%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170721143502.1991-2-quentin.schulz@free-electrons.com>

[-- Attachment #1: Type: text/plain, Size: 6719 bytes --]

Hi Quentin,

[auto build test WARNING on next-20170719]
[cannot apply to staging/staging-testing linus/master linux/master v4.13-rc1 v4.12 v4.12-rc7 v4.13-rc1]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Quentin-Schulz/add-ESP8089-WiFi-chip-driver/20170723-143744
config: blackfin-allyesconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=blackfin 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/staging//esp8089/esp_sip.c: In function 'sip_txq_process':
>> drivers/staging//esp8089/esp_sip.c:797:32: warning: 'offset' may be used uninitialized in this function [-Wmaybe-uninitialized]
     memcpy(sip->tx_aggr_write_ptr + offset, skb->data, skb->len);
            ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
   drivers/staging//esp8089/esp_sip.c:700:14: note: 'offset' was declared here
     u32 tx_len, offset;
                 ^~~~~~
   drivers/staging//esp8089/esp_sip.c: In function 'sip_poll_resetting_event':
>> drivers/staging//esp8089/esp_sip.c:1662:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (!ret) {
        ^
--
   drivers/staging//esp8089/esp_mac80211.c: In function 'esp_op_set_key':
>> drivers/staging//esp8089/esp_mac80211.c:529:6: warning: 'index' may be used uninitialized in this function [-Wmaybe-uninitialized]
      map[index].flag = 0;
         ^

vim +/offset +797 drivers/staging//esp8089/esp_sip.c

   691	
   692	/* setup sip header and tx info, copy pkt into aggr buf */
   693	static int sip_pack_pkt(struct esp_sip *sip, struct sk_buff *skb, int *pm_state)
   694	{
   695		struct ieee80211_tx_info *itx_info;
   696		struct sip_hdr *shdr;
   697		struct ieee80211_hdr *wh;
   698		struct esp_vif *evif;
   699		struct esp_node *node;
   700		u32 tx_len, offset;
   701		bool is_data = true;
   702		u8 sta_index;
   703		int alg;
   704	
   705		itx_info = IEEE80211_SKB_CB(skb);
   706		if (itx_info->flags == 0xffffffff) {
   707			shdr = (struct sip_hdr *)skb->data;
   708			is_data = false;
   709			tx_len = skb->len;
   710		} else {
   711			wh = (struct ieee80211_hdr *)skb->data;
   712			evif = (struct esp_vif *)itx_info->control.vif->drv_priv;
   713			/* update sip header */
   714			shdr = (struct sip_hdr *)sip->tx_aggr_write_ptr;
   715	
   716			shdr->fc[0] = 0;
   717			shdr->fc[1] = 0;
   718	
   719			if (itx_info->flags & IEEE80211_TX_CTL_AMPDU)
   720				SIP_HDR_SET_TYPE(shdr->fc[0], SIP_DATA_AMPDU);
   721			else
   722				SIP_HDR_SET_TYPE(shdr->fc[0], SIP_DATA);
   723	
   724			if (!evif->epub) {
   725				sip_tx_status_report(sip, skb, itx_info, false);
   726				atomic_dec(&sip->tx_data_pkt_queued);
   727				return -EINVAL;
   728			}
   729	
   730			/* make room for encrypted pkt */
   731			if (itx_info->control.hw_key) {
   732				alg = esp_cipher2alg(itx_info->control.hw_key->cipher);
   733				if (unlikely(alg == -1)) {
   734					sip_tx_status_report(sip, skb, itx_info, false);
   735					atomic_dec(&sip->tx_data_pkt_queued);
   736					return -1;
   737				}
   738	
   739				shdr->d_enc_flag = alg + 1;
   740				shdr->d_hw_kid = itx_info->control.hw_key->hw_key_idx |
   741					(evif->index << 7);
   742			} else {
   743				shdr->d_enc_flag = 0;
   744				shdr->d_hw_kid = evif->index << 7 | evif->index;
   745			}
   746	
   747			/* update sip tx info */
   748			node = esp_get_node_by_addr(sip->epub, wh->addr1);
   749			if (node)
   750				sta_index = node->index;
   751			else
   752				sta_index = ESP_PUB_MAX_STA + 1;
   753	
   754			SIP_HDR_SET_IFIDX(shdr->fc[0], evif->index << 3 | sta_index);
   755			shdr->d_p2p = itx_info->control.vif->p2p;
   756	
   757			if (evif->index == 1)
   758				shdr->d_p2p = 1;
   759	
   760			shdr->d_ac = skb_get_queue_mapping(skb);
   761			shdr->d_tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
   762	
   763			wh = (struct ieee80211_hdr *)skb->data;
   764	
   765			if (ieee80211_is_mgmt(wh->frame_control)) {
   766				/* addba/delba/bar may use different tid/ac */
   767				if (shdr->d_ac == WME_AC_VO)
   768					shdr->d_tid = 7;
   769	
   770				if (ieee80211_is_beacon(wh->frame_control)) {
   771					shdr->d_tid = 8;
   772					shdr->d_ac = 4;
   773				}
   774			}
   775	
   776			if (check_ac_tid(skb->data, shdr->d_ac, shdr->d_tid)) {
   777				shdr->d_ac = WME_AC_BE;
   778				shdr->d_tid = 0;
   779			}
   780	
   781			/* make sure data is start at 4 bytes aligned addr. */
   782			offset = roundup(sizeof(struct sip_hdr), 4);
   783	
   784			if (SIP_HDR_IS_AMPDU(shdr)) {
   785				memset(sip->tx_aggr_write_ptr + offset, 0,
   786				       sizeof(struct esp_tx_ampdu_entry));
   787				offset += roundup(sizeof(struct esp_tx_ampdu_entry), 4);
   788			}
   789	
   790			tx_len = offset + skb->len;
   791			shdr->len = tx_len;	/* actual len */
   792		}
   793	
   794		shdr->seq = sip->txseq++;
   795	
   796		/* copy skb to aggr buf */
 > 797		memcpy(sip->tx_aggr_write_ptr + offset, skb->data, skb->len);
   798	
   799		if (is_data) {
   800			spin_lock_bh(&sip->epub->tx_lock);
   801			sip->txdataseq = shdr->seq;
   802			spin_unlock_bh(&sip->epub->tx_lock);
   803	
   804			/* fake a tx_status and report to mac80211 stack to speed up tx, may affect
   805			 *  1) rate control (now it's all in target, so should be OK)
   806			 *  2) ps mode, mac80211 want to check ACK of ps/nulldata to see if AP is awake
   807			 *  3) BAR, mac80211 do BAR by checking ACK
   808			 *
   809			 *  XXX: need to adjust for 11n, e.g. report tx_status according to BA received in target
   810			 */
   811			sip_tx_status_report(sip, skb, itx_info, true);
   812			atomic_dec(&sip->tx_data_pkt_queued);
   813	
   814			STRACE_TX_DATA_INC();
   815		} else {
   816			/* check pm state here */
   817	
   818			/* no need to hold ctrl skb */
   819			sip_free_ctrl_skbuff(sip, skb);
   820			STRACE_TX_CMD_INC();
   821		}
   822	
   823		/* TBD: roundup here or whole aggr-buf */
   824		tx_len = roundup(tx_len, sip->tx_blksz);
   825	
   826		sip->tx_aggr_write_ptr += tx_len;
   827		sip->tx_tot_len += tx_len;
   828	
   829		return 0;
   830	}
   831	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45695 bytes --]

[-- Attachment #3: Type: text/plain, Size: 169 bytes --]

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

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Quentin Schulz <quentin.schulz@free-electrons.com>
Cc: kbuild-all@01.org, ulf.hansson@linaro.org,
	gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	hdegoede@redhat.com, baolin.wang@linaro.org,
	linus.walleij@linaro.org, linux-mmc@vger.kernel.org,
	adrian.hunter@intel.com, linux-kernel@vger.kernel.org,
	Quentin Schulz <quentin.schulz@free-electrons.com>,
	wens@csie.org, icenowy@aosc.xyz,
	maxime.ripard@free-electrons.com, shawn.lin@rock-chips.com
Subject: Re: [PATCH 1/2] staging: net: wireless: add ESP8089 WiFi driver
Date: Sun, 23 Jul 2017 15:06:52 +0800	[thread overview]
Message-ID: <201707231453.dp4AFRPU%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170721143502.1991-2-quentin.schulz@free-electrons.com>

[-- Attachment #1: Type: text/plain, Size: 6719 bytes --]

Hi Quentin,

[auto build test WARNING on next-20170719]
[cannot apply to staging/staging-testing linus/master linux/master v4.13-rc1 v4.12 v4.12-rc7 v4.13-rc1]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Quentin-Schulz/add-ESP8089-WiFi-chip-driver/20170723-143744
config: blackfin-allyesconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=blackfin 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/staging//esp8089/esp_sip.c: In function 'sip_txq_process':
>> drivers/staging//esp8089/esp_sip.c:797:32: warning: 'offset' may be used uninitialized in this function [-Wmaybe-uninitialized]
     memcpy(sip->tx_aggr_write_ptr + offset, skb->data, skb->len);
            ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
   drivers/staging//esp8089/esp_sip.c:700:14: note: 'offset' was declared here
     u32 tx_len, offset;
                 ^~~~~~
   drivers/staging//esp8089/esp_sip.c: In function 'sip_poll_resetting_event':
>> drivers/staging//esp8089/esp_sip.c:1662:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (!ret) {
        ^
--
   drivers/staging//esp8089/esp_mac80211.c: In function 'esp_op_set_key':
>> drivers/staging//esp8089/esp_mac80211.c:529:6: warning: 'index' may be used uninitialized in this function [-Wmaybe-uninitialized]
      map[index].flag = 0;
         ^

vim +/offset +797 drivers/staging//esp8089/esp_sip.c

   691	
   692	/* setup sip header and tx info, copy pkt into aggr buf */
   693	static int sip_pack_pkt(struct esp_sip *sip, struct sk_buff *skb, int *pm_state)
   694	{
   695		struct ieee80211_tx_info *itx_info;
   696		struct sip_hdr *shdr;
   697		struct ieee80211_hdr *wh;
   698		struct esp_vif *evif;
   699		struct esp_node *node;
   700		u32 tx_len, offset;
   701		bool is_data = true;
   702		u8 sta_index;
   703		int alg;
   704	
   705		itx_info = IEEE80211_SKB_CB(skb);
   706		if (itx_info->flags == 0xffffffff) {
   707			shdr = (struct sip_hdr *)skb->data;
   708			is_data = false;
   709			tx_len = skb->len;
   710		} else {
   711			wh = (struct ieee80211_hdr *)skb->data;
   712			evif = (struct esp_vif *)itx_info->control.vif->drv_priv;
   713			/* update sip header */
   714			shdr = (struct sip_hdr *)sip->tx_aggr_write_ptr;
   715	
   716			shdr->fc[0] = 0;
   717			shdr->fc[1] = 0;
   718	
   719			if (itx_info->flags & IEEE80211_TX_CTL_AMPDU)
   720				SIP_HDR_SET_TYPE(shdr->fc[0], SIP_DATA_AMPDU);
   721			else
   722				SIP_HDR_SET_TYPE(shdr->fc[0], SIP_DATA);
   723	
   724			if (!evif->epub) {
   725				sip_tx_status_report(sip, skb, itx_info, false);
   726				atomic_dec(&sip->tx_data_pkt_queued);
   727				return -EINVAL;
   728			}
   729	
   730			/* make room for encrypted pkt */
   731			if (itx_info->control.hw_key) {
   732				alg = esp_cipher2alg(itx_info->control.hw_key->cipher);
   733				if (unlikely(alg == -1)) {
   734					sip_tx_status_report(sip, skb, itx_info, false);
   735					atomic_dec(&sip->tx_data_pkt_queued);
   736					return -1;
   737				}
   738	
   739				shdr->d_enc_flag = alg + 1;
   740				shdr->d_hw_kid = itx_info->control.hw_key->hw_key_idx |
   741					(evif->index << 7);
   742			} else {
   743				shdr->d_enc_flag = 0;
   744				shdr->d_hw_kid = evif->index << 7 | evif->index;
   745			}
   746	
   747			/* update sip tx info */
   748			node = esp_get_node_by_addr(sip->epub, wh->addr1);
   749			if (node)
   750				sta_index = node->index;
   751			else
   752				sta_index = ESP_PUB_MAX_STA + 1;
   753	
   754			SIP_HDR_SET_IFIDX(shdr->fc[0], evif->index << 3 | sta_index);
   755			shdr->d_p2p = itx_info->control.vif->p2p;
   756	
   757			if (evif->index == 1)
   758				shdr->d_p2p = 1;
   759	
   760			shdr->d_ac = skb_get_queue_mapping(skb);
   761			shdr->d_tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
   762	
   763			wh = (struct ieee80211_hdr *)skb->data;
   764	
   765			if (ieee80211_is_mgmt(wh->frame_control)) {
   766				/* addba/delba/bar may use different tid/ac */
   767				if (shdr->d_ac == WME_AC_VO)
   768					shdr->d_tid = 7;
   769	
   770				if (ieee80211_is_beacon(wh->frame_control)) {
   771					shdr->d_tid = 8;
   772					shdr->d_ac = 4;
   773				}
   774			}
   775	
   776			if (check_ac_tid(skb->data, shdr->d_ac, shdr->d_tid)) {
   777				shdr->d_ac = WME_AC_BE;
   778				shdr->d_tid = 0;
   779			}
   780	
   781			/* make sure data is start at 4 bytes aligned addr. */
   782			offset = roundup(sizeof(struct sip_hdr), 4);
   783	
   784			if (SIP_HDR_IS_AMPDU(shdr)) {
   785				memset(sip->tx_aggr_write_ptr + offset, 0,
   786				       sizeof(struct esp_tx_ampdu_entry));
   787				offset += roundup(sizeof(struct esp_tx_ampdu_entry), 4);
   788			}
   789	
   790			tx_len = offset + skb->len;
   791			shdr->len = tx_len;	/* actual len */
   792		}
   793	
   794		shdr->seq = sip->txseq++;
   795	
   796		/* copy skb to aggr buf */
 > 797		memcpy(sip->tx_aggr_write_ptr + offset, skb->data, skb->len);
   798	
   799		if (is_data) {
   800			spin_lock_bh(&sip->epub->tx_lock);
   801			sip->txdataseq = shdr->seq;
   802			spin_unlock_bh(&sip->epub->tx_lock);
   803	
   804			/* fake a tx_status and report to mac80211 stack to speed up tx, may affect
   805			 *  1) rate control (now it's all in target, so should be OK)
   806			 *  2) ps mode, mac80211 want to check ACK of ps/nulldata to see if AP is awake
   807			 *  3) BAR, mac80211 do BAR by checking ACK
   808			 *
   809			 *  XXX: need to adjust for 11n, e.g. report tx_status according to BA received in target
   810			 */
   811			sip_tx_status_report(sip, skb, itx_info, true);
   812			atomic_dec(&sip->tx_data_pkt_queued);
   813	
   814			STRACE_TX_DATA_INC();
   815		} else {
   816			/* check pm state here */
   817	
   818			/* no need to hold ctrl skb */
   819			sip_free_ctrl_skbuff(sip, skb);
   820			STRACE_TX_CMD_INC();
   821		}
   822	
   823		/* TBD: roundup here or whole aggr-buf */
   824		tx_len = roundup(tx_len, sip->tx_blksz);
   825	
   826		sip->tx_aggr_write_ptr += tx_len;
   827		sip->tx_tot_len += tx_len;
   828	
   829		return 0;
   830	}
   831	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45695 bytes --]

  parent reply	other threads:[~2017-07-23  7:06 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21 14:35 [PATCH 0/2] add ESP8089 WiFi chip driver Quentin Schulz
2017-07-21 14:35 ` Quentin Schulz
2017-07-21 14:35 ` [PATCH 1/2] staging: net: wireless: add ESP8089 WiFi driver Quentin Schulz
2017-07-21 14:35   ` Quentin Schulz
2017-07-21 15:01   ` Greg KH
2017-07-21 15:01     ` Greg KH
2017-07-21 16:47     ` Quentin Schulz
2017-07-21 16:47       ` Quentin Schulz
2017-07-21 16:52       ` Marcel Holtmann
2017-07-21 16:52         ` Marcel Holtmann
2017-07-21 17:05         ` Quentin Schulz
2017-07-21 17:05           ` Quentin Schulz
2017-07-25  8:31           ` Kalle Valo
2017-07-25  8:31             ` Kalle Valo
2017-07-21 15:01   ` Marcel Holtmann
2017-07-23  7:06   ` kbuild test robot [this message]
2017-07-23  7:06     ` kbuild test robot
2017-07-23  8:25   ` kbuild test robot
2017-07-23  8:25     ` kbuild test robot
2017-07-23  8:25   ` [PATCH] staging: net: wireless: fix badzero.cocci warnings kbuild test robot
2017-07-23  8:25     ` kbuild test robot
2017-07-25 10:31   ` [PATCH 1/2] staging: net: wireless: add ESP8089 WiFi driver Dan Carpenter
2017-07-25 10:31     ` Dan Carpenter
2017-07-21 14:35 ` [PATCH 2/2] mmc: Add mmc_force_detect_change_begin / _end functions Quentin Schulz
2017-07-21 14:35   ` Quentin Schulz
2017-07-22 14:07   ` Shawn Lin
2017-08-30 12:44   ` Hans de Goede
2017-08-30 12:44     ` Hans de Goede
2017-08-30 13:43     ` Ulf Hansson
2018-02-08 14:59       ` Quentin Schulz
2018-02-08 21:31         ` Ulf Hansson
2018-02-09  8:05           ` Quentin Schulz
2018-02-09  8:05             ` Quentin Schulz
2018-02-09 14:01             ` Ulf Hansson
2018-03-23  7:25               ` Quentin Schulz
2018-03-23  7:25                 ` Quentin Schulz
2018-09-26 14:44               ` Frieder Schrempf
2018-09-26 20:19                 ` Hans de Goede
2018-09-27  8:14                   ` Maxime Ripard
2018-10-08  9:53                     ` Frieder Schrempf
2018-10-08  9:53                       ` Frieder Schrempf
2018-10-09  7:52                       ` Quentin Schulz
2018-10-09 14:03                         ` Frieder Schrempf

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=201707231453.dp4AFRPU%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=adrian.hunter@intel.com \
    --cc=baolin.wang@linaro.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=icenowy@aosc.xyz \
    --cc=kbuild-all@01.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=quentin.schulz@free-electrons.com \
    --cc=shawn.lin@rock-chips.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wens@csie.org \
    /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.