From patchwork Wed Dec 14 08:20:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 9474053 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5FFE060823 for ; Wed, 14 Dec 2016 11:19:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57C9128713 for ; Wed, 14 Dec 2016 11:19:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C8612871F; Wed, 14 Dec 2016 11:19:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C52C328713 for ; Wed, 14 Dec 2016 11:19:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cH7b4-0002EG-8q; Wed, 14 Dec 2016 11:19:42 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cH7b2-0002EA-QW for v9fs-developer@lists.sourceforge.net; Wed, 14 Dec 2016 11:19:40 +0000 Received-SPF: softfail (sog-mx-1.v43.ch3.sourceforge.com: transitioning domain of kaod.org does not designate 148.163.158.5 as permitted sender) client-ip=148.163.158.5; envelope-from=groug@kaod.org; helo=mx0a-001b2d01.pphosted.com; Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5] helo=mx0a-001b2d01.pphosted.com) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1cH7b1-0001JY-0Q for v9fs-developer@lists.sourceforge.net; Wed, 14 Dec 2016 11:19:40 +0000 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uBE8IkJI146617 for ; Wed, 14 Dec 2016 03:20:49 -0500 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0a-001b2d01.pphosted.com with ESMTP id 27axsxw7xp-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 14 Dec 2016 03:20:49 -0500 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Dec 2016 01:20:48 -0700 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 14 Dec 2016 01:20:46 -0700 Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 40FB73E40030; Wed, 14 Dec 2016 01:20:46 -0700 (MST) Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uBE8KkZ216318790; Wed, 14 Dec 2016 01:20:46 -0700 Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 206546A03C; Wed, 14 Dec 2016 01:20:46 -0700 (MST) Received: from [192.168.66.200] (unknown [9.164.134.3]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP id 045426A03B; Wed, 14 Dec 2016 01:20:44 -0700 (MST) From: Greg Kurz To: Eric Van Hensbergen Date: Wed, 14 Dec 2016 09:20:43 +0100 User-Agent: StGit/0.17.1-20-gc0b1b-dirty MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16121408-0004-0000-0000-000011144BFC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006246; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000196; SDB=6.00793626; UDB=6.00384794; IPR=6.00571429; BA=6.00004964; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013622; XFM=3.00000011; UTC=2016-12-14 08:20:47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16121408-0005-0000-0000-00007B63817B Message-Id: <148170364325.11774.10800199735048760595.stgit@bahia> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-12-14_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1612140142 X-Headers-End: 1cH7b1-0001JY-0Q Cc: v9fs-developer@lists.sourceforge.net, trivial@kernel.org, linux-kernel@vger.kernel.org Subject: [V9fs-developer] [PATCH] 9p: safer definition of P9_NOTAG and P9_NOFID X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Virus-Scanned: ClamAV using ClamSMTP Both defines should at least have enclosing parenthesis to be usable in any syntactical situation. This is the case of U16_MAX and U32_MAX, so let's use them. This patch is just cleanup, it doesn't change any behaviour with the current code. Signed-off-by: Greg Kurz --- include/net/9p/9p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 27dfe85772b1..5c80d98126b3 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h @@ -332,8 +332,8 @@ enum p9_qid_t { }; /* 9P Magic Numbers */ -#define P9_NOTAG (u16)(~0) -#define P9_NOFID (u32)(~0) +#define P9_NOTAG U16_MAX +#define P9_NOFID U32_MAX #define P9_MAXWELEM 16 /* ample room for Twrite/Rread header */