Search Linux Wireless

Re: [PATCH] [PATCH] [v3] wireless: Initial driver submission for pureLiFi STA devices

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

 



Hi Srinivasan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on wireless-drivers/master net-next/master net/master linus/master v5.9 next-20201013]
[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]

url:    https://github.com/0day-ci/linux/commits/Srinivasan-Raju/wireless-Initial-driver-submission-for-pureLiFi-STA-devices/20201014-142216
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.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/0day-ci/linux/commit/2f1cd7604f364eba9428b88e2ab38c2a42272fcd
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Srinivasan-Raju/wireless-Initial-driver-submission-for-pureLiFi-STA-devices/20201014-142216
        git checkout 2f1cd7604f364eba9428b88e2ab38c2a42272fcd
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

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

All warnings (new ones prefixed by >>):

>> drivers/net/wireless/purelifi/usb.c:74:6: warning: no previous prototype for 'send_packet_from_data_queue' [-Wmissing-prototypes]
      74 | void send_packet_from_data_queue(struct purelifi_usb *usb)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/purelifi/usb.c: In function 'rx_urb_complete':
>> drivers/net/wireless/purelifi/usb.c:124:26: warning: variable 'rx' set but not used [-Wunused-but-set-variable]
     124 |  struct purelifi_usb_rx *rx;
         |                          ^~
   drivers/net/wireless/purelifi/usb.c: In function 'tx_urb_complete':
>> drivers/net/wireless/purelifi/usb.c:416:26: warning: variable 'tx' set but not used [-Wunused-but-set-variable]
     416 |  struct purelifi_usb_tx *tx;
         |                          ^~
   drivers/net/wireless/purelifi/usb.c: In function 'purelifi_store_frequency':
>> drivers/net/wireless/purelifi/usb.c:1101:9: warning: variable 'r' set but not used [-Wunused-but-set-variable]
    1101 |  int i, r, row, col, predivider, feedback_divider, output_div_0;
         |         ^
   drivers/net/wireless/purelifi/usb.c: At top level:
