mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 05:01:48 +00:00
arch/x86/platform/uv: use ARRAY_SIZE where possible
Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Link: http://lkml.kernel.org/r/1356030701-16284-26-git-send-email-sasha.levin@oracle.com Cc: Cliff Wickman <cpw@sgi.com> Cc: Alex Shi <alex.shi@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
parent
787314c35f
commit
6444174548
@ -1463,7 +1463,7 @@ static ssize_t ptc_proc_write(struct file *file, const char __user *user,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (input_arg == 0) {
|
if (input_arg == 0) {
|
||||||
elements = sizeof(stat_description)/sizeof(*stat_description);
|
elements = ARRAY_SIZE(stat_description);
|
||||||
printk(KERN_DEBUG "# cpu: cpu number\n");
|
printk(KERN_DEBUG "# cpu: cpu number\n");
|
||||||
printk(KERN_DEBUG "Sender statistics:\n");
|
printk(KERN_DEBUG "Sender statistics:\n");
|
||||||
for (i = 0; i < elements; i++)
|
for (i = 0; i < elements; i++)
|
||||||
@ -1504,7 +1504,7 @@ static int parse_tunables_write(struct bau_control *bcp, char *instr,
|
|||||||
char *q;
|
char *q;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
int val;
|
int val;
|
||||||
int e = sizeof(tunables) / sizeof(*tunables);
|
int e = ARRAY_SIZE(tunables);
|
||||||
|
|
||||||
p = instr + strspn(instr, WHITESPACE);
|
p = instr + strspn(instr, WHITESPACE);
|
||||||
q = p;
|
q = p;
|
||||||
|
Loading…
Reference in New Issue
Block a user