Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2018356pxk; Tue, 1 Sep 2020 13:32:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRyD5h7GKAZSlvKv1NiHsWqp3IQrrdu3vNXMIFFWAebO9XWDaDKb0U8uCUvcGYH3t1eIzq X-Received: by 2002:a17:906:5902:: with SMTP id h2mr3420455ejq.423.1598992374438; Tue, 01 Sep 2020 13:32:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598992374; cv=none; d=google.com; s=arc-20160816; b=YIJtqyK5Ry2cJDknfoL0KpVBmbVlWLZ+2NQZ5EnDqrtu3Sw1nt1olkjtc6VXAr1Yjl ACb3A2XhCD2NPr11nSoZYZGLiMDyWQT2WsMeWr9z19VuR/SgoU2cKM9ZIxAj1eUXSV7R qK32p6Nnsqljb0ErGh8bsjfUTHcGJw/5WaEHRKrd219gBolCkvs+khl4qRyQYRWTMJsK D30BPMgc0BFCuqD4HUUaWYNuHN78Eij3dNGL6WG/QliiVMZSA77EfpGo+JjY/2571dam 7hL+z7hJhyTPqNOiEXsVq0khzMcNMsz4wVGBKFheHgBUyplNHtlb16P+bQS97ZLE8+nQ zg1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:cc:from:references:to:subject:dkim-signature; bh=8yqYvUMKqSXk/Clt3FRpjdGUhFpqCSV3vm/nqSmI+Xs=; b=bT0MZ4+lHThL5vrwWpwyQSfnlGwV0RfurPdBjdQBXUpb8HUVU+sMgbh5k5RT9ntDar uzVZfyj9Y4Pb6XA4Z79HcNcZlOKHbdPCXXNZE8NddFEbd89Fzu77QhhI+qulvWxG7j7M xFitkxWrTQ9MMWM/j3PI5UMCfpiSKtVw+qvQqpq5i0lJHN1xVBsN80pRcSb34jy2x1i1 OtwEg2PAOLr02GJ3AvXRBPv+xJrNQmdVx5iYdKSmq/4ihSu/55Nf2pelq9n3ujzQvws3 3lX9qFUuec1cpx5chtrIdGLv4wUlu0751xQicZ/6iq8pKcaNaXOXuSN367fCRWjdTxBz IV6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@wp.pl header.s=1024a header.b=fqhlyouj; 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=pass (p=NONE sp=NONE dis=NONE) header.from=wp.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si1476600ejx.448.2020.09.01.13.32.31; Tue, 01 Sep 2020 13:32:54 -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 (test mode) header.i=@wp.pl header.s=1024a header.b=fqhlyouj; 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=pass (p=NONE sp=NONE dis=NONE) header.from=wp.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728192AbgIAUbn (ORCPT + 99 others); Tue, 1 Sep 2020 16:31:43 -0400 Received: from mx3.wp.pl ([212.77.101.9]:53676 "EHLO mx3.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726091AbgIAUbm (ORCPT ); Tue, 1 Sep 2020 16:31:42 -0400 Received: (wp-smtpd smtp.wp.pl 4693 invoked from network); 1 Sep 2020 22:31:38 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1598992298; bh=8yqYvUMKqSXk/Clt3FRpjdGUhFpqCSV3vm/nqSmI+Xs=; h=Subject:To:From:Cc; b=fqhlyouj79/pAIYv7HLX7zrxmo9deFClN1Jp4M+0doIQoSuFEKr5UVitfOKUJSclt WHRwjK1q933XXxeD0SQCINErmXVLbx3Dz8c5PZLm1swF46HRcoNmxkKMZIo9ADBMEQ ydwOXd99/k0QUkUbaVkyHii2PrH81z6Iu5yof3jI= Received: from 188.146.102.178.nat.umts.dynamic.t-mobile.pl (HELO [192.168.1.110]) (antoni.przybylik@wp.pl@[188.146.102.178]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 1 Sep 2020 22:31:38 +0200 Subject: Re: [PATCH] staging: gdm724x: gdm_tty: replaced macro with a function To: Greg KH References: <20200901161846.111486-1-antoni.przybylik@wp.pl> <20200901175024.GA1509755@kroah.com> From: "antoni.przybylik@wp.pl" Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Message-ID: <4cf3447d-0dfa-8072-d168-698400d177c7@wp.pl> Date: Tue, 1 Sep 2020 22:31:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200901175024.GA1509755@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-WP-MailID: ea52d949d95c05dd253d4b49b44ccb41 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 000000B [gYNU] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01.09.2020 19:50, Greg KH wrote: > 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? > > :( I'm stupid. I misconfigured the kernel. I fixed this bug and sent a new patch. Linux configuration script is horrible... Antoni Przybylik