Date: Sun, 2 Oct 2022 04:29:26 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 33491120e5fa - stable/13 - fd_probe: only define unit on x86, other platforms don't use this code Message-ID: <202210020429.2924TQxK058177@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=33491120e5fa4511367b5779a84d32922ccb784b commit 33491120e5fa4511367b5779a84d32922ccb784b Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-07-08 17:53:30 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-10-02 04:25:52 +0000 fd_probe: only define unit on x86, other platforms don't use this code Sponsored by: Netflix (cherry picked from commit 05d3c5fd182eeb33075ee14e2802c94882dc2c41) --- sys/dev/fdc/fdc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 11262231c3b2..4e771eead119 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -1897,7 +1897,9 @@ fdc_print_child(device_t me, device_t child) static int fd_probe(device_t dev) { +#if defined(__i386__) || defined(__amd64__) int unit; +#endif int i; u_int st0, st3; struct fd_data *fd; @@ -1913,7 +1915,6 @@ fd_probe(device_t dev) fd->dev = dev; fd->fdc = fdc; fd->fdsu = fdsu; - unit = device_get_unit(dev); /* Auto-probe if fdinfo is present, but always allow override. */ type = flags & FD_TYPEMASK; @@ -1927,6 +1928,7 @@ fd_probe(device_t dev) } #if defined(__i386__) || defined(__amd64__) + unit = device_get_unit(dev); if (fd->type == FDT_NONE && (unit == 0 || unit == 1)) { /* Look up what the BIOS thinks we have. */ if (unit == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202210020429.2924TQxK058177>