Commit Graph

142665 Commits

Author SHA1 Message Date
John Baldwin
9c861e931c cuda: Remove unused variables. 2022-04-12 14:58:58 -07:00
John Baldwin
6e31d66849 ata_dbdma_dmainit: Remove unused variable. 2022-04-12 14:58:58 -07:00
John Baldwin
019493db3e ata_kauai: Remove unused variable. 2022-04-12 14:58:58 -07:00
John Baldwin
6d0f9c91cb powerpc cpufreq: Remove unused variables. 2022-04-12 14:58:58 -07:00
John Baldwin
c9d26ca24c ppc mmoea64: Workaround set but unused warnings for RB_NEXT.
Inline the unused expression passed as the second argument to RB_NEXT.
2022-04-12 14:58:58 -07:00
John Baldwin
8d95af873f ppc aim flush_disable_caches: Use void casts instead of a dummy variable. 2022-04-12 14:58:58 -07:00
John Baldwin
b8ef5a7ea0 sound aoa: Mark variable only used in debug trace as unused. 2022-04-12 14:58:58 -07:00
John Baldwin
124b6786e4 powermac_nvram: Actually return EBUSY on error from open. 2022-04-12 14:58:58 -07:00
John Baldwin
773cfd2bf8 adt746x: Remove unused variables. 2022-04-12 14:58:58 -07:00
John Baldwin
9a0cd76bb0 riscv bounce_bus_dma_tag_destroy: Silence set but unused warning. 2022-04-12 14:58:57 -07:00
John Baldwin
8209266cab if_xae: Remove unused variables. 2022-04-12 14:58:57 -07:00
John Baldwin
0146e4ce2f axidma: Remove unused variables. 2022-04-12 14:58:57 -07:00
John Baldwin
9e420b3742 uart_dev_lowrisc: Remove unused variables in stub functions. 2022-04-12 14:58:57 -07:00
John Baldwin
d8e7d35acf iicoc: Remove unused variable. 2022-04-12 14:58:57 -07:00
John Baldwin
4eb43c2c46 KTR: Add CTR() and TR() macros which accept a variable number of arguments.
These can be used in place of the CTRn() macros which require n to match
the number of optional arguments.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D34852
2022-04-12 14:52:25 -07:00
John Baldwin
c434b26cf3 i40e_validate_filter_settings: Remove unused variables.
Reviewed by:	erj
Differential Revision:	https://reviews.freebsd.org/D34829
2022-04-12 14:51:44 -07:00
Mark Johnston
d769609620 tty: Remove an incorrect assertion from ttyinq_line_iterate()
We may legitimately have tib == NULL if we're at the very end of the
queue.

PR:		215373
Reported by:	pho
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-04-12 17:30:04 -04:00
John Baldwin
6e3168c85d <sys/_stdarg.h>: Fix indentation after removing __GNUCLIKE checks. 2022-04-12 10:12:13 -07:00
John Baldwin
3d6f4411e4 Remove checks for <sys/cdefs.h> being included.
These files no longer depend on the macros required when these checks
were added.

PR:		263102 (exp-run)
Reviewed by:	brooks, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D34804
2022-04-12 10:06:18 -07:00
John Baldwin
5f9c9ae2f2 Remove checks for __CC_SUPPORTS_WARNING assuming it is always true.
All supported compilers (modern versions of GCC and clang) support
this.

PR:		263102 (exp-run)
Reviewed by:	brooks, imp
Differential Revision:	https://reviews.freebsd.org/D34803
2022-04-12 10:06:13 -07:00
John Baldwin
f08613087a Remove checks for __CC_SUPPORTS__INLINE assuming it is always true.
All supported compilers (modern versions of GCC and clang) support
this.

PR:		263102 (exp-run)
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D34802
2022-04-12 10:06:09 -07:00
John Baldwin
87445068f9 Remove check for __CC_SUPPORTS___FUNC__.
__func__ is part of C99.

PR:		263102 (exp-run)
Reviewed by:	brooks, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D34801
2022-04-12 10:06:04 -07:00
John Baldwin
b8717a8709 Remove checks for __GNUCLIKE macros for varargs.
All supported compilers (modern versions of GCC and clang) support
these.

PR:		263102 (exp-run)
Reviewed by:	brooks, imp
Differential Revision:	https://reviews.freebsd.org/D34800
2022-04-12 10:06:00 -07:00
John Baldwin
9f92ef766a Remove checks for __GNUCLIKE___SECTION assuming it is always true.
All supported compilers (modern versions of GCC and clang) support
this.

PR:		263102 (exp-run)
Reviewed by:	brooks, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D34799
2022-04-12 10:05:55 -07:00
John Baldwin
5ab33279ad Remove checks for __GNUCLIKE___TYPEOF assuming it is always true.
All supported compilers (modern versions of GCC and clang) support
this.

PR:		263102 (exp-run)
Reviewed by:	brooks, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D34798
2022-04-12 10:05:50 -07:00
John Baldwin
56f5947a71 Remove checks for __GNUCLIKE_ASM assuming it is always true.
All supported compilers (modern versions of GCC and clang) support
this.

Many places didn't have an #else so would just silently do the wrong
thing.  Ancient versions of icc (the original motivation for this) are
no longer a compiler FreeBSD supports.

PR:		263102 (exp-run)
Reviewed by:	brooks, imp
Differential Revision:	https://reviews.freebsd.org/D34797
2022-04-12 10:05:45 -07:00
John Baldwin
1c1bf5bd7c x86: Remove silly checks for <sys/cdefs.h>.
These headers #include <sys/cdefs.h> right after checking if it has
already been #included.  The nested #include already existed when the
check for _SYS_CDEFS_H_ was added, so the check shouldn't have been
added in the first place.

