From: Dan Carpenter <dan.carpenter@oracle.com>
To: sparclinux@vger.kernel.org
Subject: [bug report] SPARC/LEON: added support for selecting Timer Core and Timer within core
Date: Thu, 24 Nov 2016 12:19:28 +0000 [thread overview]
Message-ID: <20161124121928.GA12802@mwanda> (raw)
In-Reply-To: <20160713133816.GA8019@mwanda>
Hello Daniel Hellstrom,
The patch 2791c1a43900: "SPARC/LEON: added support for selecting
Timer Core and Timer within core" from Jan 4, 2011, leads to the
following static checker warning:
arch/sparc/kernel/leon_kernel.c:368 leon_init_timers()
warn: continue to end of do { ... } while(0); loop
arch/sparc/kernel/leon_kernel.c
350 /* Find GPTIMER Timer Registers base address otherwise bail out. */
351 nnp = rootnp;
352 do {
353 np = of_find_node_by_name(nnp, "GAISLER_GPTIMER");
354 if (!np) {
355 np = of_find_node_by_name(nnp, "01_011");
356 if (!np)
357 goto bad;
358 }
359
360 ampopts = 0;
361 pp = of_find_property(np, "ampopts", &len);
362 if (pp) {
363 ampopts = *(int *)pp->value;
364 if (ampopts = 0) {
365 /* Skip this instance, resource already
366 * allocated by other OS */
367 nnp = np;
368 continue;
"continue" and "break" mean the same thing here. Please use break, if
that's what was intended.
369 }
370 }
371
372 /* Select Timer-Instance on Timer Core. Default is zero */
373 leon3_gptimer_idx = ampopts & 0x7;
374
375 pp = of_find_property(np, "reg", &len);
376 if (pp)
377 leon3_gptimer_regs = *(struct leon3_gptimer_regs_map **)
378 pp->value;
379 pp = of_find_property(np, "interrupts", &len);
380 if (pp)
381 leon3_gptimer_irq = *(unsigned int *)pp->value;
382 } while (0);
regards,
dan carpenter
next prev parent reply other threads:[~2016-11-24 12:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 13:38 [bug report] SPARC/LEON: added support for selecting Timer Core and Timer within core Dan Carpenter
2016-11-24 12:19 ` Dan Carpenter [this message]
2016-11-24 13:33 ` Daniel Hellstrom
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=20161124121928.GA12802@mwanda \
--to=dan.carpenter@oracle.com \
--cc=sparclinux@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.