linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: glen lee <glen.lee@atmel.com>
Cc: devel@driverdev.osuosl.org, austin.shin@atmel.com,
	linux-wireless@vger.kernel.org, Nicolas.FERRE@atmel.com,
	adel.noureldin@atmel.com, tony.cho@atmel.com, leo.kim@atmel.com,
	adham.abozaeid@atmel.com
Subject: Re: [PATCH V2 04/17] staging: wilc1000: wilc_wlan_cfg_set: add argument struct net_device
Date: Wed, 4 Nov 2015 18:09:31 -0800	[thread overview]
Message-ID: <20151105020931.GA29296@kroah.com> (raw)
In-Reply-To: <563AB36F.3070900@atmel.com>

On Thu, Nov 05, 2015 at 10:39:59AM +0900, glen lee wrote:
> >>+int wilc_wlan_cfg_set(struct net_device *dev, int start, u32 wid, u8 *buffer,
> >>+		      u32 buffer_size, int commit, u32 drvHandler)
> >>  {
> >>  	wilc_wlan_dev_t *p = &g_wlan;
> >>  	u32 offset;
> >>  	int ret_size;
> >>+	perInterface_wlan_t *nic = netdev_priv(dev);
> >>+	struct wilc *wilc;
> >>+	wilc = nic->wilc;
> >Again here, pass in a struct wilc *.
> 
> Thank you for your advise,
> I can use local structure wilc as you said but there are print line inside the function.
> The custom print lines will be changed with netdev_xxx format later, so I need to pass dev if necessary.
> I used wilc if net_device is unnecessary or unavailable.
> For this reason, Is this OK to use net_device if it is necessary?

You have a pointer to net_device in struct wilc, right?  Use that
pointer when you need it, wilc is your "primary" thing, not struct
net_device, to pass around.  You should never have to cast back and
forth when calling internal functions like this.

thanks,

greg k-h

  reply	other threads:[~2015-11-05  2:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30  9:47 [PATCH V2 01/17] staging: wilc1000: define wiphy private data priv in struct host_if_drv Glen Lee
2015-10-30  9:47 ` [PATCH V2 02/17] staging: wilc1000: send_config_pkt: add argument struct net_device Glen Lee
2015-11-04 20:44   ` Greg KH
2015-10-30  9:47 ` [PATCH V2 03/17] staging: wilc1000: wilc_wlan_cfg_get: " Glen Lee
2015-11-04 20:45   ` Greg KH
2015-10-30  9:47 ` [PATCH V2 04/17] staging: wilc1000: wilc_wlan_cfg_set: " Glen Lee
2015-11-04 20:46   ` Greg KH
2015-11-05  1:39     ` glen lee
2015-11-05  2:09       ` Greg KH [this message]
2015-10-30  9:47 ` [PATCH V2 05/17] staging: wilc1000: wilc_wlan_cfg_commit: " Glen Lee
2015-10-30  9:47 ` [PATCH V2 06/17] staging: wilc1000: wilc_wlan_txq_add_cfg_pkt: add argument net_device Glen Lee
2015-10-30  9:47 ` [PATCH V2 07/17] staging: wilc1000: wilc_wlan_txq_add_to_head: add new " Glen Lee
2015-10-30  9:47 ` [PATCH V2 08/17] staging: wilc1000: remove unused function remove_TCP_related Glen Lee
2015-10-30  9:47 ` [PATCH V2 09/17] staging: wilc1000: wilc_wlan_stop: add argument struct net_device Glen Lee
2015-10-30  9:47 ` [PATCH V2 10/17] staging: wilc1000: remove unused function wilc_wlan_global_reset Glen Lee
2015-10-30  9:47 ` [PATCH V2 11/17] staging: wilc1000: wilc_wlan_firmware_download: add argument net_device Glen Lee
2015-10-30  9:47 ` [PATCH V2 12/17] staging: wilc1000: chip_sleep_manually: add argument struct net_device Glen Lee
2015-10-30  9:47 ` [PATCH V2 13/17] staging: wilc1000: wilc_wlan_start: " Glen Lee
2015-10-30  9:47 ` [PATCH V2 14/17] staging: wilc1000: acquire_bus: add new argument struct wilc Glen Lee
2015-10-30  9:47 ` [PATCH V2 15/17] staging: wilc1000: release_bus: add " Glen Lee
2015-10-30  9:47 ` [PATCH V2 16/17] staging: wilc1000: linux_wlan_get_num_conn_ifcs: add argument net_device Glen Lee
2015-10-30  9:47 ` [PATCH V2 17/17] staging: wilc1000: wilc_netdev_init: use wilc instead of g_linux_wlan Glen Lee

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=20151105020931.GA29296@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Nicolas.FERRE@atmel.com \
    --cc=adel.noureldin@atmel.com \
    --cc=adham.abozaeid@atmel.com \
    --cc=austin.shin@atmel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=glen.lee@atmel.com \
    --cc=leo.kim@atmel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=tony.cho@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).