All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jaehee Park <jhpark1013@gmail.com>
Cc: "Jérôme Pouiller" <jerome.pouiller@silabs.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	outreachy@lists.linux.dev, "Stefano Brivio" <sbrivio@redhat.com>
Subject: Re: [PATCH V3] wfx: use container_of() to get vif
Date: Tue, 12 Apr 2022 06:59:42 +0200	[thread overview]
Message-ID: <YlUHPjw2mbhnuZCM@kroah.com> (raw)
In-Reply-To: <20220412041218.GA2859599@jaehee-ThinkPad-X1-Extreme>

On Tue, Apr 12, 2022 at 12:12:18AM -0400, Jaehee Park wrote:
> Currently, upon virtual interface creation, wfx_add_interface() stores
> a reference to the corresponding struct ieee80211_vif in private data,
> for later usage. This is not needed when using the container_of
> construct. This construct already has all the info it needs to retrieve
> the reference to the corresponding struct from the offset that is
> already available, inherent in container_of(), between its type and
> member inputs (struct ieee80211_vif and drv_priv, respectively).
> Remove vif (which was previously storing the reference to the struct
> ieee80211_vif) from the struct wfx_vif, define a macro
> wvif_to_vif(wvif) for container_of(), and replace all wvif->vif with
> the newly defined container_of construct.
> 
> Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
> ---
> 
> Changes in v3:
> - Made edits to the commit message.
> - Shortened the macro name from wvif_to_vif to to_vif.
> - For functions that had more than one instance of vif, defined one 
> reference vif at the beginning of the function and used that instead.
> - Broke the if-statements that ran long into two lines.
> (There are 3 lines that exceed 80 by less than 4 characters. Two of 
> those lines of code could be shorted but it involved defining two more 
> variables, and could potentially make the code less readable.)
> 
> Note: I will mail this patch to the wireless-next tree after testing.
> 
> 
>  drivers/staging/wfx/wfx.h     |  2 +-

This file is not in linux-next anymore.


  reply	other threads:[~2022-04-12  4:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12  4:12 [PATCH V3] wfx: use container_of() to get vif Jaehee Park
2022-04-12  4:59 ` Greg Kroah-Hartman [this message]
2022-04-12  7:34 ` Dan Carpenter
2022-04-13  7:26 ` Jérôme Pouiller
2022-04-18  4:56   ` Jaehee Park

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=YlUHPjw2mbhnuZCM@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jerome.pouiller@silabs.com \
    --cc=jhpark1013@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy@lists.linux.dev \
    --cc=sbrivio@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.