netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Nicholas Krause <xerofoify@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] 8021q:Add missing statements to switch case in the function, register_vlan_device
Date: Mon, 7 Mar 2016 12:29:05 +0100	[thread overview]
Message-ID: <20160307112905.GA2378@macbook.localdomain> (raw)
In-Reply-To: <1457322689-19443-1-git-send-email-xerofoify@gmail.com>

On 06.03, Nicholas Krause wrote:
> This adds the proper snprintf and break statement for formatting
> the vlan_net structure pointer, vn's name using snprintf for if
> the switch case, VLAN_NAME_TYPE_PLUS_VID occurs for this particular
> switch statement inside the function, register_vlan_device.
> 
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
>  net/8021q/vlan.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
> index 59555f0..91ef50e 100644
> --- a/net/8021q/vlan.c
> +++ b/net/8021q/vlan.c
> @@ -246,8 +246,11 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id)
>  		/* Put our vlan.VID in the name.
>  		 * Name will look like:	 vlan0005
>  		 */
> +		snprintf(name, IFNAMSIZ, "%s%i", real_dev->name, vlan_id);
> +		break;

As the comment indicates, the fall-through is intended like this.

>  	default:
>  		snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id);
> +		break;
>  	}
>  
>  	new_dev = alloc_netdev(sizeof(struct vlan_dev_priv), name,
> -- 
> 2.1.4
> 

           reply	other threads:[~2016-03-07 11:37 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1457322689-19443-1-git-send-email-xerofoify@gmail.com>]

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=20160307112905.GA2378@macbook.localdomain \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xerofoify@gmail.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).