From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753395AbdARV0u (ORCPT ); Wed, 18 Jan 2017 16:26:50 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:41284 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750836AbdARV0s (ORCPT ); Wed, 18 Jan 2017 16:26:48 -0500 Date: Wed, 18 Jan 2017 16:26:47 -0500 (EST) Message-Id: <20170118.162647.1034141344569503382.davem@davemloft.net> To: sainath.grandhi@intel.com Cc: netdev@vger.kernel.org, mahesh@bandewar.net, linux-kernel@vger.kernel.org Subject: Re: [PATCHv2 3/7] TAP: Tap character device creation/destroy API From: David Miller In-Reply-To: <1484697786-50323-4-git-send-email-sainath.grandhi@intel.com> References: <1484697786-50323-1-git-send-email-sainath.grandhi@intel.com> <1484697786-50323-4-git-send-email-sainath.grandhi@intel.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 18 Jan 2017 12:27:42 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sainath Grandhi Date: Tue, 17 Jan 2017 16:03:02 -0800 > +int tap_create_cdev(struct cdev *tap_cdev, > + dev_t *tap_major, const char *device_name) > +{ > + int err; > + > + err = alloc_chrdev_region(tap_major, 0, TAP_NUM_DEVS, device_name); > + > + if (err) > + goto out1; No need to have an empty line between the alloc_chrdev_region() call and the "if (err)" test. > diff --git a/include/linux/if_tap.h b/include/linux/if_tap.h > index d887aaa..a2dfd90 100644 > --- a/include/linux/if_tap.h > +++ b/include/linux/if_tap.h > @@ -10,7 +10,7 @@ struct file; > struct socket; > static inline struct socket *tap_get_socket(struct file *f) > { > - return ERR_PTR(-EINVAL); > + return ERR_PTR(-EINVAL); > } Instead of having to fix up the indentation here, get it right in the first place in patch #2.