From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755149AbcAMRLV (ORCPT ); Wed, 13 Jan 2016 12:11:21 -0500 Received: from mga09.intel.com ([134.134.136.24]:1926 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754387AbcAMRJs (ORCPT ); Wed, 13 Jan 2016 12:09:48 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,290,1449561600"; d="scan'208";a="889791405" Message-ID: <1452704722.26146.73.camel@linux.intel.com> Subject: Re: [PATCH v5 05/15] tty: serial: 8250: Remove else after return From: Andy Shevchenko To: Anton Wuerfel , Greg Kroah-Hartman Cc: Jiri Slaby , "James E.J. Bottomley" , Helge Deller , Peter Hurley , Heikki Krogerus , Qipeng Zha , Desmond Liu , Wang Long , Matt Redfearn , Paul Burton , Ralf Baechle , Krzysztof Kozlowski , Peter Hung , Soeren Grunewald , Adam Lee , "Maciej S. Szmigiero" , Mans Rullgard , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, linux-kernel@i4.cs.fau.de, Phillip Raffeck Date: Wed, 13 Jan 2016 19:05:22 +0200 In-Reply-To: <1452703171-5632-6-git-send-email-anton.wuerfel@fau.de> References: <1452703171-5632-1-git-send-email-anton.wuerfel@fau.de> <1452703171-5632-6-git-send-email-anton.wuerfel@fau.de> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2016-01-13 at 17:39 +0100, Anton Wuerfel wrote: > This patch fixes checkpatch warnings about unnecessary else blocks > after > return statements. > > @@ -816,12 +816,11 @@ static int pci_netmos_9900_numports(struct > pci_dev *dev) >    * advertising the same function 3 as the 4s+2s1p > config. >    */ >   sub_serports = dev->subsystem_device & 0xf; > - if (sub_serports > 0) { > + if (sub_serports > 0) >   return sub_serports; > - } else { > - dev_err(&dev->dev, "NetMos/Mostech serial > driver ignoring port on ambiguous config.\n"); > - return 0; > - } > + > + dev_err(&dev->dev, "NetMos/Mostech serial driver > ignoring port on ambiguous config.\n"); Here you may put the literal on the next line and indent it properly to &. It might not fit the 80 character limit, but I think still worth to do. -- Andy Shevchenko Intel Finland Oy