Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753929AbbBYWBK (ORCPT ); Wed, 25 Feb 2015 17:01:10 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:33903 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752825AbbBYWBI (ORCPT ); Wed, 25 Feb 2015 17:01:08 -0500 Date: Wed, 25 Feb 2015 17:01:06 -0500 (EST) Message-Id: <20150225.170106.798587659082519733.davem@davemloft.net> To: ameenali023@gmail.com Cc: shahed.shaikh@qlogic.com, Dept-GELinuxNICDev@qlogic.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 6/6] qlcnic_dcb.c : possible division by zero. From: David Miller In-Reply-To: <1424901403-6458-1-git-send-email-ameenali023@gmail.com> References: <1424901403-6458-1-git-send-email-ameenali023@gmail.com> X-Mailer: Mew version 6.5 on Emacs 24.1 / 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.7 (shards.monkeyblade.net [149.20.54.216]); Wed, 25 Feb 2015 14:01:08 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 788 Lines: 23 From: Ameen Ali Date: Wed, 25 Feb 2015 23:56:43 +0200 > @@ -822,7 +822,7 @@ qlcnic_dcb_get_pg_tc_cfg_tx(struct net_device *netdev, int tc, u8 *prio, > if (temp->valid && (pg == temp->pgid)) > cnt++; > } > - > + if(cnt != 0) > tc_cfg->bwg_percent = (100 / cnt); This is not acceptable. Your conditional expression is not spaced properly, there must be a space between "if" and the openning parenthesis of the condition. You also must properly re-indent the statement the new if() condition is protecting. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/