Re: [PATCH 1/2] staging: wilc1000: modify type casting warning

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

 



On Tue, Jun 16, 2015 at 06:06:43AM -0700, Greg KH wrote:
> This shows you are doing something really wrong here, why not just fix
> the function type to be a real pointer to a real structure?

You are right, of course.

> Or even better, just remove the parameter as I don't think they are
> even used.

I don't know how far you traced the code, you may be right.  It
eventually becomes driver_handler[] in wilc_wlan_cfg_commit() and we
do this:

drivers/staging/wilc1000/wilc_wlan.c
  1883          cfg->wid_header[1] = seq_no;    /* sequence number */
  1884          cfg->wid_header[2] = (uint8_t)total_len;
  1885          cfg->wid_header[3] = (uint8_t)(total_len >> 8);
  1886          cfg->wid_header[4] = (uint8_t)driver_handler;
  1887          cfg->wid_header[5] = (uint8_t)(driver_handler >> 8);
  1888          cfg->wid_header[6] = (uint8_t)(driver_handler >> 16);
  1889          cfg->wid_header[7] = (uint8_t)(driver_handler >> 24);

We put it in the header.

  1890          p->cfg_seq_no = seq_no;
  1891  
  1892          /**
  1893           *      Add to TX queue
  1894           **/
  1895  
  1896          /*Edited by Amr - BugID_4720*/
  1897          if (!wilc_wlan_txq_add_cfg_pkt(&cfg->wid_header[0], total_len))

And I don't know what we do with it after this.

  1898                  return -1;
  1899  
  1900          return 0;
  1901  }

regards,
dan carpenter
_______________________________________________
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