MFC r274820:
Merge from CheriBSD (2e28d2a3090239b30481f35dc452ad95a5c57389): Remove initalized, but unused devname variable Sponsored by: DARPA, AFRL
This commit is contained in:
parent
f27f3e0e8e
commit
768a6267bd
@ -321,7 +321,6 @@ altera_avgen_attach(struct altera_avgen_softc *sc, const char *str_fileio,
|
||||
const char *str_mmapio, const char *str_devname, int devunit)
|
||||
{
|
||||
device_t dev = sc->avg_dev;
|
||||
char devname[SPECNAMELEN + 1];
|
||||
int error;
|
||||
|
||||
error = altera_avgen_process_options(sc, str_fileio, str_mmapio,
|
||||
@ -329,18 +328,6 @@ altera_avgen_attach(struct altera_avgen_softc *sc, const char *str_fileio,
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
/* Select a device name. */
|
||||
if (str_devname != NULL) {
|
||||
if (devunit != -1)
|
||||
(void)snprintf(devname, sizeof(devname), "%s%d",
|
||||
str_devname, devunit);
|
||||
else
|
||||
(void)snprintf(devname, sizeof(devname), "%s",
|
||||
str_devname);
|
||||
} else
|
||||
snprintf(devname, sizeof(devname), "%s%d", "avgen",
|
||||
sc->avg_unit);
|
||||
|
||||
if (rman_get_size(sc->avg_res) >= PAGE_SIZE || str_mmapio != NULL) {
|
||||
if (rman_get_size(sc->avg_res) % PAGE_SIZE != 0) {
|
||||
device_printf(dev,
|
||||
|
Loading…
Reference in New Issue
Block a user