PR:		263102 (exp-run)
Reported by:	brooks
Reviewed by:	brooks, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D34796
2022-04-12 10:05:39 -07:00
John Baldwin
17554af4e8 ce,cp: Remove pointless checks for <sys/cdefs.h>
Both of these headers check for _SYS_CDEFS_H_ after including
<sys/param.h> which itself includes <sys/cdefs.h>.

PR:		263102 (exp-run)
Reviewed by:	brooks, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D34795
2022-04-12 10:05:34 -07:00
Tom Jones
1ea833a572 kdb: set kdb_why when entered via reboot and panic
Reviewed by:	jhb
Sponsored by:   NetApp, Inc.
Sponsored by:   Klara, Inc.
X-NetApp-PR:    #74
Differential Revision:	https://reviews.freebsd.org/D34551
2022-04-12 10:34:40 +01:00
Kristof Provost
742e7210d0 udp: allow udp_tun_func_t() to indicate it did not eat the packet
Allow udp tunnel functions to indicate they have not taken ownership of
the packet, and that normal UDP processing should continue.

This is especially useful for scenarios where the kernel has taken
ownership of a socket that was originally created by userspace. It
allows the tunnel function to pass through certain packets for userspace
processing.

The primary user of this is if_ovpn, when it receives messages from
unknown peers (which might be a new client).

Reviewed by:	tuexen
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D34883
2022-04-12 10:04:59 +02:00
Roger Pau Monné
b93f47eaee xen/acpi: upload Cx and Px data to Xen
When FreeBSD is running as dom0 (initial domain) on a Xen system it
has access to the native ACPI tables and is the OSPM. However the
hypervisor is the entity in charge of the CPU idle and frequency
states, and in order to perform this duty it requires information
found the ACPI dynamic tables that can only be parsed by the OSPM.

Introduce a new Xen specific ACPI driver to fetch the Processor
related information and upload it to Xen. Note that this driver needs
to take precedence over the generic ACPI CPU driver when running as
dom0, so downgrade the probe score of the native driver to
BUS_PROBE_DEFAULT in order for the Xen specific driver to use
BUS_PROBE_SPECIFIC.

Tested on an Intel NUC to successfully parse and upload both the Cx and
Px states to Xen.

Sponsored by: Citrix Systems R&D
Reviewed by: jhb kib
Differential revision: https://reviews.freebsd.org/D34841
2022-04-12 10:03:26 +02:00
Dmitry Chagin
673bce11ce linux(4): Copyout actual size of addr to the user space in accept().
Differential Revision:	https://reviews.freebsd.org/D34727
2022-04-11 23:33:27 +03:00
Dmitry Chagin
bb0f644cd6 linux(4): Limit user-supplied sockaddr length in recvfrom().
Differential Revision:	https://reviews.freebsd.org/D34726
2022-04-11 23:32:28 +03:00
Dmitry Chagin
68bfaefb3d linux(4): Remove unnecessary PTRIN(). 2022-04-11 23:32:02 +03:00
Dmitry Chagin
cf312f799a linux(4): Handle SO_DOMAIN in getsockopt syscall.
Differential revision:	https://reviews.freebsd.org/D34714
2022-04-11 23:31:28 +03:00
Dmitry Chagin
c6487446d7 getdirentries: return ENOENT for unlinked but still open directory.
To be more compatible to IEEE Std 1003.1-2008 (“POSIX.1”).

Reviewed by:		mjg, Pau Amma (doc)
Differential revision:  https://reviews.freebsd.org/D34680
MFC after:		2 weeks
2022-04-11 23:30:16 +03:00
Dmitry Chagin
bb46e9b510 linux(4): Prevent an attempt to copy an uninitialized source address.
PR:			259380
MFC after:		3 days
2022-04-11 23:29:45 +03:00
Mike Karels
6ca0ca7b4c IPv4 multicast: fix LOR in shutdown path
X_ip_mrouter_done() was calling the interface ioctl routines via
if_allmulti() while holding a write lock.  However, some interface
ioctl routines, including em/iflib and tap, use sxlocks, which are
not permitted while holding a non-sleepable lock, and this elicits
a warning from WITNESS.  Fix the locking issue by recording the
affected interface pointers in a malloc'ed array, and call
if_allmulti() on each after dropping the rwlock.

Reviewed by:	bz
Differential Revision: https://reviews.freebsd.org/D34845
2022-04-11 14:51:16 -05:00
Fernando Apesteguía
0f2041a5b0 [linprocfs] add sys/kernel/random/boot_id
This file holds a UUID that is invariant for every boot. In our case, it is
invariant per mount.

PR:	262369
Reported by:	sodynet1@gmail.com
Approved by:	dchagin@
Differential Revision:	https://reviews.freebsd.org/D34860
2022-04-11 18:23:28 +02:00
Kristof Provost
4496aecb56 pf: drain Ethernet rules cleanup before starting a new transaction
Inactive Ethernet rules get cleaned by a net_epoch callback. This
callback may still be pending when we try to start a new (pf rules)
transaction, causing it to fail.
This is especially likely to occur in scripted scenarios, such as the
regression tests.

Drain the epoch callbacks before starting a new transaction, ensuring
we've had the opportunity to clean up the inactive rules.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D34846
2022-04-11 15:47:57 +02:00
Tong Zhang
57f7a82fbb if_axgbe: properly release resource in error case
PR:		262899
Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34628
2022-04-11 09:52:32 -04:00
Andrey V. Elsukov
7d98cc096b Fix ipfw fwd that doesn't work in some cases
For IPv4 use dst pointer as destination address in fib4_lookup().
It keeps destination address from IPv4 header and can be changed
when PACKET_TAG_IPFORWARD tag was set by packet filter.

