linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Dean Lee <dean.lee@atmel.com>,
	devel@driverdev.osuosl.org, rachel.kim@atmel.com,
	chris.park@atmel.com, linux-wireless@vger.kernel.org,
	johnny.kim@atmel.com
Subject: Re: [PATCH 1/2] staging: wilc1000: modify type casting warning
Date: Mon, 22 Jun 2015 12:29:37 +0300	[thread overview]
Message-ID: <20150622092937.GX28762@mwanda> (raw)
In-Reply-To: <20150616130643.GB11143@kroah.com>

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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in

      reply	other threads:[~2015-06-22  9:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16  7:11 [PATCH 1/2] staging: wilc1000: modify type casting warning Dean Lee
2015-06-16  7:11 ` [PATCH 2/2] staging: wilc1000: modify uninitialized warning Dean Lee
2015-06-17  2:21   ` Greg KH
2015-06-16 13:06 ` [PATCH 1/2] staging: wilc1000: modify type casting warning Greg KH
2015-06-22  9:29   ` Dan Carpenter [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=20150622092937.GX28762@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=chris.park@atmel.com \
    --cc=dean.lee@atmel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johnny.kim@atmel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rachel.kim@atmel.com \
    /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;
as well as URLs for NNTP newsgroup(s).