Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1074716pxk; Mon, 31 Aug 2020 09:06:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx72Ixajpc71r2DFKs7AhK+RLLoOSwcrx7KUGE5zpCtsngSYaUYtzX55sLA40NuLDj6HLLS X-Received: by 2002:a17:906:a1d7:: with SMTP id bx23mr1752895ejb.273.1598890005390; Mon, 31 Aug 2020 09:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598890005; cv=none; d=google.com; s=arc-20160816; b=B1EPPbkvShFyNmcA7op+4zmq4FmU4g55Es/5WCfDTQ4Nu8rHwjvH3lECTS+T5O+pza NrwH8eFlaNb6G/5H5aecPKi+LZCVbKli5H6sWQrVOpl5M43LFWC4FYhDNJhRdCAEhu0A nhf/Sm9uQ/WS6ID88bduPnJDuVKn9VzN6tfExm1Fik34VakQQ2QRCdiaU7vr4+9ixX3u b+kfliSuhFXuyT9y9mzbj4GWscRbyS9LcQUVDezzqtkZLanj96y5nPD+VKcPJX2/syaH m8+5sjw1OUcHhb5E7edh2LBMUb3RCiiKw0Yub4wrDVBG4iGUJ2wak/GFck+rY2cwJPMu WyZg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Wso2RTwzDw3uAYjb34dIRt37gGCLNnOWKMz9bQ3PYPY=; b=zy+2hpBaTo6+HXUBXlYKFQBiSCriWlv6e7g3n4O200wBtXouMVwn+smWsthoCp4ONh cEy14A6UYgboUi0Og1+pz8cda5ZkcKcUJ1VUq5g0FnoQcbscbldx4M7D2SgSF60TGFRw volLxnPoTFa7tHz2fae3U/cApbExUyPETaioEUcjRbwy++Rlcaj3cgkfv+Gt0ccJ7s93 aqO0fTGHbGtjuLH3+pf7lIwfn1UtNy7mgTHShzgOVtX/iNaAy+qIhoE6mad9+PAtgy1u Ib7R1AehGFE0HxIICEY/gIcjno87pIc/5Mx67Rbc3NZx8oZjPb7ykWj5e9pcFlgc00HR OXBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@wp.pl header.s=1024a header.b=d3UfzPiW; 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 s18si5520394ejf.52.2020.08.31.09.06.21; Mon, 31 Aug 2020 09:06: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=pass (test mode) header.i=@wp.pl header.s=1024a header.b=d3UfzPiW; 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 S1728210AbgHaQEf (ORCPT + 99 others); Mon, 31 Aug 2020 12:04:35 -0400 Received: from mx4.wp.pl ([212.77.101.12]:49763 "EHLO mx4.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728251AbgHaQEb (ORCPT ); Mon, 31 Aug 2020 12:04:31 -0400 Received: (wp-smtpd smtp.wp.pl 6944 invoked from network); 31 Aug 2020 18:04:25 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1598889865; bh=Wso2RTwzDw3uAYjb34dIRt37gGCLNnOWKMz9bQ3PYPY=; h=From:To:Cc:Subject; b=d3UfzPiWnYREinUtTS7/DhxIJrPfO/T7mFpQz549+xt2YNW2ndVRIIwSzBFt7H4/L pyX2vv/mEHLZh5uxrnCPIN1zgxn2gcIkpACIuLpJv+fCZZCcr7rRUs4e6zXVCuiQt2 slH+1P4XoO8buUcBZn76z/c4flISxDtBXt0c1gYg= Received: from 188.146.234.2.nat.umts.dynamic.t-mobile.pl (HELO localhost) (antoni.przybylik@wp.pl@[188.146.234.2]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 31 Aug 2020 18:04:25 +0200 From: antoniprzybylik To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, antoniprzybylik Subject: [PATCH] staging: gdm724x: fixed two macros by adding brackets Date: Mon, 31 Aug 2020 18:03:32 +0200 Message-Id: <20200831160332.8507-1-antoni.przybylik@wp.pl> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-WP-DKIM-Status: good (id: wp.pl) X-WP-MailID: 72389e197ba179900ee91c9ac8f34ac3 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000000 [oXN8] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Added brackets to two macros. Signed-off-by: Antoni Przybylik --- drivers/staging/gdm724x/gdm_tty.c | 3 +-- drivers/staging/gdm724x/netlink_k.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c index 6e813693a766..5cd94347bf78 100644 --- a/drivers/staging/gdm724x/gdm_tty.c +++ b/drivers/staging/gdm724x/gdm_tty.c @@ -27,7 +27,7 @@ #define MUX_TX_MAX_SIZE 2048 -#define GDM_TTY_READY(gdm) (gdm && gdm->tty_dev && gdm->port.count) +#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]; @@ -323,4 +323,3 @@ void unregister_lte_tty_driver(void) } } } - diff --git a/drivers/staging/gdm724x/netlink_k.c b/drivers/staging/gdm724x/netlink_k.c index 7902e52a699b..399b7b4b536f 100644 --- a/drivers/staging/gdm724x/netlink_k.c +++ b/drivers/staging/gdm724x/netlink_k.c @@ -20,7 +20,7 @@ static DEFINE_MUTEX(netlink_mutex); #define ND_NLMSG_DATA(nlh) ((void *)((char *)NLMSG_DATA(nlh) + \ ND_IFINDEX_LEN)) #define ND_NLMSG_S_LEN(len) (len + ND_IFINDEX_LEN) -#define ND_NLMSG_R_LEN(nlh) (nlh->nlmsg_len - ND_IFINDEX_LEN) +#define ND_NLMSG_R_LEN(nlh) ((nlh)->nlmsg_len - ND_IFINDEX_LEN) #define ND_NLMSG_IFIDX(nlh) NLMSG_DATA(nlh) #define ND_MAX_MSG_LEN (1024 * 32) -- 2.28.0