For IPv6 override destination address with address from dst_sa.sin6_addr,
that was set from PACKET_TAG_IPFORWARD tag.

Reviewed by:	eugen
MFC after:	1 week
PR:		256828, 261697, 255705
Differential Revision: https://reviews.freebsd.org/D34732
2022-04-11 14:16:43 +03:00
Andrey V. Elsukov
4763c0aa68 ipfw: fix matching and setting DSCP value for IPv6
Matching for DSCP codes has used incorrect bits. Use IPV6_DSCP()
macro for matching opcodes to fix this. Also this leads to always
use value from a mbuf instead of cached value.

Previously different opcodes have used both cached in f_id value
and stored in the mbuf, and it did not always work after setdscp
action, since cached value was not updated.

Update IPv6 flowid value cached in the f_id.flow_id6 when we do
modification of DSCP value in O_SETDSCP opcode, it may be used by
external modules.

Also added logging support for O_SETDSCP opcode.

Reviewed by:	kp
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D34807
2022-04-11 13:13:49 +03:00
Enji Cooper
567378cc07 Fix OID format for vm.swap_reserved and vm.swap_total
The correct OID format for CTLTYPE_U64 is `QU` (`uquad_t`), not `A`
(text expressed via `char *`).

This issue was noticed while doing an sysctl tree walk using a
sysctl(9) consumer that relies on the OID format to intuit what the
type should be for a given sysctl.

MFC after:	1 month
Sponsored by:	DellEMC Isilon
Differential Revision: https://reviews.freebsd.org/D34877
2022-04-10 18:17:09 -07:00
Robert Wing
d4e8207317 vmm_instruction_emul.c: fix bhyve build
The __diagused macro was used to cure a "set but not used" warning. This
broke the build for bhyve since __diagused is only defined in the
kernel. Define __diagused when not building the kernel.

Fixes:          5241577a22 ("vmm: fix set but not used warning")
Reported by:    Jenkins
2022-04-10 13:37:24 -08:00
Rick Macklem
5580e5bd71 nfscl: Clean up the code by removing unused arguments
The "void *stuff" (also called fstuff and dstuff) argument
was used by the Mac OSX port.  For FreeBSD, this argument
is always NULL, so remove it to clean up the code.

This commit gets rid of "stuff" for nfscl_request().
Future commits will do the same for other functions.
2022-04-10 14:05:44 -07:00
Robert Wing
5a17f489d5 vmm: fix set but not used warning 2022-04-10 10:30:19 -08:00
Robert Wing
5241577a22 vmm: fix set but not used warning 2022-04-10 10:30:16 -08:00
Robert Wing
3587bfa797 vmm: fix set but not used warning 2022-04-10 10:30:14 -08:00
Robert Wing
5c272efaba vmm: fix set but not used warnings 2022-04-10 10:30:11 -08:00
Robert Wing
f877977a03 vmm: fix set but not used warnings 2022-04-10 10:30:08 -08:00
Robert Wing
893a3dd697 vmm: fix set but not used warning 2022-04-10 10:30:05 -08:00
Andrew Turner
f3ef799f56 Only return a mapped address from efi_phys_to_kva
On some hardware the EFI system table is not in memory mapped in the
DMAP section. Rather than panic the kernel check if it is mapped and
return a failure if not from efi_phys_to_kva.

Reported by:	kevans
Differential Revision: https://reviews.freebsd.org/D34858
2022-04-10 09:41:54 +01:00
Andrew Turner
57e47ae514 Include the EFI Runtime Code in the DMAP
Some UEFI implementations place the system table in a runtime code
memory region. Include it in the DMAP so we can read it later.

Reviewed by:	kevans
Differential Revision: https://reviews.freebsd.org/D34861
2022-04-10 09:41:54 +01:00
Rick Macklem
38c3cf6aed nfscl: Clean up the code by removing unused arguments
The "void *stuff" (also called fstuff and dstuff) argument
was used by the Mac OSX port.  For FreeBSD, this argument
is always NULL, so remove it to clean up the code.

This commit gets rid of "stuff" for nfscl_postop_attr().
Future commits will do the same for other functions.
2022-04-09 18:53:25 -07:00
Rick Macklem
c45d934f6b nfscl: Ansify a function header 2022-04-09 15:14:05 -07:00
Konstantin Belousov
eca39864f7 Add sysctl KERN_LOCKF
reporting the shapshot of the active advisory locks.

A new VFS ops method vfs_report_lockf if provided in the mount point
op table.  If it is NULL, as it is currently for all existing
filesystems, vfs_report_lockf() function is used, which gathers
information from the standard implementation inside kern/kern_lockf.c.

Filesystems implementing its own locking (NFSv4 as example) can provide
a custom implementation.

Reviewed by:	markj, rmacklem
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D34756
2022-04-10 00:43:53 +03:00
Konstantin Belousov
6ead1379fd sys/user.h: Add kinfo_lockf structure to report advisory locks
Reviewed by:	markj, rmacklem
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D34756
2022-04-10 00:43:53 +03:00
Konstantin Belousov
147e4fe3f1 kern_lockf.c: remove no longer neeeded UFS headers
Reviewed by:	markj, rmacklem
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D34756
2022-04-10 00:43:53 +03:00
Konstantin Belousov
59e85819be lockf: remove lf_inode from struct lockf_entry
The UFS-specific struct inode cannot be used in generic advisory lock
code.  It was probably used as a shortcut for the debugging, as the
remnants of the code around it indicates.

