提交 c758e8cf 编写于 作者: B Ben Hutchings 提交者: Jean Delvare

i2c: Fix sparse warnings for I2C_BOARD_INFO()

Since the first argument to I2C_BOARD_INFO() must be a string constant,
there is no need to parenthesise it, and adding parentheses results in
an invalid initialiser for char[].  gcc obviously accepts this syntax as
an extension, but sparse complains, e.g.:

drivers/net/sfc/boards.c:173:2: warning: array initialized from parenthesized string constant

Therefore, remove the parentheses.
Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: NJean Delvare <khali@linux-fr.org>
上级 3f307fb3
......@@ -274,7 +274,7 @@ struct i2c_board_info {
* are provided using conventional syntax.
*/
#define I2C_BOARD_INFO(dev_type, dev_addr) \
.type = (dev_type), .addr = (dev_addr)
.type = dev_type, .addr = (dev_addr)
/* Add-on boards should register/unregister their devices; e.g. a board
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册