>> drivers/net/wireless/purelifi/usb.c:1544:9: warning: no previous prototype for 'modulation_write' [-Wmissing-prototypes]
    1544 | ssize_t modulation_write(struct file *file_p,
         |         ^~~~~~~~~~~~~~~~
--
   drivers/net/wireless/purelifi/mac.c: In function 'purelifi_restore_settings':
>> drivers/net/wireless/purelifi/mac.c:137:26: warning: variable 'multicast_hash' set but not used [-Wunused-but-set-variable]
     137 |  struct purelifi_mc_hash multicast_hash;
         |                          ^~~~~~~~~~~~~~
   drivers/net/wireless/purelifi/mac.c: In function 'purelifi_mac_tx_status':
>> drivers/net/wireless/purelifi/mac.c:190:19: warning: variable 'retry' set but not used [-Wunused-but-set-variable]
     190 |  int success = 1, retry = 1;
         |                   ^~~~~
   drivers/net/wireless/purelifi/mac.c: In function 'purelifi_op_configure_filter':
>> drivers/net/wireless/purelifi/mac.c:656:6: warning: variable 'r' set but not used [-Wunused-but-set-variable]
     656 |  int r;
         |      ^

vim +/send_packet_from_data_queue +74 drivers/net/wireless/purelifi/usb.c

    73	
  > 74	void send_packet_from_data_queue(struct purelifi_usb *usb)
    75	{
    76		struct sk_buff *skb = NULL;
    77		unsigned long flags;
    78		static u8 sidx;
    79		u8 last_served_sidx;
    80	
    81		spin_lock_irqsave(&usb->tx.lock, flags);
    82		last_served_sidx = sidx;
    83		do {
    84			sidx = (sidx + 1) % MAX_STA_NUM;
    85			if ((usb->tx.station[sidx].flag &
    86						STATION_CONNECTED_FLAG)) {
    87				if (!(usb->tx.station[sidx].flag &
    88							STATION_FIFO_FULL_FLAG)) {
    89					skb = skb_peek(&usb->tx.station
    90							[sidx].data_list);
    91				}
    92			}
    93		} while ((sidx != last_served_sidx) && (!skb));
    94	
    95		if (skb) {
    96			skb = skb_dequeue(&usb->tx.station[sidx].data_list);
    97			usb_write_req_async(usb, skb->data, skb->len, USB_REQ_DATA_TX,
    98					    tx_urb_complete, skb);
    99			if (skb_queue_len(&usb->tx.station[sidx].data_list)
   100					<= 60) {
   101				block_queue(usb, usb->tx.station[sidx].mac,
   102					    false);
   103			}
   104		}
   105		spin_unlock_irqrestore(&usb->tx.lock, flags);
   106	}
   107	
   108	static void handle_rx_packet(struct purelifi_usb *usb, const u8 *buffer,
   109				     unsigned int length)
   110	{
   111		purelifi_mac_rx(purelifi_usb_to_hw(usb), buffer, length);
   112	}
   113	
   114	#define STATION_FIFO_ALMOST_FULL_MESSAGE     0
   115	#define STATION_FIFO_ALMOST_FULL_NOT_MESSAGE 1
   116	#define STATION_CONNECT_MESSAGE              2
   117	#define STATION_DISCONNECT_MESSAGE           3
   118	
   119	int rx_usb_enabled;
   120	static void rx_urb_complete(struct urb *urb)
   121	{
   122		int r;
   123		struct purelifi_usb *usb;
 > 124		struct purelifi_usb_rx *rx;
   125		struct purelifi_usb_tx *tx;
   126		const u8 *buffer;
   127		static u8 fpga_link_connection_f;
   128		unsigned int length;
   129		u16 status;
   130		u8 sidx;
   131	
   132		if (!urb) {
   133			dev_err(purelifi_usb_dev(usb), "urb is NULL.\n");
   134			return;
   135		} else if (!urb->context) {
   136			dev_err(purelifi_usb_dev(usb), "urb ctx is NULL.\n");
   137			return;
   138		}
   139		usb = urb->context;
   140	
   141		if (usb->initialized != 1)
   142			return;
   143	
   144		switch (urb->status) {
   145		case 0:
   146			break;
   147		case -ESHUTDOWN:
   148		case -EINVAL:
   149		case -ENODEV:
   150		case -ENOENT:
   151		case -ECONNRESET:
   152		case -EPIPE:
   153			dev_dbg(urb_dev(urb), "urb %p error %d\n", urb, urb->status);
   154			return;
   155		default:
   156			dev_dbg(urb_dev(urb), "urb %p error %d\n", urb, urb->status);
   157			goto resubmit;
   158		}
   159	
   160		buffer = urb->transfer_buffer;
   161		length = (*(u32 *)(buffer + sizeof(struct rx_status))) + sizeof(u32);
   162	
   163		rx = &usb->rx;
   164		tx = &usb->tx;
   165	
   166		if (urb->actual_length != 8) {
   167			if (usb->initialized && fpga_link_connection_f)
   168				handle_rx_packet(usb, buffer, length);
   169			goto resubmit;
   170		}
   171	
   172		status = buffer[7];
   173	
   174		dev_info(&usb->intf->dev, "Recv status=%u\n", status);
   175		dev_info(&usb->intf->dev, "Tx packet MAC=%x:%x:%x:%x:%x:%x\n",
   176			 buffer[0], buffer[1], buffer[2], buffer[3],
   177			 buffer[4], buffer[5]);
   178	
   179		switch (status) {
   180		case STATION_FIFO_ALMOST_FULL_NOT_MESSAGE:
   181			dev_info(&usb->intf->dev,
   182				 "FIFO full not packet receipt.\n");
   183			tx->mac_fifo_full = 1;
   184			for (sidx = 0; sidx < MAX_STA_NUM; sidx++) {
   185				usb->tx.station[sidx].flag |=
   186					STATION_FIFO_FULL_FLAG;
   187			}
   188			break;
   189		case STATION_FIFO_ALMOST_FULL_MESSAGE:
   190			dev_info(&usb->intf->dev, "FIFO full packet receipt.\n");
   191	
   192			for (sidx = 0; sidx < MAX_STA_NUM; sidx++)
   193				usb->tx.station[sidx].flag &= 0xFD;
   194	
   195			send_packet_from_data_queue(usb);
   196			break;
   197		case STATION_CONNECT_MESSAGE:
   198			fpga_link_connection_f = 1;
   199			dev_info(&usb->intf->dev, "ST_CONNECT_MSG packet receipt.\n");
   200			break;
   201		case STATION_DISCONNECT_MESSAGE:
   202			fpga_link_connection_f = 0;
   203			dev_info(&usb->intf->dev, "ST_DISCONN_MSG packet receipt.\n");
   204			break;
   205		default:
   206			dev_info(&usb->intf->dev, "Unknown packet receipt.\n");
   207			break;
   208		}
   209	
   210	resubmit:
   211		r = usb_submit_urb(urb, GFP_ATOMIC);
   212		if (r)
   213			dev_dbg(urb_dev(urb), "urb %p resubmit error %d\n", urb, r);
   214	}
   215	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux