From: Kai Krakow <hurikhan77@gmail.com>
To: linux-bcache@vger.kernel.org
Subject: [4.9.1] Compiler warnings in bcache
Date: Mon, 9 Jan 2017 19:34:22 +0100 [thread overview]
Message-ID: <20170109193422.734b3088@jupiter.sol.kaishome.de> (raw)
When compiling kernel 4.9.1, I'm seeing the following warnings:
In file included from ./include/linux/bio.h:23:0,
from drivers/md/bcache/bcache.h:181,
from drivers/md/bcache/writeback.c:9:
drivers/md/bcache/writeback.c: In Funktion »bch_cached_dev_writeback_init«:
./include/linux/ioprio.h:15:73: Warnung: Klammern um Arithmetik in Operand von »|« empfohlen [-Wparentheses]
#define IOPRIO_PRIO_VALUE(class, data) (((class) << IOPRIO_CLASS_SHIFT) | data)
^
drivers/md/bcache/writeback.c:515:25: Anmerkung: bei Substitution des Makros »IOPRIO_PRIO_VALUE«
dc->ioprio_bypass = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, IOPRIO_BE_NR-1);
^
It suggests to put parentheses around the expression with the "|"
operand. No other kernel source files show warnings for me, so maybe it
should be fixed.
I would create a patch myself but I'm not sure if it would be correct
and sufficient to put parenthesis around "data" like this:
#define IOPRIO_PRIO_VALUE(class, data) (((class) << IOPRIO_CLASS_SHIFT) | (data))
--
Regards,
Kai
Replies to list-only preferred.
next reply other threads:[~2017-01-09 18:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-09 18:34 Kai Krakow [this message]
2017-01-10 5:41 ` [4.9.1] Compiler warnings in bcache Coly Li
2017-01-10 20:51 ` Kai Krakow
2017-01-15 9:36 ` Coly Li
2017-01-31 19:01 ` IOPRIO_PRIO_VALUE needs parens around (data) (was: [4.9.1] Compiler warnings in bcache) Eric Wheeler
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=20170109193422.734b3088@jupiter.sol.kaishome.de \
--to=hurikhan77@gmail.com \
--cc=linux-bcache@vger.kernel.org \
/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