Use somewhat more verbose and less concentrated, but universal,
VOP_PRINT(), where needed.

Reviewed by:	markj, rmacklem
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D34756
2022-04-10 00:43:53 +03:00
Konstantin Belousov
5c075d6404 ufs/acl.h: forward-declare struct inode
Right now it is incidentally declared in sys/lockf.h, which will be
corrected shortly.

Reviewed by:	markj, rmacklem
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D34756
2022-04-10 00:43:53 +03:00
Konstantin Belousov
8cc19b1e47 Style.
Reviewed by:	markj, rmacklem
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D34756
2022-04-10 00:43:53 +03:00
Gordon Bergling
ecbdfbfd18 netgraph(3): Remove a double word in a source code comment
- s/it it/it/

MFC after:	3 days
2022-04-09 14:41:40 +02:00
Gordon Bergling
d048e8c619 ofed: Fix a typo in a source code comment
- s/it it/it to/

MFC after:	3 days
2022-04-09 14:39:36 +02:00
Gordon Bergling
75e1650d7f bhnd(4): Remove a double word in a source code comment
- s/an an/an/

MFC after:	3 days
2022-04-09 14:31:19 +02:00
Gordon Bergling
9a22f7fb9d i386: Remove a double word in a source code comment
- s/an an/an/

MFC after:	3 days
2022-04-09 14:30:34 +02:00
Gordon Bergling
ffedb32dd3 pax(1): Remove a few double words in source code comments
- s/an an/an/

MFC after:	3 days
2022-04-09 14:27:39 +02:00
Gordon Bergling
a9f09d75dd netpfil: Remove a double word in a source code comment
- s/a a/a/

MFC after:	3 days
2022-04-09 14:20:09 +02:00
Gordon Bergling
f171938cd6 jail: Remove a double word in a source code comment
- s/a a/a/

MFC after:	3 days
2022-04-09 14:19:17 +02:00
Gordon Bergling
a37c6fcc46 mpt(4): Fix a typo in a source code comment
- s/proccessor/processor/

MFC after:	3 days
2022-04-09 14:10:05 +02:00
Gordon Bergling
2dd0c2bc7f tcp_bbr(4): Fix a typo in a source code comment
- s/possiblity/possibility/

MFC after:	3 days
2022-04-09 13:26:20 +02:00
Gordon Bergling
addb2c6585 tcp_rack: Fix a typo in a source code comment
- s/possiblity/possibility/

MFC after:	3 days
2022-04-09 13:25:50 +02:00
Gordon Bergling
77a44875e5 netgraph(4): Fix a typo in a source code comment
- s/peform/perform/

MFC after:	3 days
2022-04-09 11:40:14 +02:00
Gordon Bergling
1a15a383a6 net: Fix a typo in a source code comment
- s/peform/perform/

MFC after:	3 days
2022-04-09 11:37:57 +02:00
Gordon Bergling
6a734168cb al_eth: Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 11:06:18 +02:00
Gordon Bergling
5f93395f2f ce(4): Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 11:05:38 +02:00
Gordon Bergling
586023f10d iwm(4): Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 11:04:23 +02:00
Gordon Bergling
2e09a4ac3b usb(4): Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 11:02:23 +02:00
Gordon Bergling
10df4dc724 iscsi(4): Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 11:01:43 +02:00
Gordon Bergling
6de6c95691 ofed: Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 11:00:48 +02:00
Gordon Bergling
97d8c695cf sys: Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 10:58:31 +02:00
Gordon Bergling
db739f1c19 sfxge(4): Remove a double word in a few source code comments
- s/for for/for/

MFC after:	3 days
2022-04-09 10:57:31 +02:00
Gordon Bergling
6cff32b3c4 ath(4): Remove a double word in a few source code comments
- s/for for/for/

MFC after:	3 days
2022-04-09 10:55:00 +02:00
Gordon Bergling
bafe4cee3d ips(4): Remove a double word in a few source code comments
- s/for for/for/

MFC after:	3 days
2022-04-09 10:53:50 +02:00
Gordon Bergling
609e6f6d28 ena(4): Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 10:50:49 +02:00
Gordon Bergling
c3721292e3 kern: Remove a double word in a source code comment
- s/for for/for/

MFC after:	3 days
2022-04-09 10:50:04 +02:00
Gordon Bergling
74c6ca6fbf usb: Remove some double words in source code comments
- s/for for/for/

MFC after:	3 days
2022-04-09 10:34:48 +02:00
Gordon Bergling
efd0fdfe28 NOTES: Remove a double word in comments
- s/for for/for/

MFC after:	3 days
2022-04-09 10:31:49 +02:00
Gordon Bergling
237a666333 e1000: Fix a typos in source code comments
- s/negotation/negotiation/

MFC after:	3 days
2022-04-09 10:14:06 +02:00
Gordon Bergling
456b2bb97e cam(4): Remove a double word in a source code comment
- s/this this/this/

MFC after:	3 days
2022-04-09 10:13:59 +02:00
Gordon Bergling
c8c1c23a8c usb(4): Fix two typos in source code comments
- s/negotation/negotiation/

MFC after:	3 days
2022-04-09 10:13:52 +02:00
Gordon Bergling
d10abf84ad libkern: Fix two typos in source code comments
- s/noticably/noticeably/

MFC after:	3 days
2022-04-09 09:36:34 +02:00
Gordon Bergling
78fc83f096 qlnxe(4): Fix a typo in a source code comment
- s/mulitple/multiple/

