Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4208488ybi; Mon, 3 Jun 2019 07:20:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqypURCNyZRlMrig++MFspqnWP6wTR3cP0yf9x9C397VLgKZWSqcZ9MWKH+SnejlVMao2NB/ X-Received: by 2002:a63:1657:: with SMTP id 23mr27045333pgw.98.1559571620552; Mon, 03 Jun 2019 07:20:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559571620; cv=none; d=google.com; s=arc-20160816; b=mKgU8x8MrdSjW7keYNB9xe+SE+C1PCHtduKlVKckqPIcBlogUFSUqcIfcXAo8ng3eQ RXn5zmXsV3GwENoHpEWVCHYpkEnIsTFduYz2CUMfwo9UI18Uby+vWIb57WK60VI/hQqM ebk+bJi4YmrftLqpg1svfYgVcASOB7gXuIc3LsLFRBWj6G3aus9RvqivucMYNDQQUh4t O9MB1Uh80kqplrEqqHSpI0NAZ7wN7/oCjvQL2HBlPs5lZvA8Eb81PyD31sUmkHe45Xcm HoyoPruI7XLW9rmO5FBbnD5e4s+i0QAM/0xXqyLryNtMihITnMJTwA1SSA6F5p69VU99 qJlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=O8u9bMWWc2upditAJJe9umCZRTmqqFno1Ae58qXKluE=; b=UTzC6e50y5y2JfWuyQSOhL5BYkLTYXxoY7eyKnEvnZHb38sf+dTOtVHWB3DYRaXaYa 7xrPYeUw/TAWshlR1Q+umQ05arcpN26QhZoNFpMDPueGR3trnNsydh/0+RefKx24diRP xtVjutow4ejkyPpwFeqUh+qYryhbck9IY1owa5D8tCxWN7eaWt6Di3QUqmn9OyZNiyqO PQbFn2O7Cf7hBsVvnDXH577IEKdnuYNDXh0YvBSWXe4qCLNgQK9mSzlTuLfD0o9H9gLL 70RY39Mg+qr09vxc9r4JYQs2dnBHzGxQkKV+rUmshLvxFiIImgkAIZtirbgRl1cm/qfR CYYQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 205si21026497pfw.107.2019.06.03.07.20.02; Mon, 03 Jun 2019 07:20:20 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728978AbfFCOSc (ORCPT + 99 others); Mon, 3 Jun 2019 10:18:32 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:34400 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726968AbfFCOSb (ORCPT ); Mon, 3 Jun 2019 10:18:31 -0400 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 38AF52680AC; Mon, 3 Jun 2019 15:18:30 +0100 (BST) Date: Mon, 3 Jun 2019 16:18:25 +0200 From: Boris Brezillon To: Kamal Dasu Cc: MTD Maling List , Vignesh Raghavendra , Richard Weinberger , Linux Kernel Mailing List , Marek Vasut , bcm-kernel-feedback-list@broadcom.com, Miquel Raynal , Brian Norris , David Woodhouse Subject: Re: [PATCH 1/3] mtd: nand: raw: brcmnand: Refactored code and introduced inline functions Message-ID: <20190603161825.4044f953@collabora.com> In-Reply-To: References: <1559251257-12383-1-git-send-email-kdasu.kdev@gmail.com> <20190601095748.35d1c1aa@collabora.com> Organization: Collabora X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 3 Jun 2019 10:11:20 -0400 Kamal Dasu wrote: > Boris, > > On Sat, Jun 1, 2019 at 3:57 AM Boris Brezillon > wrote: > > > > On Thu, 30 May 2019 17:20:35 -0400 > > Kamal Dasu wrote: > > > > > Refactored NAND ECC and CMD address configuration code to use inline > > > functions. > > > > I'd expect the compiler to be smart enough to decide when inlining is > > appropriate. Did you check that adding the inline specifier actually > > makes a difference? > > This was done to make the code more readable. It does not make any > difference to performance. I meant dropping the inline specifier, not going back to manual inlining. As a general rule, you don't need to add the 'inline' specifier unless your function is defined in a header. In all other cases the compiler is able to inline things on its own when it sees the number of instructions is small enough or when the function is only called once.