mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Suniel Mahesh <sunil.m@techveda.org>
Cc: kbuild-all@01.org, gregkh@linuxfoundation.org,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	suniel.spartan@gmail.com
Subject: Re: [PATCH] staging: rtl8192e: fix coding style issue, improve error handling
Date: Fri, 10 Mar 2017 02:50:11 +0800	[thread overview]
Message-ID: <201703100204.IKMnIfzh%fengguang.wu@intel.com> (raw)
In-Reply-To: <1488870580-10144-1-git-send-email-sunil.m@techveda.org>

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

Hi Suniel,

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.11-rc1 next-20170309]
[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/Suniel-Mahesh/staging-rtl8192e-fix-coding-style-issue-improve-error-handling/20170310-015706
config: i386-randconfig-x076-201710 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

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

   drivers/staging/rtl8192e/rtl8192e/rtl_core.c: In function 'rtl92e_set_rf_state':
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:220:13: error: 'WLAN_REASON_DISASSOC_STA_' undeclared (first use in this function)
                WLAN_REASON_DISASSOC_STA_
                ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c:220:13: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:221:9: error: expected ')' before 'HAS_LEFT'
            HAS_LEFT);
            ^~~~~~~~
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c: In function '_rtl92e_init_priv_variable':
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:970:10: warning: 'return' with a value, in function returning void
      return -ENOMEM;
             ^
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c:888:13: note: declared here
    static void _rtl92e_init_priv_variable(struct net_device *dev)
                ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c: In function '_rtl92e_if_silent_reset':
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1247:24: warning: missing terminating " character
      RT_TRACE(COMP_RESET, "%s():======>start to down the
                           ^
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1248:13: warning: missing terminating " character
        driver\n",  __func__);
                ^
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1251:5: warning: missing terminating " character
        "%s():111111111111111111111111======>start to down the
        ^
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1252:13: warning: missing terminating " character
        driver\n",  __func__);
                ^
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2751:0: error: unterminated argument list invoking macro "RT_TRACE"
    MODULE_PARM_DESC(channels, " Channel bitmask for specific locales. NYI");
    
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1247:3: error: 'RT_TRACE' undeclared (first use in this function)
      RT_TRACE(COMP_RESET, "%s():======>start to down the
      ^~~~~~~~
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1247:3: error: expected ';' at end of input
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1247:3: error: expected declaration or statement at end of input
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1247:3: error: expected declaration or statement at end of input
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1232:1: warning: label 'RESET_START' defined but not used [-Wunused-label]
    RESET_START:
    ^~~~~~~~~~~
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1226:4: error: label 'END' used but not defined
       goto END;
       ^~~~
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1217:24: warning: unused variable 'ieee' [-Wunused-variable]
     struct rtllib_device *ieee = priv->rtllib;
                           ^~~~
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1216:6: warning: unused variable 'reset_status' [-Wunused-variable]
     int reset_status = 0;
         ^~~~~~~~~~~~
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1215:5: warning: unused variable 'reset_times' [-Wunused-variable]
     u8 reset_times = 0;
        ^~~~~~~~~~~
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c: At top level:
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:71:12: warning: '_rtl92e_pci_probe' used but never defined
    static int _rtl92e_pci_probe(struct pci_dev *pdev,
               ^~~~~~~~~~~~~~~~~
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:73:13: warning: '_rtl92e_pci_disconnect' used but never defined
    static void _rtl92e_pci_disconnect(struct pci_dev *pdev);
                ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:74:20: warning: '_rtl92e_irq' used but never defined
    static irqreturn_t _rtl92e_irq(int irq, void *netdev);
                       ^~~~~~~~~~~
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:86:13: warning: '_rtl92e_watchdog_wq_cb' used but never defined
    static void _rtl92e_watchdog_wq_cb(void *data);
                ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:87:13: warning: '_rtl92e_watchdog_timer_cb' used but never defined
    static void _rtl92e_watchdog_timer_cb(unsigned long data);
                ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:88:13: warning: '_rtl92e_hard_data_xmit' used but never defined
    static void _rtl92e_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
                ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:90:12: warning: '_rtl92e_hard_start_xmit' used but never defined
    static int _rtl92e_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);
               ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c:91:13: warning: '_rtl92e_tx_cmd' declared 'static' but never defined [-Wunused-function]
    static void _rtl92e_tx_cmd(struct net_device *dev, struct sk_buff *skb);
                ^~~~~~~~~~~~~~
   drivers/staging/rtl8192e/rtl8192e/rtl_core.c:92:14: warning: '_rtl92e_tx' declared 'static' but never defined [-Wunused-function]
    static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb);
                 ^~~~~~~~~~
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:93:14: warning: '_rtl92e_pci_initdescring' used but never defined
    static short _rtl92e_pci_initdescring(struct net_device *dev);
                 ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:94:13: warning: '_rtl92e_irq_tx_tasklet' used but never defined
    static void _rtl92e_irq_tx_tasklet(struct r8192_priv *priv);
                ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:95:13: warning: '_rtl92e_irq_rx_tasklet' used but never defined
    static void _rtl92e_irq_rx_tasklet(struct r8192_priv *priv);
                ^~~~~~~~~~~~~~~~~~~~~~

vim +/WLAN_REASON_DISASSOC_STA_ +220 drivers/staging/rtl8192e/rtl8192e/rtl_core.c

    65		{RTL_PCI_DEVICE(0x07aa, 0x0047, rtl819xp_ops)},
    66		{}
    67	};
    68	
    69	MODULE_DEVICE_TABLE(pci, rtl8192_pci_id_tbl);
    70	
  > 71	static int _rtl92e_pci_probe(struct pci_dev *pdev,
    72				     const struct pci_device_id *id);
  > 73	static void _rtl92e_pci_disconnect(struct pci_dev *pdev);
  > 74	static irqreturn_t _rtl92e_irq(int irq, void *netdev);
    75	
    76	static struct pci_driver rtl8192_pci_driver = {
    77		.name = DRV_NAME,	/* Driver name   */
    78		.id_table = rtl8192_pci_id_tbl,	/* PCI_ID table  */
    79		.probe	= _rtl92e_pci_probe,	/* probe fn      */
    80		.remove	 = _rtl92e_pci_disconnect,	/* remove fn */
    81		.suspend = rtl92e_suspend,	/* PM suspend fn */
    82		.resume = rtl92e_resume,                 /* PM resume fn  */
    83	};
    84	
    85	static short _rtl92e_is_tx_queue_empty(struct net_device *dev);
  > 86	static void _rtl92e_watchdog_wq_cb(void *data);
  > 87	static void _rtl92e_watchdog_timer_cb(unsigned long data);
  > 88	static void _rtl92e_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
    89					   int rate);
  > 90	static int _rtl92e_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);
  > 91	static void _rtl92e_tx_cmd(struct net_device *dev, struct sk_buff *skb);
  > 92	static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb);
  > 93	static short _rtl92e_pci_initdescring(struct net_device *dev);
  > 94	static void _rtl92e_irq_tx_tasklet(struct r8192_priv *priv);
  > 95	static void _rtl92e_irq_rx_tasklet(struct r8192_priv *priv);
  > 96	static void _rtl92e_cancel_deferred_work(struct r8192_priv *priv);
  > 97	static int _rtl92e_up(struct net_device *dev, bool is_silent_reset);
    98	static int _rtl92e_try_up(struct net_device *dev);
    99	static int _rtl92e_down(struct net_device *dev, bool shutdownrf);
 > 100	static void _rtl92e_restart(void *data);
   101	
   102	/* IO STUFF */
   103	
   104	u8 rtl92e_readb(struct net_device *dev, int x)
   105	{
   106		return 0xff & readb((u8 __iomem *)dev->mem_start + x);
   107	}
   108	
   109	u32 rtl92e_readl(struct net_device *dev, int x)
   110	{
   111		return readl((u8 __iomem *)dev->mem_start + x);
   112	}
   113	
   114	u16 rtl92e_readw(struct net_device *dev, int x)
   115	{
   116		return readw((u8 __iomem *)dev->mem_start + x);
   117	}
   118	
   119	void rtl92e_writeb(struct net_device *dev, int x, u8 y)
   120	{
   121		writeb(y, (u8 __iomem *)dev->mem_start + x);
   122	
   123		udelay(20);
   124	}
   125	
   126	void rtl92e_writel(struct net_device *dev, int x, u32 y)
   127	{
   128		writel(y, (u8 __iomem *)dev->mem_start + x);
   129	
   130		udelay(20);
   131	}
   132	
   133	void rtl92e_writew(struct net_device *dev, int x, u16 y)
   134	{
   135		writew(y, (u8 __iomem *)dev->mem_start + x);
   136	
   137		udelay(20);
   138	}
   139	
   140	/* GENERAL FUNCTION */
   141	bool rtl92e_set_rf_state(struct net_device *dev,
   142				 enum rt_rf_power_state StateToSet,
   143				 RT_RF_CHANGE_SOURCE ChangeSource)
   144	{
   145		struct r8192_priv *priv = rtllib_priv(dev);
   146		struct rtllib_device *ieee = priv->rtllib;
   147		bool			bActionAllowed = false;
   148		bool			bConnectBySSID = false;
   149		enum rt_rf_power_state rtState;
   150		u16			RFWaitCounter = 0;
   151		unsigned long flag;
   152	
   153		RT_TRACE((COMP_PS | COMP_RF),
   154			 "===>rtl92e_set_rf_state(): StateToSet(%d)\n", StateToSet);
   155	
   156		while (true) {
   157			spin_lock_irqsave(&priv->rf_ps_lock, flag);
   158			if (priv->RFChangeInProgress) {
   159				spin_unlock_irqrestore(&priv->rf_ps_lock, flag);
   160				RT_TRACE((COMP_PS | COMP_RF),
   161					 "rtl92e_set_rf_state(): RF Change in progress! Wait to set..StateToSet(%d).\n",
   162					 StateToSet);
   163	
   164				while (priv->RFChangeInProgress) {
   165					RFWaitCounter++;
   166					RT_TRACE((COMP_PS | COMP_RF),
   167						 "rtl92e_set_rf_state(): Wait 1 ms (%d times)...\n",
   168						 RFWaitCounter);
   169					mdelay(1);
   170	
   171					if (RFWaitCounter > 100) {
   172						netdev_warn(dev,
   173							    "%s(): Timeout waiting for RF change.\n",
   174							    __func__);
   175						return false;
   176					}
   177				}
   178			} else {
   179				priv->RFChangeInProgress = true;
   180				spin_unlock_irqrestore(&priv->rf_ps_lock, flag);
   181				break;
   182			}
   183		}
   184	
   185		rtState = priv->rtllib->eRFPowerState;
   186	
   187		switch (StateToSet) {
   188		case eRfOn:
   189			priv->rtllib->RfOffReason &= (~ChangeSource);
   190	
   191			if ((ChangeSource == RF_CHANGE_BY_HW) && priv->bHwRadioOff)
   192				priv->bHwRadioOff = false;
   193	
   194			if (!priv->rtllib->RfOffReason) {
   195				priv->rtllib->RfOffReason = 0;
   196				bActionAllowed = true;
   197	
   198				if (rtState == eRfOff &&
   199				    ChangeSource >= RF_CHANGE_BY_HW)
   200					bConnectBySSID = true;
   201			} else {
   202				RT_TRACE((COMP_PS | COMP_RF),
   203					 "rtl92e_set_rf_state - eRfon reject pMgntInfo->RfOffReason= 0x%x, ChangeSource=0x%X\n",
   204					  priv->rtllib->RfOffReason, ChangeSource);
   205		}
   206	
   207			break;
   208	
   209		case eRfOff:
   210	
   211			if ((priv->rtllib->iw_mode == IW_MODE_INFRA) ||
   212			    (priv->rtllib->iw_mode == IW_MODE_ADHOC)) {
   213				if ((priv->rtllib->RfOffReason > RF_CHANGE_BY_IPS) ||
   214				    (ChangeSource > RF_CHANGE_BY_IPS)) {
   215					if (ieee->state == RTLLIB_LINKED)
   216						priv->blinked_ingpio = true;
   217					else
   218						priv->blinked_ingpio = false;
   219					rtllib_MgntDisconnect(priv->rtllib,
 > 220							      WLAN_REASON_DISASSOC_STA_
 > 221									HAS_LEFT);
   222				}
   223			}
   224			if ((ChangeSource == RF_CHANGE_BY_HW) && !priv->bHwRadioOff)

---
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: 33920 bytes --]

      parent reply	other threads:[~2017-03-09 18:51 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07  7:09 Suniel Mahesh
2017-03-07 17:12 ` Dan Carpenter
2017-03-09 18:50   ` [PATCH v2 0/5] staging: rtl8192e: Fix coding style, warnings and checks sunil.m
2017-03-09 18:50     ` [PATCH v2 1/5] staging: rtl8192e: Fix coding style issues sunil.m
2017-03-11  8:11       ` kbuild test robot
2017-03-12 13:41       ` Greg KH
2017-03-15  9:51         ` [PATCH v3 0/8] staging: rtl8192e: Fix coding style, warnings and checks sunil.m
2017-03-15  9:51           ` [PATCH v3 1/8] staging: rtl8192e: Fix comments as per kernel coding style sunil.m
2017-03-15  9:51           ` [PATCH v3 2/8] staging: rtl8192e: Fix " sunil.m
2017-03-15 10:14             ` Dan Carpenter
2017-03-15 11:09               ` Suniel Mahesh
2017-03-15 11:15                 ` Dan Carpenter
2017-03-15 10:15             ` Dan Carpenter
2017-03-15  9:51           ` [PATCH v3 3/8] staging: rtl8192e: Remove unnecessary 'out of memory' message sunil.m
2017-03-15 10:16             ` Dan Carpenter
2017-03-15 10:58               ` [PATCH v4 " sunil.m
2017-03-16  2:36                 ` Greg KH
2017-03-16 22:12                   ` [PATCH v4 0/6] staging: rtl8192e: Fix coding style, warnings and checks sunil.m
2017-03-16 22:12                     ` [PATCH v4 4/6] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct sunil.m
2017-03-16 22:12                     ` [PATCH v4 6/6] staging: rtl8192e: Fix blank lines and space after a cast sunil.m
2017-03-17  6:16                     ` [PATCH v4 0/6] staging: rtl8192e: Fix coding style, warnings and checks Greg KH
2017-03-21  9:00                       ` [PATCH v5 " suniel.spartan
2017-03-21  9:01                         ` [PATCH v5 1/6] staging: rtl8192e: Fix comments as per kernel coding style suniel.spartan
2017-03-21  9:01                         ` [PATCH v5 2/6] staging: rtl8192e: Remove unnecessary 'out of memory' message suniel.spartan
2017-03-21  9:01                         ` [PATCH v5 3/6] staging: rtl8192e: Rectify pointer comparisions with NULL suniel.spartan
2017-03-21  9:01                         ` [PATCH v5 4/6] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct suniel.spartan
2017-03-21  9:01                         ` [PATCH v5 5/6] staging: rtl8192e: Fix issues reported by checkpatch.pl suniel.spartan
2017-03-21  9:01                         ` [PATCH v5 6/6] staging: rtl8192e: Fix blank lines and space after a cast suniel.spartan
2017-03-15  9:51           ` [PATCH v3 4/8] staging: rtl8192e: Rectify pointer comparisions with NULL sunil.m
2017-03-15  9:51           ` [PATCH v3 5/8] staging: rtl8192e: Fix unbalanced braces sunil.m
2017-03-15 10:24             ` Dan Carpenter
2017-03-15  9:51           ` [PATCH v3 6/8] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct sunil.m
2017-03-15  9:51           ` [PATCH v3 7/8] staging: rtl8192e: Fix issues reported by checkpatch.pl sunil.m
2017-03-15  9:51           ` [PATCH v3 8/8] staging: rtl8192e: Fix blank lines and space after a cast sunil.m
2017-03-09 18:50     ` [PATCH v2 2/5] staging: rtl8192e: Improve error handling sunil.m
2017-03-09 18:50     ` [PATCH v2 3/5] staging: rtl8192e: Rectify pointer comparisions sunil.m
2017-03-09 18:50     ` [PATCH v2 4/5] staging: rtl8192e: Fix unbalanced braces around else statement sunil.m
2017-03-09 18:50     ` [PATCH v2 5/5] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct sunil.m
2017-03-17  9:58       ` Suniel Mahesh
2017-03-09 18:50 ` kbuild test robot [this message]

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=201703100204.IKMnIfzh%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suniel.spartan@gmail.com \
    --cc=sunil.m@techveda.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®