Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2099462ybi; Sun, 9 Jun 2019 03:47:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHx4a4Gju/+3yWIc+rhvyeNUET7N+/pRvEm8DaibJEyqCyihM3+HXh1f2daajY6oiV2bo0 X-Received: by 2002:a63:2848:: with SMTP id o69mr11080158pgo.258.1560077256711; Sun, 09 Jun 2019 03:47:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560077256; cv=none; d=google.com; s=arc-20160816; b=WKDKj5xrX74ztu49L2XMJCBEUXWbTco+C8xRcmomt6QPlJPaL1ApaO4IJ/YOroRG53 fS5RpKxEnyf+ANH6vYEomHk8Sx1SW4GmNdJDIb99R6NzkeP4DeORahkeZs0F0fszGigO Ccv+q6by0oqCqUk0qeg8WlEPYdlDhOKBKw9CbYdQ/kRvPFtO9fFbiORDXMWide4eucUD SHABfW+udVTt+nBqQ094GBpYzt+BhkOwgEscQjYutIOMgzY2oMD1i2vpKxTBZcssjs2c ASU67HbAe3Q/BskRo7IuNdiu0ezDmBK6EdoDghN1sLkvCjOlIgaT5yQBOq9Hv0c2yEVt MArw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=p4uAtoqhDdQoJrphme4mewPfO+MwxYEx5HavxtiZKDs=; b=WNwPzvWITPMEcbgVx3ceBr7dq14VBCbInb0Rs/wYBfULdMwff6z5QPph8DUEoIkI8k dRujQF/AnrBKCunE7q7RkcPJ3n5YNedpPYwC1d/3YLW8f9S4a99nWOXoRo4Wos/ydsHq QVJEzdu/rTSNSWuzmInQxyEeS+oVMuhUrNxQbyAb7ViNi9yWExuoSQ0DXlt1GD2U1VeD 1KadyZm7pSIyWHr5vU5HsUjRyKHWE/YIqwQZADUq9LngXdVtZzIaEPZwQvXKZ8uA4cLK 30EHBFQxbBE3H35AeViiM8ke6rV1efsa+afm6OWX7zm2kdCCKkzbSji6EdRqvbNGz++X Xy1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tdt4DzQY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y19si6721418pgi.587.2019.06.09.03.47.08; Sun, 09 Jun 2019 03:47:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tdt4DzQY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728080AbfFIKpn (ORCPT + 99 others); Sun, 9 Jun 2019 06:45:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:33662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726710AbfFIKpn (ORCPT ); Sun, 9 Jun 2019 06:45:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 102AC2070B; Sun, 9 Jun 2019 10:45:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560077142; bh=iyzGTsUWW55gkRVtB+pFp4GxvLgteEbjoCT83KVsi/k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tdt4DzQYcbJzghLA/iZcCAO45d8Knt7ZjIzD6pvZvttVv4BHjg2REY0K9BG1GGqN5 GmDbdlaeOKN7BVoYkbNwivgKqva9TnqqsGH4fdlcQBEDU1oBehyo7fdkbqilxkf1Ob OegeBjjrhnV9cdTxbd4CEsKxzp641BsZDmAVoR14= Date: Sun, 9 Jun 2019 12:45:40 +0200 From: Greg Kroah-Hartman To: Hariprasad Kelam Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: rtl8723bs: hal: move common code to macro Message-ID: <20190609104540.GB7328@kroah.com> References: <20190609103232.GA9769@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190609103232.GA9769@hari-Inspiron-1545> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 09, 2019 at 04:02:32PM +0530, Hariprasad Kelam wrote: > > As part of halbtc8723b2ant_TdmaDurationAdjust function below > piece of code is used many times. > > halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, val); > pCoexDm->psTdmaDuAdjType = val; > > This patch replaces this common code with MACRO > HAL_BTC8723B2ANT_DMA_DURATION_ADJUST Why is all of this indented? And line-wrapped at an odd column? Please use at lines around 72 characters long. > > Signed-off-by: Hariprasad Kelam > --- > drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c | 746 ++++++++++-------------- > 1 file changed, 293 insertions(+), 453 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c b/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c > index cb62fc0..56d842e 100644 > --- a/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c > +++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c > @@ -7,6 +7,13 @@ > > #include "Mp_Precomp.h" > > +/* defines */ > +#define HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(val) \ > +do { \ > + halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, val); \ > + pCoexDm->psTdmaDuAdjType = val; \ > +} while (0) The goal is to move away from crazy macros, not add new ones :) But this does make the code a lot simpler, so it's ok. But please fix up the changelog text and resend. thanks, greg k-h