浏览代码

synclink: use ARRAY_SIZE

Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Acked-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Kulikov Vasiliy 15 年之前
父节点
当前提交
7ea7c6d51e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/char/synclink_gt.c

+ 1 - 1
drivers/char/synclink_gt.c

@@ -4845,7 +4845,7 @@ static int register_test(struct slgt_info *info)
 {
 	static unsigned short patterns[] =
 		{0x0000, 0xffff, 0xaaaa, 0x5555, 0x6969, 0x9696};
-	static unsigned int count = sizeof(patterns)/sizeof(patterns[0]);
+	static unsigned int count = ARRAY_SIZE(patterns);
 	unsigned int i;
 	int rc = 0;