From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>, davem@davemloft.net
Cc: netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
jogreene@redhat.com
Subject: Re: [net-next 13/13] i40e/i40evf: Convert macro to static inline
Date: Tue, 09 Dec 2014 22:06:19 +0300 [thread overview]
Message-ID: <5487482B.1030609@cogentembedded.com> (raw)
In-Reply-To: <1418124170-7495-14-git-send-email-jeffrey.t.kirsher@intel.com>
Hello.
On 12/09/2014 02:22 PM, Jeff Kirsher wrote:
> Inline functions are preferred over macros when they can be used
> interchangeably.
> Reported-by: Joe Perches <joe@perches.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_type.h | 5 ++++-
> drivers/net/ethernet/intel/i40evf/i40e_type.h | 5 ++++-
> 2 files changed, 8 insertions(+), 2 deletions(-)
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
> index 844421f..618cce2 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_type.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
> @@ -481,7 +481,10 @@ struct i40e_hw {
> u32 debug_mask;
> };
>
> -#define i40e_is_vf(_hw) ((_hw)->mac.type == I40E_MAC_VF)
> +static inline bool i40e_is_vf(struct i40e_hw *hw)
> +{
> + return (hw->mac.type == I40E_MAC_VF);
Parens not needed.
[...]
> diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
> index d8175cd..6b6fcf6 100644
> --- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
> +++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
> @@ -475,7 +475,10 @@ struct i40e_hw {
> u32 debug_mask;
> };
>
> -#define i40e_is_vf(_hw) ((_hw)->mac.type == I40E_MAC_VF)
> +static inline bool i40e_is_vf(struct i40e_hw *hw)
> +{
> + return (hw->mac.type == I40E_MAC_VF);
Likewise.
[...]
WBR, Sergei
next prev parent reply other threads:[~2014-12-09 19:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-09 11:22 [net-next 00/13][pull request] Intel Wired LAN Driver Updates 2014-12-09 Jeff Kirsher
2014-12-09 11:22 ` [net-next 01/13] i40e: clear NVM update state on ethtool test Jeff Kirsher
2014-12-09 11:22 ` [net-next 02/13] i40e: better error messages for NVM update issues Jeff Kirsher
2014-12-09 11:22 ` [net-next 03/13] i40e: let firmware catch the NVM busy error Jeff Kirsher
2014-12-09 11:22 ` [net-next 04/13] i40e: rework debug messages for NVM update Jeff Kirsher
2014-12-09 11:22 ` [net-next 05/13] i40e: add range check to i40e_aq_rc_to_posix Jeff Kirsher
2014-12-09 14:23 ` Sergei Shtylyov
2014-12-09 17:35 ` Nelson, Shannon
2014-12-09 11:22 ` [net-next 06/13] i40e: init NVM update state on adminq init Jeff Kirsher
2014-12-09 11:22 ` [net-next 07/13] i40e: remove unused nvm_semaphore_wait Jeff Kirsher
2014-12-09 11:22 ` [net-next 08/13] i40e: set max limit for access polling Jeff Kirsher
2014-12-09 11:22 ` [net-next 09/13] i40e: fix up NVM update sm error handling Jeff Kirsher
2014-12-09 11:22 ` [net-next 10/13] i40e: poll on NVM semaphore only if not other error Jeff Kirsher
2014-12-09 11:22 ` [net-next 11/13] i40e: check for AQ timeout in aq_rc decode Jeff Kirsher
2014-12-09 11:22 ` [net-next 12/13] i40e: add to NVM update debug message Jeff Kirsher
2014-12-09 11:22 ` [net-next 13/13] i40e/i40evf: Convert macro to static inline Jeff Kirsher
2014-12-09 19:06 ` Sergei Shtylyov [this message]
2014-12-09 17:13 ` [net-next 00/13][pull request] Intel Wired LAN Driver Updates 2014-12-09 David Miller
2014-12-09 20:15 ` Jeff Kirsher
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=5487482B.1030609@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jogreene@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=sassmann@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 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).