MFC after:	3 days
2022-04-09 09:29:35 +02:00
Gordon Bergling
5158cf0a38 drm2: Fix a typo in a source code comment
- s/mmaping/mapping/

MFC after:	3 days
2022-04-09 09:28:14 +02:00
Gordon Bergling
060f5c02e9 bhnd(4): Remove some double words in source code comments
- s/be be/be/
- s/is is/is/

MFC after:	3 days
2022-04-09 09:26:50 +02:00
Gordon Bergling
8a1b8cf4be cxgbe(4): Fix a typo in a source code comment
- s/simultaniously/simultaneously/

MFC after:	3 days
2022-04-09 09:26:17 +02:00
Gordon Bergling
8ece7189e0 ice: Remove a double word in a source code comment
- s/is is/is/

MFC after:	3 days
2022-04-09 09:25:47 +02:00
Gordon Bergling
19ae05aad3 neta: Fix a typo in a source code comment
- s/maintance/maintenance/

MFC after:	3 days
2022-04-09 09:25:07 +02:00
Gordon Bergling
dfa01f4f98 nvme(4): Fix a typo in a source code comment
- s/is is/is/

MFC after:	3 days
2022-04-09 09:24:34 +02:00
Gordon Bergling
4e27f86733 sym(4): Fix a typo in a source code comment
- s/explicitely/explicitly/

MFC after:	3 days
2022-04-09 09:23:57 +02:00
Gordon Bergling
35fbe62477 sound(4): Fix a typo in a source code comment
- s/Miscellanious/Miscellaneous/

MFC after:	3 days
2022-04-09 09:23:37 +02:00
Gordon Bergling
d96159bff8 sfxge(4): Remove some double words in source code comments
- s/is is/is/

MFC after:	3 days
2022-04-09 09:23:15 +02:00
Gordon Bergling
474df59def random(3): Fix a typo in a source code comment
- s/psuedo/pseudo/

MFC after:	3 days
2022-04-09 09:14:22 +02:00
Gordon Bergling
768f9b8b8b kern: Fix a typo in a source code comment
- s/is is/is/

MFC after:	3 days
2022-04-09 09:14:14 +02:00
Gordon Bergling
f259d24fa5 powerpc: Fix two typos in source code comments
- s/mutiplying/multiplying/

MFC after:	3 days
2022-04-09 09:14:07 +02:00
Gordon Bergling
1cfd924f4e libalias(3): Fix two typos in source code comments
- s/modfied/modified/

MFC after:	3 days
2022-04-09 09:14:00 +02:00
Gordon Bergling
fb5a502692 net80211(4): Fix a typo in a source code comment
- s/is is/is/

MFC after:	3 days
2022-04-09 09:13:53 +02:00
Gordon Bergling
647baadf3c netpfil: Fix a typo in a source code comment
- s/maintance/maintenance/

MFC after:	3 days
2022-04-09 09:13:46 +02:00
Gordon Bergling
e0bdc8c515 eventhandler: Remove a double world in two comments
- s/be be/be/

MFC after:	3 days
2022-04-09 09:13:38 +02:00
Gordon Bergling
d4b3b0c2ef ufs: Fix a typo in a source code comment
- s/explicitely/explicitly/

MFC after:	3 days
2022-04-09 09:13:31 +02:00
Gordon Bergling
7f409fe7d8 ofed: Remove a double word in a source code comment
- s/is is/is/

MFC after: 3 days
2022-04-09 09:13:22 +02:00
Gordon Bergling
36814092d4 tcp_rack: Fix a few typos in sysctl descriptions and comments
- s/postion/position/
- s/postions/positions/
- s/repostion/reposition/

MFC after:	5 days
2022-04-09 09:13:10 +02:00
Gordon Bergling
1f2aaef29a tcp_htps: Fix a typo in a source code comment
- s/postion/position/

MFC after:	3 days
2022-04-09 09:12:58 +02:00
Gordon Bergling
665709016d tcp_bbr(4): Fix two typos in source code comments
- s/postive/positive/
- s/postion/position/

MFC after:	3days
2022-04-09 09:12:48 +02:00
Warner Losh
214df80a9c nvme: new define for size of host memory buffer sizes
The nvme spec defines the various fields that specify sizes for host
memory buffers in terms of 4096 chunks. So, rather than use a bare 4096
here, use NVME_HMB_UNITS. This is explicitly not the host page size of
4096, nor the default memory page size (mps) of the NVMe drive, but its
own thing and needs its own define.

No functional change is intended, only the logical spelling of 4k.

