From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ivan Bornyakov <brnkv.i1@gmail.com>
Cc: lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
oleg.drokin@intel.com, andreas.dilger@intel.com
Subject: Re: [PATCH] staging: lustre: libcfs: add parens around macros args
Date: Wed, 30 May 2018 15:06:38 +0300 [thread overview]
Message-ID: <20180530120638.lap3libc5nxmzb4o@mwanda> (raw)
In-Reply-To: <20180522133439.12338-1-brnkv.i1@gmail.com>
On Tue, May 22, 2018 at 04:34:39PM +0300, Ivan Bornyakov wrote:
> One may call 'CFS_FAIL_TIMEOUT(id, secs + 5);' and get unexpected result
> after macro substitution, viz., 'secs + 5' will turn into
> 'secs + 5 * 1000'
>
We actually do that in ptl_send_rpc() as well so this is a real bug.
It's sort of an interesting coincidence that the code in ptl_send_rpc()
looks almost exactly like your theoretical code:
OBD_FAIL_TIMEOUT(OBD_FAIL_PTLRPC_DELAY_SEND, request->rq_timeout + 5);
regards,
dan carpenter
prev parent reply other threads:[~2018-05-30 12:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-22 13:34 Ivan Bornyakov
2018-05-22 19:36 ` [PATCH] checkpatch: Fix macro argument precedence test Joe Perches
2018-05-30 12:06 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180530120638.lap3libc5nxmzb4o@mwanda \
--to=dan.carpenter@oracle.com \
--cc=andreas.dilger@intel.com \
--cc=brnkv.i1@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®