* re: x86/intel/quark: Add Isolated Memory Regions for Quark X1000
@ 2015-03-04 15:06 Dan Carpenter
2015-03-04 16:41 ` Bryan O'Donoghue
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-03-04 15:06 UTC (permalink / raw)
To: kernel-janitors
Hello Bryan O'Donoghue,
The patch 28a375df16c2: "x86/intel/quark: Add Isolated Memory Regions
for Quark X1000" from Jan 30, 2015, leads to the following static
checker warning:
arch/x86/platform/intel-quark/imr.c:229 imr_dbgfs_state_show()
warn: should '(imr.addr_lo) << 8' be a 64 bit type?
arch/x86/platform/intel-quark/imr.c
205 static int imr_dbgfs_state_show(struct seq_file *s, void *unused)
206 {
207 phys_addr_t base;
208 phys_addr_t end;
209 int i;
210 struct imr_device *idev = s->private;
211 struct imr_regs imr;
212 size_t size;
213 int ret = -ENODEV;
214
215 mutex_lock(&idev->lock);
216
217 for (i = 0; i < idev->max_imr; i++) {
218
219 ret = imr_read(idev, i, &imr);
220 if (ret)
221 break;
222
223 /*
224 * Remember to add IMR_ALIGN bytes to size to indicate the
225 * inherent IMR_ALIGN size bytes contained in the masked away
226 * lower ten bits.
227 */
228 if (imr_is_enabled(&imr)) {
229 base = imr_to_phys(imr.addr_lo);
The imr_to_phys() macro should probably include a cast to phys_addr_t if
only to silence the static checker warnings.
230 end = imr_to_phys(imr.addr_hi) + IMR_MASK;
231 } else {
232 base = 0;
233 end = 0;
234 }
235 size = end - base;
236 seq_printf(s, "imr%02i: base=%pa, end=%pa, size=0x%08zx "
237 "rmask=0x%08x, wmask=0x%08x, %s, %s\n", i,
238 &base, &end, size, imr.rmask, imr.wmask,
239 imr_is_enabled(&imr) ? "enabled " : "disabled",
240 imr.addr_lo & IMR_LOCK ? "locked" : "unlocked");
241 }
242
243 mutex_unlock(&idev->lock);
244 return ret;
245 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-04 16:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-04 15:06 x86/intel/quark: Add Isolated Memory Regions for Quark X1000 Dan Carpenter
2015-03-04 16:41 ` Bryan O'Donoghue
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.