Sponsored by:		Netflix
2022-04-08 23:05:25 -06:00
John Baldwin
0d46a96abf arm ti: Remove unused variables. 2022-04-08 18:31:30 -07:00
John Baldwin
ce71fb38d9 ti_adc: Use void cast instead of a dummy variable. 2022-04-08 18:31:30 -07:00
John Baldwin
5431925300 ti_prm: Use existing dev in debug traces and remove unused sc. 2022-04-08 18:31:30 -07:00
John Baldwin
b03cdf3d30 arm ti_scm_syscon: Remove unused variable.
Note that bus_generic_probe never fails.
2022-04-08 18:31:30 -07:00
John Baldwin
f4bd36ba2a rk_usbphy: Remove unused variable. 2022-04-08 18:31:29 -07:00
John Baldwin
ba8c7454d1 cesa: Remove unused variable. 2022-04-08 18:31:29 -07:00
John Baldwin
438548300b ehci_imx: Remove unused variable. 2022-04-08 18:31:29 -07:00
John Baldwin
1624badace imx6_ssi: Remove unused variables, #if 0 variables only used under #if 0. 2022-04-08 18:31:29 -07:00
John Baldwin
4f6be8c788 bcm2835_audio_callback: Don't process garbage if there is no message.
If vchi_msg_dequeue failed due to an empty queue, return rather than
treating stack garbage as a valid message.
2022-04-08 18:31:29 -07:00
John Baldwin
4b9b6a501a arm/arm64 nvidia: Remove unused variables. 2022-04-08 18:31:29 -07:00
John Baldwin
c16bfb03cb arm mv: Remove unused variables. 2022-04-08 18:31:29 -07:00
John Baldwin
27f889cf41 if_mvneta: Remove unused variables. 2022-04-08 17:30:14 -07:00
John Baldwin
6a51437fa0 arm_add_efi_map_entries: Remove unused variable. 2022-04-08 17:30:14 -07:00
John Baldwin
eb13232e4b agp_nvidia: Replace a dummy variable to force a read with a void cast. 2022-04-08 17:30:14 -07:00
John Baldwin
6d2a46f0ab netmap: Move more_txspace and some_recvd under #ifdef SYNC_KLOOP_POLL. 2022-04-08 17:30:14 -07:00
John Baldwin
c25277bfff a37x0_xtal: Remove unused variable. 2022-04-08 17:25:15 -07:00
John Baldwin
38b36a2004 imx_clk_sscg: Remove unused variable. 2022-04-08 17:25:15 -07:00
John Baldwin
888a602959 imx_clk_composite: Mark two variables only used in debug traces as unused.
While here, make best_post_div track the best value of post_div rather
than pre_div so that the debug trace doesn't just print the same value
twice.
2022-04-08 17:25:15 -07:00
John Baldwin
34df2dfa51 bcm2835_gpio: Remove unused variable.
This was a static local (i.e. a global variable) which was probably
not intended.
2022-04-08 17:25:15 -07:00
John Baldwin
8d1e57a1a8 aw_clk_nkmp: Remove unused variables. 2022-04-08 17:25:15 -07:00
John Baldwin
2fb87f5147 uart_mu: Remove unused variables. 2022-04-08 17:25:15 -07:00
John Baldwin
6f1fe2a0d6 pci_host_generic_acpi: Remove unused variable. 2022-04-08 17:25:15 -07:00
John Baldwin
ae4bffd5d2 gpio pl061: Remove unused variables. 2022-04-08 17:25:14 -07:00
John Baldwin
67f6cad3ab coresight: Mark a variable only used in a debug trace as unused. 2022-04-08 17:25:14 -07:00
John Baldwin
d08cb45362 iflib: Use empty inline functions for prefetch*() on non-x86.
This avoids warnings about unused variables in expressions passed to
prefetch*().
2022-04-08 17:25:14 -07:00
John Baldwin
48c21c2155 tca6408: Remove unused variable. 2022-04-08 17:25:14 -07:00
John Baldwin
683ca8034d etherswitch: Remove unused variable. 2022-04-08 17:25:14 -07:00
John Baldwin
bce1b42f99 aw_gmacclk: Remove unused variables. 2022-04-08 17:25:14 -07:00
John Baldwin
a0aa910fd4 emac_drain_rxfifo: Use a void cast instead of a dummy variable. 2022-04-08 17:25:14 -07:00
John Baldwin
f6abb39b5d pci fdt host drivers: Remove unused variables. 2022-04-08 17:25:14 -07:00
John Baldwin
533b6ecfdc Pass the computed enum of the correct type to dbg_setup_watchpoint.
The two sets of constants happen to have the same values, so this is
just a cosmetic fix.
2022-04-08 17:25:14 -07:00
John Baldwin
0ed1db1aad arm bus_dma_tag_destroy: Move dmat_copy under #ifdef KTR. 2022-04-08 17:25:14 -07:00
John Baldwin
9c11e6af89 sbni: Use memset to clear flags structure in attach.
NFC, just less nausea-inducing.
2022-04-08 17:25:14 -07:00
John Baldwin
1d0cadccf8 sbni: Remove unused variable. 2022-04-08 17:25:14 -07:00
John Baldwin
9e70163017 i386 linux: Remove unused variables. 2022-04-08 17:25:14 -07:00
John Baldwin
b367bd1952 ce: Disable -Wunused-but-set-variable for obfuscated tau32-ddk.c. 2022-04-08 17:25:13 -07:00
John Baldwin
032253e1d2 tdfx: Mark a variable only used under a custom debug macro as unused. 2022-04-08 17:25:13 -07:00
John Baldwin
c1480b1702 i386 pmap: Re-quiet set but unused warnings.
__diagused no longer covers KTR, so use explicit #ifdef KTR instead.
2022-04-08 17:25:13 -07:00
John Baldwin
2e7838ae84 vm_phys_early_alloc: mem_index is only used under #ifdef NUMA.
Possibly mem_index should just reuse biggestone since this loop is
already reusing biggestsize.
2022-04-08 17:25:13 -07:00
John Baldwin
a7e1a58554 uma_zfree_smr: uz_flags is only used if NUMA is defined. 2022-04-08 17:25:13 -07:00
John Baldwin
3b994db74b Use stub inline functions for no-op versions of tcp_fastopen*().
Inline functions "use" variables passed as arguments unlike empty
macros appeasing compiler warnings about unused variables.
2022-04-08 17:25:13 -07:00
John Baldwin
5cd9d25403 aac: Move sge64 declaration into the #ifdef __amd64__ block. 2022-04-08 17:25:13 -07:00
John Baldwin
d557e89abb pf: Workaround set but unused warning.
The RB_NEXT macro does not use its middle argument since commit
5fce408cc4 in 2004 (which ironically
fixed an "unused parameter" warning by introducing this warning in all
consumers).  RB_PREV has also copied this unfortunate behavior of an
unused argument.

