Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 620821 Details for
Bug 862620
"may be used uninitialized" warning at odds with assembly
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
test case (derived form Linux' drivers/base/regmap/regmap.c
regmap_raw_read.c (text/x-c), 1.63 KB, created by
Paul Bolle
on 2012-10-03 12:33:07 UTC
(
hide
)
Description:
test case (derived form Linux' drivers/base/regmap/regmap.c
Filename:
MIME Type:
Creator:
Paul Bolle
Created:
2012-10-03 12:33:07 UTC
Size:
1.63 KB
patch
obsolete
>#include <errno.h> >#include <stddef.h> >#include <stdint.h> > >typedef _Bool bool; > >enum { > false = 0, > true = 1 >}; > >enum regcache_type { > REGCACHE_NONE, >}; > >struct regmap_format { > size_t val_bytes; > void (*format_val)(void *buf, unsigned int val, unsigned int shift); >}; > >struct regmap; > >typedef void (*regmap_lock)(struct regmap *map); >typedef void (*regmap_unlock)(struct regmap *map); > >struct regmap { > regmap_lock lock; > regmap_unlock unlock; > struct regmap_format format; > int reg_stride; > enum regcache_type cache_type; > uint32_t cache_bypass; >}; > >static bool regmap_volatile_range(struct regmap *map, unsigned int reg, > unsigned int num) >{ > unsigned int i; > > for (i = 0; i < num; i++) > if (!regmap_volatile(map, reg + i)) > return false; > > return true; >} > >int regmap_raw_read(struct regmap *map, unsigned int reg, void *val, > size_t val_len) >{ > size_t val_bytes = map->format.val_bytes; > size_t val_count = val_len / val_bytes; > unsigned int v; > int ret, i; > > if (val_len % map->format.val_bytes) > return -EINVAL; > if (reg % map->reg_stride) > return -EINVAL; > > map->lock(map); > > if (regmap_volatile_range(map, reg, val_count) || map->cache_bypass || > map->cache_type == REGCACHE_NONE) { > /* Physical block read if there's no cache involved */ > ret = _regmap_raw_read(map, reg, val, val_len); > > } else { > /* Otherwise go word by word for the cache; should be low > * cost as we expect to hit the cache. > */ > for (i = 0; i < val_count; i++) { > ret = _regmap_read(map, reg + (i * map->reg_stride), > &v); > if (ret != 0) > goto out; > > map->format.format_val(val + (i * val_bytes), v, 0); > } > } > > out: > map->unlock(map); > > return ret; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 862620
: 620821 |
620841