Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp622900pxk; Wed, 2 Sep 2020 10:18:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy98xW9jRymEgWCM4rao6uvPGnRyX2VCdgPA5AYYgaIp/kRiWgOLGBxV/cQn2VEf/AmDUXb X-Received: by 2002:a17:906:aed1:: with SMTP id me17mr1006689ejb.267.1599067125760; Wed, 02 Sep 2020 10:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599067125; cv=none; d=google.com; s=arc-20160816; b=ibk/jYyLu94h/7DbaawO1PmoK/8GBz/7tW+tMoaTnvaNWffCjCXuo7XsdYTssSDl3c ledM4rF9YPyqOTzsSUVSG43avFpDlOndganRKU+W4tUTUw5ONbt7YuVKS//WEZ+Mrf+q f/y2LutVSTuDJ0d5jTQKnJJTFOvY+04Gsi6J1pB7xeMf34aSZCqY3R7djmkGpekxrixN jy58mAIM3PwpOq1wo+IL7Y8ucCT2GQSiTqDKg9/f6b62KoyghTSPvbQvIVLyLd8D/Seg htZuBQpHTlDaD1dR7CYUq5BHq6gdkcCfBacEjrpVpqP0NBziDKY4LQYn46+NF/h4B27n 0bhQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=AVRtAc+RwJraZsE01wT7p+JsR1tlFhWCbVeaGOLOdfU=; b=OCtCeKJhTO5v4CaCNas9izYckd/Vo1u6sioEdB36b3t4DNISjDwSKxi5jONfsoJa2/ QeeR/jybkI3FzBa0paGWAhLMEzv59TeePOAFclojqa/+bLpsSGlnuTGRAJqdi11E524o inYuQvEq0MNypPlA+Vx6K7anN+r9KpOHofAKDQPS7sUtMiUpbx1p1w6QC3ejTiWEQ6vQ tpwErmSSymmNXDu2rEaOnPuIdk7igQN9GXID19UKOT9OgDeUcr4OZMTSqtonQHUENFAh MrGaywgGTPupm4r5QbxuA9wZxumVQFvoJJLLegkAiDN3DmeNmScnYpS7IiUUfmqp9no0 PM2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b="UngeA/+K"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 4si3015482edw.95.2020.09.02.10.18.22; Wed, 02 Sep 2020 10:18:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b="UngeA/+K"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726400AbgIBROj (ORCPT + 99 others); Wed, 2 Sep 2020 13:14:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726269AbgIBROi (ORCPT ); Wed, 2 Sep 2020 13:14:38 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABCC6C061244 for ; Wed, 2 Sep 2020 10:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=AVRtAc+RwJraZsE01wT7p+JsR1tlFhWCbVeaGOLOdfU=; b=UngeA/+KKa/hS0qCycBAlxlKwV Ap9XtqQs3YHki9Vc/x7yUPVgNcDf7RyXdSuJW+Ezv0U/Y8PV2WO4fw9OXCSmSxsNdMYYTNeDm+3yY DzS0pQkNhTGcogCGQYLk6BM8YT+BE5y5G2Js/6bQLNGuXXP6VZu4rhZIoxBLd0Jo2Rs61LzBwG3Gj MYl13j4a+9H9SlO23+XH/TyWrHaQQLmEo8GRdMm/wShYYuyrOJcML/7eOwOH/eOw2XXy9NN4hTelz R4i9p11bwbnN++klbtZwjJ2Rpsaztr31GuFAVdqX/u3Beu6j3GSa0TQbVyyODqdmsiVyF73dsjEO4 3zMv1QIA==; Received: from [2601:1c0:6280:3f0::19c2] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDWLD-00024w-Nd; Wed, 02 Sep 2020 17:14:36 +0000 Subject: Re: [PATCH v2 2/2] staging: gdm724x: gdm_tty: replaced macro with a function To: "antoni.przybylik@wp.pl" Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20200902161627.64686-1-antoni.przybylik@wp.pl> <14c3b5c1-a5d8-3843-6538-5f76c4b8d6df@infradead.org> From: Randy Dunlap Message-ID: Date: Wed, 2 Sep 2020 10:14:32 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/2/20 10:07 AM, antoni.przybylik@wp.pl wrote: > On 02.09.2020 18:21, Randy Dunlap wrote: >> On 9/2/20 9:16 AM, Antoni Przybylik wrote: >>> Changed return type to bool and removed inline specifier. Also added >>>   static specifier. >> why remove the inline specifier? > > Greg KH wrote to me: > > And really, no need to make it inline, just make it a normal function > and the compiler will inline it if needed. > >> thanks. OK, thanks. Sometimes the compiler will also ignore inline if it wants to. That's why we have to use __always_inline. >> >>> Signed-off-by: Antoni Przybylik >>> --- >>>   drivers/staging/gdm724x/gdm_tty.c | 2 +- >>>   1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c >>> index 34a13d98c029..179fc9b9400b 100644 >>> --- a/drivers/staging/gdm724x/gdm_tty.c >>> +++ b/drivers/staging/gdm724x/gdm_tty.c >>> @@ -34,7 +34,7 @@ static DEFINE_MUTEX(gdm_table_lock); >>>   static const char *DRIVER_STRING[TTY_MAX_COUNT] = {"GCTATC", "GCTDM"}; >>>   static char *DEVICE_STRING[TTY_MAX_COUNT] = {"GCT-ATC", "GCT-DM"}; >>>   -inline int gdm_tty_ready(struct gdm *gdm) >>> +static bool gdm_tty_ready(struct gdm *gdm) >>>   { >>>       return (gdm && gdm->tty_dev && gdm->port.count); >>>   } >>> >> > Antoni Przybylik -- ~Randy Reported-by: Randy Dunlap