This results in 'parent' not being used.  To workaround, inline the
value of 'parent' as the second argument to RB_NEXT.

Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D34833
2022-04-08 17:25:13 -07:00
John Baldwin
834533b9c5 mlx5: Remove unused variables.
Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D34827
2022-04-08 17:25:13 -07:00
John Baldwin
6d018c93ea mlx4: Remove unused variables.
Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D34826
2022-04-08 17:25:13 -07:00
John Baldwin
516243545e mlx4: Remove a variable only used in commented-out code.
Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D34825
2022-04-08 17:25:13 -07:00
Bjoern A. Zeeb
978f25e840 LinuxKPI: 802.11: add ieee80211_beacon_get_tim(), ieee80211_sn_sub()
Add a dummy implementation for ieee80211_beacon_get_tim().
Add the implementation for ieee80211_sn_sub().

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2022-04-08 21:05:06 +00:00
Rick Macklem
21de450aa1 nfscl: Add support for a NFSv4 AppendWrite RPC
For IO_APPEND VOP_WRITE()s, the code first does a
Getattr RPC to acquire the file's size, before it
can do the Write RPC.

Although NFS does not have an append write operation,
an NFSv4 compound can use a Verify operation to check
that the client's notion of the file's size is
correct, followed by the Write operation.

This patch modifies nfscl_wcc_data() to optionally
acquire the file's size, for use with an AppendWrite.
Although the "stuff" arguments are always NULL
(these were used for the Mac OSX port and should be
cleared out someday), make the argument to
nfscl_wcc_data() explicitly NULL for clarity.

This patch does not cause any semantics change until
the AppendWrite is added in a future commit.
2022-04-08 13:59:05 -07:00
Gordon Bergling
4d6883cbe2 tcp_bbr(4): Fix a typo in a sysctl description and a comment
- s/postive/positive/

MFC after:	5 days
2022-04-08 21:08:18 +02:00
John Baldwin
6a33ecdc2f Fix a typo in previous commit.
Reported by:	npn
Pointy hat to:	jhb
Fixes:		572edd3dae vmm: Re-quiet set but unused warnings.
2022-04-08 12:01:33 -07:00
Bjoern A. Zeeb
97f2e93a66 LinuxKPI: add ALIGN_DOWN()
Add ALIGN_DOWN as rounddown2() along ALIGN() which is implemented as
roundup2().

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	manu, hselasky (now with less ())
Differential Revision: https://reviews.freebsd.org/D34844
2022-04-08 18:27:49 +00:00
Chuck Silvers
3dc5f8e19d ffs: wait for trims earlier during unmount to avoid panic
All softdep processing is supposed to be completed by
softdep_flushfiles() and no more deps are supposed to be created after
that, but if a pending trim completes after softdep_flushfiles() and
before softdep_unmount() then the blkfree that is performed by
ffs_blkfree_trim_task() will create a dep when none should exist, and
if softdep_unmount() is called before that dep is freed then the
kernel will panic.  Prevent this by waiting for trims to complete
earlier in the unmount process, in ffs_flushfiles(), so that any deps
will be freed and any modified CG buffers will be flushed by the final
fsync of the devvp in ffs_flushfiles() as intended.

Reviewed by:	mckusick, kib
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D34806
2022-04-08 10:19:40 -07:00
Mark Johnston
aa597d4049 i386: Fix the nodevice apic build
PR:		263124
Fixes:		62d09b46ad ("x86: Defer LAPIC calibration until after timecounters are available")
Reviewed by:	kib, jhb, emaste
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34830
2022-04-08 11:47:52 -04:00
Mark Johnston
990a6d18b0 net: Fix memory leaks in lltable_calc_llheader() error paths
Also convert raw epoch_call() calls to lltable_free_entry() calls, no
functional change intended.  There's no need to asynchronously free the
LLEs in that case to begin with, but we might as well use the lltable
interfaces consistently.

Noticed by code inspection; I believe lltable_calc_llheader() failures
do not generally happen in practice.

Reviewed by:	bz
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34832
2022-04-08 11:47:25 -04:00
Mark Johnston
dd91d84486 net: Fix LLE lock leaks
Historically, lltable_try_set_entry_addr() would release the LLE lock
upon failure.  After some refactoring, it no longer does so, but
consumers were not adjusted accordingly.

Also fix a leak that can occur if lltable_calc_llheader() fails in the
ARP code, but I suspect that such a failure can only occur due to a code
bug.

Reviewed by:	bz, melifaro
Reported by:	pho
Fixes:		0b79b007eb ("[lltable] Restructure nd6 code.")
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34831
2022-04-08 11:46:19 -04:00
Bjoern A. Zeeb
3443476ca9 rtw88: downgrade rtw8822c firmware to 9.9.10
Firmware version 9.9.11 added support for hw_scan and is reportedly
causing more problems than 9.9.10 does.  Until we get a chance to
test this out downgrade the firmware in order to help people testing
more.

Sponsored by:	The FreeBSD Foundation
PR:		248235
MFC after:	2 days
X-MFC:		just to get the reminder with the original commit
X-MFC with:	73d4ebea35
2022-04-08 11:14:54 +00:00
Bjoern A. Zeeb
170acccf1e LinuxKPI: 802.11: further fix RSSI calculations
60970a328e did one half of the job
of making rssi relative to nf and numbers for radiotap were fine.
net80211 internally works with .5 dBm units thus we need to apply a
* 2 to the value we pass in to c_rssi;  leave a comment explaining.

