Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1920801pxk; Tue, 1 Sep 2020 10:52:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNkTmAOIJ2Hpo0EZUGdA85+Kb/gNfHYzARsjE97WAasaO4SVzZfEUGuh2+OYjS5xnDsetb X-Received: by 2002:a17:907:43f6:: with SMTP id mu6mr2765715ejb.244.1598982776691; Tue, 01 Sep 2020 10:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598982776; cv=none; d=google.com; s=arc-20160816; b=srGoPd5QmxbReOEMz1mIgUoMDJfmNdPBphVeA50s3bGv0jYifaKv9uD5+IrXRbDCCi Cw4FW16r10j7+dG+RrIVe7FT+vyj9SXMk7BlxyhJIGFUIXnW0ej328jUT0+8fwCfpM5B 6x4vp++N2mKfZ+8L+wBGPch11+/3W8uusnz+xFfVzU+TjsID8f/iITTq1jZ6Si2jUm96 Kd/az/WpE/0NOehkbdgsyLIlo+iloqunRYzN0MMKnTpbxIfEP/Ktb7EkkxzfFDaTQTmZ bdnjLAm0MVRiF7rzyizuTJByDYXkN4XBd5Tfsm5IvLLmlxk59wukw9DiB9W/bDV1SOJk Y2hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xqe5uby8iIg7hveM3v5Ya1BJa58JYbsNAaM7OwON2cM=; b=T+EP36p3874m4vEBbQNxVwaxaGAwAw/T7y66dlaOpCIv8VleZMKpzkkeHc49v3EMDg Hsoz3Fzw98th8fTsP9amRDF1bBZ8XKPNPqYBSFMre3ilHGDW/LXYltWHjqesg40tQfG0 GXS4CiqHGeNjzV899DVbD/btbxj7sxKU3CXscM0wEijk4kC5sBIV/xVYq/ASbDFRJ4Qo ZRaarFJRnChh2YiE6ypmzA7otY9RG/Qx+thokaSnln13lPgVHIwWGWbpGAqI4+qy7wFO Zbd8/1QeCUGeRy15TTtEmG82sf3EH+t99sqQ3EzvHufV5Yl/BGiUE5lwrh7d+zcjvrgh dT7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oyM4rKR9; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x18si1121504ejd.265.2020.09.01.10.52.33; Tue, 01 Sep 2020 10:52:56 -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=pass header.i=@kernel.org header.s=default header.b=oyM4rKR9; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729234AbgIARt7 (ORCPT + 99 others); Tue, 1 Sep 2020 13:49:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:48562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728079AbgIARt5 (ORCPT ); Tue, 1 Sep 2020 13:49:57 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 308B7207D3; Tue, 1 Sep 2020 17:49:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598982596; bh=e7h+oZFFyLcbR6/8OfDuGn4bDyd8dwXNm8Vvh+oVvls=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oyM4rKR9JWi/zFbeC2kbK6rApHD6EBiMupoOzPyI+LP1Xao6kNMM4PP0d/nVX68HK nCVg43w11DOGTq0lZ8oqtZsQQmhHVFbbf0W219Ce5KFDZlOQ9GUIJjn09epL8FJ4eS /qgiAs8SXUQJ36C8gGYE+J7TJ9e680bJAir4noVo= Date: Tue, 1 Sep 2020 19:50:24 +0200 From: Greg KH To: Antoni Przybylik Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: gdm724x: gdm_tty: replaced macro with a function Message-ID: <20200901175024.GA1509755@kroah.com> References: <20200901161846.111486-1-antoni.przybylik@wp.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200901161846.111486-1-antoni.przybylik@wp.pl> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 01, 2020 at 06:18:46PM +0200, Antoni Przybylik wrote: > This approach is more elegant and prevents some problems related to > macros such as operator precedence in expanded expression. > > Signed-off-by: Antoni Przybylik > --- > drivers/staging/gdm724x/gdm_tty.c | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c > index 6e813693a766..a7db0672e81d 100644 > --- a/drivers/staging/gdm724x/gdm_tty.c > +++ b/drivers/staging/gdm724x/gdm_tty.c > @@ -27,8 +27,6 @@ > > #define MUX_TX_MAX_SIZE 2048 > > -#define GDM_TTY_READY(gdm) (gdm && gdm->tty_dev && gdm->port.count) > - > static struct tty_driver *gdm_driver[TTY_MAX_COUNT]; > static struct gdm *gdm_table[TTY_MAX_COUNT][GDM_TTY_MINOR]; > static DEFINE_MUTEX(gdm_table_lock); > @@ -36,6 +34,11 @@ 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"}; > > +static int gdm_tty_ready(gdm *gdm) > +{ > + return (gdm && gdm->tty_dev && gdm->port.count); > +} You obviously did not even build this patch, which is a bit rude, don't you think? :(