Note: it is only ifconfig in user space which re-adjust it for printing
or contrib/wpa for calculations.  Other applications getting values
from kernel also have to apply the maths.

In collaboration with:	J.R. Oldroyd (fbsd opal.com)
Sponsored by:		The FreeBSD Foundation
MFC after:		3 days
2022-04-08 11:06:58 +00:00
John Baldwin
0c348b97eb zfs: Disable -Wunused-but-set-variable for a few files in zstd.
FSE_createCTable raises the warning because we stub out malloc() to
NULL in the kernel, so the passed in size is unused.

ZSTD_seqDecompressedSize has a variable whose value is only used in
assertions.

NB: These files are missing corresponding entries in sys/conf/files.
2022-04-07 17:01:29 -07:00
John Baldwin
0768536d19 vmci: Remove unused variables. 2022-04-07 17:01:29 -07:00
John Baldwin
a7d876f701 vmm amdvi: Move ctrl under #ifdef AMDVI_DEBUG_CMD. 2022-04-07 17:01:29 -07:00
John Baldwin
572edd3dae vmm: Re-quiet set but unused warnings.
__diagused is no longer used for KTR, so instead use #ifdef KTR or
expand KTR-only variables into their values in traces.
2022-04-07 17:01:29 -07:00
John Baldwin
197b9a2ef0 atp: Remove unused variable. 2022-04-07 17:01:29 -07:00
John Baldwin
7295403595 if_urtw: Remove unused variables. 2022-04-07 17:01:29 -07:00
John Baldwin
d62a6ff38b if_upgt: Remove unused variables. 2022-04-07 17:01:29 -07:00
John Baldwin
08ff11e524 tpm: Remove unused variables.
All of the legacy config stuff in tpm seems broken.  Nothing ever sets
tpm_enabled to a non-zero value and the legacy bits expect tpm_enabled
to be set to the base IO port address (I think).
2022-04-07 17:01:29 -07:00
John Baldwin
2d9ae66d02 splash_pcx: Remove unused variables. 2022-04-07 17:01:29 -07:00
John Baldwin
bdfc2fc0c4 pcm mss: Quiet unused variable warnings.
- Remove dummy variable for a register read.  Keep the register
  read despite the dubious comment.

- Move all references to set_res under #if 0.
2022-04-07 17:01:29 -07:00
John Baldwin
eda611e45e pcm via82c686: Remove unused variables. 2022-04-07 17:01:29 -07:00
John Baldwin
11fd7ec044 pcm hdspe: Remove unused variable. 2022-04-07 17:01:29 -07:00
John Baldwin
92e7c96648 pcm envy24: Remove some dead code and associated unused variables.
The dead code was commented out in the initial import and hasn't
changed since.
2022-04-07 17:01:29 -07:00
John Baldwin
0025422091 pcm emu10k1: Remove dead code in channel_setblocksize callbacks. 2022-04-07 17:01:29 -07:00
John Baldwin
3e4aa9c629 pcm atiixp: Remove dead variable.
The Linux driver clears ATI_REG_CMD_AC_RESET and sets
ATI_REG_CMD_POWERDOWN, so writing the calculated value that sets both
would seem to be wrong.  This could be updated to match Linux's
behavior, but instead I've just left it as-is.
2022-04-07 17:01:28 -07:00
John Baldwin
771e4a8613 smbfs: Remove unused variable. 2022-04-07 17:01:28 -07:00
John Baldwin
9fe2867ce4 smbfs_rename: Move all references to flags under #ifdef notnow. 2022-04-07 17:01:28 -07:00
John Baldwin
3797f43e91 sgx: Remove unused variable. 2022-04-07 17:01:28 -07:00
John Baldwin
74f1cd7bd6 sfxge: Remove unused variables. 2022-04-07 17:01:28 -07:00
John Baldwin
50e3b6aa48 rtwn: Restore RF_ENV control type after initializing RF.
Both rwlwifi in Linux and rtwn in OpenBSD restore this register,
and the existing code was saving the value and not using it.

Reported by:	-Wunused-but-set-variable
Reviewed by:	imp
Obtained from:	OpenBSD
Differential Revision:	https://reviews.freebsd.org/D34838
2022-04-07 17:01:28 -07:00
John Baldwin
6d0a82ffc7 krping: Remove unused variable. 2022-04-07 17:01:28 -07:00
John Baldwin
5bf982c162 qlxge: Remove unused variables. 2022-04-07 17:01:28 -07:00
John Baldwin
9fa72d33d9 qlxgbe: Remove unused variables. 2022-04-07 17:01:28 -07:00
John Baldwin
10e3e53dd4 qlxgbe: Use select_value_count variable. 2022-04-07 17:01:28 -07:00
John Baldwin
ec86afafbb qlxgb: Remove unused variables. 2022-04-07 17:01:28 -07:00
John Baldwin
c9bbf99be0 qlnx: Disable unused by set warnings for ecore_ll2.c.
The OSAL_SPIN_LOCK_IRQSAVE macros take a flags argument that is unused
on FreeBSD (but used on other platforms).
2022-04-07 17:01:28 -07:00
John Baldwin
eb147f78a4 qlnx: Mark variables only used in debug traces as unused. 2022-04-07 17:01:28 -07:00
John Baldwin
ee07d71213 qlnx: Return error from qlnxr_mod_load if it fails.
Fix qlnx_rdma_register_if return ENXIO rather than -1 on error and
propagate that error to the caller in qlnxr_mod_load.
2022-04-07 17:01:27 -07:00