[Midnightbsd-cvs] [MidnightBSD/src] 0e3cb8: Import freebsd 12-stable fixes from july 17-Sep 4 ...
Lucas Holt
noreply at github.com
Tue May 9 15:17:25 EDT 2023
Branch: refs/heads/master
Home: https://github.com/MidnightBSD/src
Commit: 0e3cb843f7de7bda8f8255d24a22bf7f85cfbba3
https://github.com/MidnightBSD/src/commit/0e3cb843f7de7bda8f8255d24a22bf7f85cfbba3
Author: Lucas Holt <luke at foolishgames.com>
Date: 2023-05-09 (Tue, 09 May 2023)
Changed paths:
M Makefile.inc1
M contrib/blacklist/bin/blacklistd.conf.5
M contrib/blacklist/lib/bl.c
M lib/clang/llvm.build.mk
M lib/libpathconv/abs2rel.3
M lib/libpathconv/rel2abs.3
M lib/libprocstat/libprocstat.h
M lib/libutil/login_tty.3
M lib/msun/src/math.h
M lib/msun/src/s_cbrt.c
M lib/msun/src/s_cbrtl.c
M libexec/ftpd/Makefile
M libexec/ftpd/Makefile.depend
M libexec/rc/rc.d/wpa_supplicant
M sbin/ifconfig/ifconfig.8
M sbin/pfctl/parse.y
M sbin/pfctl/pfctl_altq.c
M sbin/pfctl/pfctl_parser.c
M share/dict/web2
M share/man/man4/ip6.4
M share/man/man4/unix.4
M share/man/man4/vt.4
M share/man/man5/rc.conf.5
M share/man/man5/sysctl.conf.5
M share/man/man5/tmpfs.5
M share/man/man8/rescue.8
M share/misc/bsd-family-tree
M stand/i386/boot2/boot2.c
M sys/amd64/amd64/pmap.c
M sys/amd64/vmm/io/ppt.c
M sys/arm/allwinner/aw_if_dwc.c
M sys/arm/mv/mv_common.c
M sys/arm64/arm64/db_trace.c
M sys/arm64/rockchip/rk_spi.c
M sys/cam/scsi/scsi_pass.c
M sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
M sys/cddl/dev/dtmalloc/dtmalloc.c
M sys/cddl/dev/dtrace/arm/dtrace_subr.c
M sys/cddl/dev/dtrace/dtrace_unload.c
M sys/cddl/dev/dtrace/powerpc/dtrace_subr.c
M sys/cddl/dev/dtrace/riscv/dtrace_subr.c
M sys/cddl/dev/fbt/fbt.c
M sys/cddl/dev/profile/profile.c
M sys/cddl/dev/prototype.c
M sys/compat/linux/linux_util.c
M sys/conf/kern.mk
M sys/ddb/db_lex.c
M sys/dev/acpica/acpi_pci_link.c
M sys/dev/acpica/acpi_timer.c
M sys/dev/agp/agp.c
M sys/dev/alc/if_alc.c
M sys/dev/bce/if_bce.c
M sys/dev/bhnd/nvram/bhnd_nvram_data_bcmraw.c
M sys/dev/cxgb/common/cxgb_common.h
M sys/dev/cxgb/cxgb_sge.c
M sys/dev/cxgbe/t4_tracer.c
M sys/dev/drm2/drm_fb_helper.c
M sys/dev/dwc/if_dwc.c
M sys/dev/dwc/if_dwc.h
M sys/dev/ena/ena.c
M sys/dev/ena/ena.h
M sys/dev/ena/ena_datapath.c
M sys/dev/ena/ena_datapath.h
M sys/dev/ena/ena_netmap.c
M sys/dev/ena/ena_netmap.h
M sys/dev/ena/ena_rss.c
M sys/dev/ena/ena_rss.h
M sys/dev/ena/ena_sysctl.c
M sys/dev/ena/ena_sysctl.h
M sys/dev/fb/fbd.c
M sys/dev/firewire/fwohci.c
M sys/dev/gpio/gpioc.c
M sys/dev/hwpmc/hwpmc_logging.c
M sys/dev/hwpmc/hwpmc_mod.c
M sys/dev/hwpmc/hwpmc_x86.c
M sys/dev/isci/scil/sati_util.c
M sys/dev/iscsi/icl_soft.c
M sys/dev/malo/if_malo.c
M sys/dev/mfi/mfi.c
M sys/dev/mfi/mfireg.h
M sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c
M sys/dev/mthca/mthca_cmd.c
M sys/dev/mwl/if_mwl.c
M sys/dev/netmap/if_re_netmap.h
M sys/dev/nvd/nvd.c
M sys/dev/ocs_fc/ocs_cam.c
M sys/dev/pms/RefTisa/tisa/sassata/common/tdsatypes.h
M sys/dev/qat/qatvar.h
M sys/dev/qlnx/qlnxe/ecore_int.c
M sys/dev/sfxge/common/efsys.h
M sys/dev/smartpqi/smartpqi_helper.c
M sys/dev/speaker/spkr.c
M sys/dev/usb/input/atp.c
M sys/dev/vt/vt_core.c
M sys/dev/xen/blkback/blkback.c
M sys/dev/xen/blkfront/blkfront.c
M sys/dev/xen/control/control.c
M sys/fs/fuse/fuse_device.c
M sys/fs/fuse/fuse_internal.c
M sys/fs/fuse/fuse_io.c
M sys/fs/fuse/fuse_ipc.h
M sys/fs/fuse/fuse_node.c
M sys/fs/fuse/fuse_vnops.c
M sys/fs/nfs/nfs_commonkrpc.c
M sys/fs/nfsclient/nfs_clkdtrace.c
M sys/fs/nfsclient/nfs_clrpcops.c
M sys/fs/nullfs/null_vnops.c
M sys/geom/geom_dev.c
M sys/geom/geom_event.c
M sys/geom/geom_io.c
M sys/geom/geom_subr.c
M sys/isa/pnp.c
M sys/kern/imgact_elf.c
M sys/kern/kern_cons.c
M sys/kern/kern_dtrace.c
M sys/kern/kern_poll.c
M sys/kern/kern_resource.c
M sys/kern/kern_umtx.c
M sys/kern/subr_autoconf.c
M sys/kern/sysv_msg.c
M sys/kern/vfs_bio.c
M sys/kern/vnode_if.src
M sys/modules/iscsi/Makefile
M sys/modules/zlib/Makefile
M sys/net/altq/altq_hfsc.c
M sys/net/if_lagg.c
M sys/net/if_vlan.c
M sys/net/iflib.c
M sys/net80211/ieee80211_proto.c
M sys/netgraph/ng_base.c
M sys/netinet/sctp_indata.c
M sys/netinet/sctp_output.c
M sys/netinet/sctp_pcb.c
M sys/netinet/sctp_sysctl.c
M sys/netinet/sctp_timer.c
M sys/netinet/tcp_hpts.c
M sys/netinet/tcp_log_buf.c
M sys/netinet/tcp_stacks/rack.c
M sys/netinet6/nd6.c
M sys/netipsec/ipsec_mbuf.c
M sys/netipsec/key.c
M sys/netipsec/key_debug.c
M sys/netpfil/ipfw/ip_dummynet.c
M sys/netpfil/ipfw/ip_fw_iface.c
M sys/netpfil/ipfw/ip_fw_sockopt.c
M sys/netpfil/pf/if_pfsync.c
M sys/netpfil/pf/pf.c
M sys/netpfil/pf/pf_if.c
M sys/ofed/drivers/infiniband/core/ib_addr.c
M sys/opencrypto/criov.c
M sys/powerpc/aim/aim_machdep.c
M sys/powerpc/booke/mp_cpudep.c
M sys/riscv/riscv/db_trace.c
M sys/rpc/auth_none.c
M sys/rpc/rpcb_clnt.c
M sys/rpc/svc_vc.c
M sys/sys/time.h
M sys/ufs/ufs/ufs_dirhash.c
M sys/vm/vm_fault.c
M tests/sys/cddl/zfs/bin/readmmap.c
M tests/sys/fs/fusefs/create.cc
M tests/sys/fs/fusefs/destroy.cc
M tests/sys/fs/fusefs/dev_fuse_poll.cc
M tests/sys/fs/fusefs/forget.cc
M tests/sys/fs/fusefs/link.cc
M tests/sys/fs/fusefs/lookup.cc
M tests/sys/fs/fusefs/mkdir.cc
M tests/sys/fs/fusefs/mknod.cc
M tests/sys/fs/fusefs/mockfs.cc
M tests/sys/fs/fusefs/mockfs.hh
M tests/sys/fs/fusefs/rename.cc
M tests/sys/fs/fusefs/symlink.cc
M tests/sys/fs/fusefs/utils.cc
M tests/sys/fs/fusefs/write.cc
M tests/sys/sys/Makefile
A tests/sys/sys/time_test.c
M tools/test/upsdl/upsdl.c
M usr.bin/find/find.1
M usr.bin/minigzip/minigzip.1
M usr.bin/protect/protect.1
M usr.bin/vtfontcvt/vtfontcvt.c
M usr.sbin/bhyve/pci_e82545.c
M usr.sbin/bhyve/pci_xhci.c
M usr.sbin/bluetooth/bthidd/server.c
M usr.sbin/bsdinstall/bsdinstall.8
M usr.sbin/jail/jail.8
M usr.sbin/mfiutil/mfiutil.8
M usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c
M usr.sbin/uhsoctl/uhsoctl.1
M usr.sbin/wpa/Makefile.inc
Log Message:
-----------
Import freebsd 12-stable fixes from july 17-Sep 4 2022 (#178)
* Merge fix for zfs readmmap test from CheriBSD
Merge commit 1737d8397a0 by Brooks Davis:
time() is declared in time.h
This fixes a -Werror warning from clang 15:
tests/sys/cddl/zfs/bin/readmmap.c:97:9: error: call to undeclared function 'time'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
Obtained from: https://github.com/CTSRD-CHERI/cheribsd/commit/1737d8397a0
MFC after: 3 days
(cherry picked from commit 47be48457393ba6747cc3144272b1f4d8b9077fb)
* Adjust parse() definition in boot2 to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
stand/i386/boot2/boot2.c:358:6: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
This is because parse() is declared with a (void) argument list, and
defined with an empty argument list. Make the definition match the
declaration.
MFC after: 3 days
(cherry picked from commit e60f6384f9dbe3abe83e59acf0997c591752ff81)
* WPA_DISTDIR does not need to end in a slash
Since all uses of the macro also append a slash, this leads to double
slashes.
MFC after: 3 days
(cherry picked from commit 9917049b60f7cf7345a09d2bc22d51764a477984)
* Remove unused but set variable in cxgb_sge
Clang 15 warns:
sys/dev/cxgb/cxgb_sge.c:1290:21: error: variable 'txsd' set but not used [-Werror,-Wunused-but-set-variable]
struct tx_sw_desc *txsd = &txq->sdesc[txqs->pidx];
^
It appears 'txsd' is a leftover from a previous refactoring (see
3f345a5d09b6), but is no longer used for anything, and can be removed
without any functional change.
MFC after: 3 days
Reviewed by: np
Differential Revision: https://reviews.freebsd.org/D35833
(cherry picked from commit cab040039d6fe1b2a6de8f2ba2cc882c313d3c75)
* Adjust agp_find_device() definition in agp.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/dev/agp/agp.c:910:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
agp_find_device()
^
void
This is because agp_find_device() is declared with a (void) argument
list, and defined with an empty argument list. Make the definition match
the declaration.
MFC after: 3 days
(cherry picked from commit c0817e2aba26ceb683e9c649c22d7fcd9a921231)
* jail.8: Fix formatting of synopsis and some code examples
MFC after: 3 days
(cherry picked from commit 203be0938dc5e1bd46b028f72077f8531e98a6cd)
* protect.1: document existence of _oomprotect
Improve discoverability of the functionality by mentioning in the
userland tool manual. Add a SEE ALSO entry to rc.conf(5) where more
details are provided.
Sponsored by: Fudo Security (a.wolk)
Differential Revision: https://reviews.freebsd.org/D30334
(cherry picked from commit c8b6be0f7d1b92d11b279761685f61f6702700a1)
* protect(1): Correct typo and add newline
Fix a typo, and move a sentence onto a new line in accordance with
mdoc(7) syntax.
While here, also remember to bump .Dd accordingly, as it was missed in
the prior commit.
Reported by: maxim@
(cherry picked from commit bd1eafcdd02a6f559844aafe0dd0df34a356259d)
* protect.1: Improve synopsis
While here, make the list's -width argument a bit shorter for
readability.
MFC after: 3 days
(cherry picked from commit cb56f86025b88bc4174aa668b3966886b8420955)
* protect.1: Document that protect(1) does not work in jails
The reason is that in order to protect a process procctl(2) needs
the PRIV_VM_MADV_PROTECT privilege, which is currently denied in jails
(see kern_jail.c).
MFC after: 1 week
(cherry picked from commit 6452fb1e87ed9d00b52fa1e63e7c3a7516c9586c)
* rc.conf.5: -Tlint fixes.
(cherry picked from commit 2ce58512957ec373abfb71712687d7e7b6abea82)
* rc.conf(5): Add _limits, _login_class, and _oomprotect
Add a few very useful variables that might easily be overlooked, since
they're only documented in rc.subr(8) which might not be the first place
that people look.
At least _oomprotect has existed since 11.0-RELEASE, and doesn't appear
to be very well-known. While the others aren't as new, in my estimation,
a lot more people would use them if they knew about them.
While here, also add a reference to rc.subr(8) and login.conf(5), and
sort the variables alphabetically.
Reported by: Daniel Dettlaff <dmilith at gmail.com>
Reviewed by: ceri, gbe, 0mp, ygy, a.wolk, pauamma
(cherry picked from commit bd6dce978c1a4d4472c98ff5685de3c2f2bd0203)
* rc.conf.5: Improve documentation of <name>_oomprotect
Apart from improving readability, this commit mentions that
<name>_oomprotect is ignored in a jail environment. Also, replace
${name}_cmd with the correct ${argument}_cmd and point the reader to
rc.subr(8).
MFC after: 1 week
(cherry picked from commit df1817a81e891c4850157e7f21f94b113d663bec)
* sysctl.conf.5: Document rc.d/sysctl and rc.d/sysctl_lastload
Also, update the BUGS section. The example describes an issue, which is
not true anymore thanks to sysctl_lastload. Point readers to rcorder(8)
instead.
MFC after: 2 weeks
(cherry picked from commit 383ccaa4050e3cbbd8ce8163c8aebd07c3d94ab1)
* rescure.8: Do not recommend release artifact disc2
The FreeBSD project does not publish disc2 image anymore.
MFC after: 2 weeks
(cherry picked from commit 7963c02c9bc222e8ac8c1a3acb87451bd74b9733)
* Adjust dtrace_unload() definition to avoid clang 15 warning
With clang 15, the following -Werror warnings is produced:
In file included from sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c:18440:
sys/cddl/dev/dtrace/dtrace_unload.c:26:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
dtrace_unload()
^
void
This is because dtrace_unload() is declared with a (void) argument list,
but defined with an empty argument list. Make the definition match the
declaration.
MFC after: 3 days
(cherry picked from commit 6f5f44562a72e739a39057a4661a56498e4c79b5)
* Adjust dtmalloc_unload() definition to avoid clang 15 warning
With clang 15, the following -Werror warnings is produced:
sys/cddl/dev/dtmalloc/dtmalloc.c:177:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
dtmalloc_unload()
^
void
This is because dtmalloc_unload() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.
MFC after: 3 days
(cherry picked from commit a0c55bac79ef684db5f3645fdc1e0fd8da827985)
* Adjust fbd_list() definition to avoid clang 15 warning
With clang 15, the following -Werror warnings is produced:
sys/dev/fb/fbd.c:205:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
fbd_list()
^
void
This is because fbd_list() is declared with a (void) argument list, but
defined with an empty argument list. Make the definition match the
declaration.
MFC after: 3 days
(cherry picked from commit 9863e501c8d482dc47e856a2778dc3cbf6eb6d22)
* Adjust dtrace_getf_barrier() definition to avoid clang 15 warning
With clang 15, the following -Werror warnings is produced:
sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c:17019:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
dtrace_getf_barrier()
^
void
This is because dtrace_getf_barrier() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.
MFC after: 3 days
(cherry picked from commit bd0e3cc2e71079f54785b7a395faf3a66426936e)
* Adjust dtnfsclient_unload() definition to avoid clang 15 warning
With clang 15, the following -Werror warnings is produced:
sys/fs/nfsclient/nfs_clkdtrace.c:544:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
dtnfsclient_unload()
^
void
This is because dtnfsclient_unload() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.
MFC after: 3 days
(cherry picked from commit 276099434d35b0abd09da946f06c8b8d9765452b)
* Remove unnecessary const and volatile qualifiers from __fp_type_select()
Since https://github.com/llvm/llvm-project/commit/ca75ac5f04f2, clang 15
has a new warning about _Generic selection expressions, such as used in
math.h:
lib/libc/gdtoa/_ldtoa.c:82:10: error: due to lvalue conversion of the controlling expression, association of type 'volatile float' will never be selected because it is qualified [-Werror,-Wunreachable-code-generic-assoc]
switch (fpclassify(u.e)) {
^
lib/msun/src/math.h:109:2: note: expanded from macro 'fpclassify'
__fp_type_select(x, __fpclassifyf, __fpclassifyd, __fpclassifyl)
^
lib/msun/src/math.h:85:14: note: expanded from macro '__fp_type_select'
volatile float: f(x), \
^
This is because the controlling expression always undergoes lvalue
conversion first, dropping any cv-qualifiers. The 'const', 'volatile',
and 'volatile const' associations will therefore never be used.
MFC after: 1 week
Reviewed by: theraven
Differential Revision: https://reviews.freebsd.org/D35815
(cherry picked from commit e50027e38d4f93887691f87b024e0abf37e98c78)
* Adjust profile_unload() definition to avoid clang 15 warning
With clang 15, the following -Werror warnings is produced:
sys/cddl/dev/profile/profile.c:640:15: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
profile_unload()
^
void
This is because profile_unload() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.
MFC after: 3 days
(cherry picked from commit 2d03b58f9a3d5ec1deb35de594fcee22d06bfbb2)
* Adjust db_flush_line() definition to avoid clang 15 warning
With clang 15, the following -Werror warnings is produced:
sys/ddb/db_lex.c:94:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
db_flush_line()
^
void
This is because db_flush_line() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.
MFC after: 3 days
(cherry picked from commit 939cb349b2ca4d3fcdc72ab1258eadee5e54881c)
* Adjust t4_tracer_mod{load,unload}() definitions to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/dev/cxgbe/t4_tracer.c:234:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
t4_tracer_modload()
^
void
sys/dev/cxgbe/t4_tracer.c:243:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
t4_tracer_modunload()
^
void
This is because t4_tracer_modload() and t4_tracer_modunload() are
declared with a (void) argument list, but defined with an empty argument
list. Make the definitions match the declarations.
MFC after: 3 days
(cherry picked from commit 54e5efb2643ec5f4bf40fef2a1937cd5449a58a0)
* Adjust prototype_unload() definition to avoid clang 15 warning
With clang 15, the following -Werror warnings is produced:
sys/cddl/dev/prototype.c:99:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
prototype_unload()
^
void
This is because prototype_unload() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.
MFC after: 3 days
(cherry picked from commit 9a979788832e1c31d58923e4c780a6c4b05335d0)
* Suppress unused variable warning in mfi.c
With clang 15, the following -Werror warnings are produced:
sys/dev/mfi/mfi.c:3698:6: error: variable 'timedout' set but not used [-Werror,-Wunused-but-set-variable]
int timedout;
^
sys/dev/mfi/mfi.c:3742:6: error: variable 'timedout' set but not used [-Werror,-Wunused-but-set-variable]
int timedout = 0;
^
Here, 'timedout' are variables that are only used when debugging,
requiring #if 0 statements to be modified. Mark the variables as
potentially unused, to suppress the warnings.
MFC after: 3 days
(cherry picked from commit 3dbe05f61b65a73582aefdc2ee5a50ad2b4390ef)
* Suppress unused variable warning in if_malo.c
With clang 15, the following -Werror warning is produced:
sys/dev/malo/if_malo.c:1573:8: error: variable 'ix' set but not used [-Werror,-Wunused-but-set-variable]
u_int ix;
^
Here, 'ix' is a variable that is only used when MALO_DEBUG is defined.
Mark the variable as potentially unused, to suppress the warning.
MFC after: 3 days
(cherry picked from commit 218634014374de0032fcdd56656ed6b3650634d2)
* Suppress unused variable warning in ip_dummynet.c
With clang 15, the following -Werror warning is produced:
sys/netpfil/ipfw/ip_dummynet.c:802:6: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable]
int n = 0; /* only for stats */
^
Here, 'n' is a variable that is only used when debugging. Mark the
variable as potentially unused, to suppress the warning.
MFC after: 3 days
(cherry picked from commit 5c329f0a4d32cec54250ec2d3f61455e85137a6f)
* Fix unused variable warning in if_alc.c
With clang 15, the following -Werror warning is produced:
sys/dev/alc/if_alc.c:3441:6: error: variable 'prog' set but not used [-Werror,-Wunused-but-set-variable]
int prog;
^
The 'prog' variable seems to be a left-over from some debugging code
that no longer exists, and can be removed without any functional change.
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D35831
(cherry picked from commit 64741244fc4588eefd954948b77ddf2706448ecd)
* Adjust nvd_{load,unload}() definitions to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/dev/nvd/nvd.c:150:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
nvd_load()
^
void
sys/dev/nvd/nvd.c:166:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
nvd_unload()
^
void
This is because nvd_load() and nvd_unload() are declared with a (void)
argument list, but defined with an empty argument list. Make the
definitions match the declarations.
MFC after: 3 days
(cherry picked from commit c46c9b3f5f1eb5575a5e42f52872dbea9cf7516f)
* Suppress unused variable warning in if_mwl.c
With clang 15, the following -Werror warning is produced:
sys/dev/mwl/if_mwl.c:3445:8: error: variable 'ix' set but not used [-Werror,-Wunused-but-set-variable]
u_int ix;
^
Here, 'ix' is a variable that is only used when debugging. Mark the
variable as potentially unused, to suppress the warning.
MFC after: 3 days
(cherry picked from commit 52c80d495a1b9dc756452ebcbb945906ea3cf23a)
* nfscl: Fix setting of nfsess_defunct for nfscl_hasexpired()
Commit a7bb120f8b87 added a printf for the case where recovery
has not marked the session defunct by setting nfsess_defunct
to 1. It turns out that nfscl_hasexpired() calls
nfsrpc_setclient() directly, without setting nfsess_defunct.
This patch replaces the printf with code that sets
nfsess_defunct to 1 to handle this case.
If SIGTERM is issued to a process when it is doing I/O on
an "intr" mount, the NFSv4 server may reply NFSERR_BADSTATEID,
due to the Open being prematurely closed.
This can result in a call to nfscl_hasexpired() to do a
recovery.
This would explain at least one hang described in the PR.
PR: 260011
MFC after: 2 weeks
(cherry picked from commit be7b87de16ffbabb81989e13a4b19a178e3ab8ee)
* Fix unused variable warning in ipsec_mbuf.c
With clang 15, the following -Werror warning is produced:
sys/netipsec/ipsec_mbuf.c:93:24: error: variable 'alloc' set but not used [-Werror,-Wunused-but-set-variable]
int todo, len, done, alloc;
^
The 'alloc' variable appears to have been a debugging aid that has never
been used for anything, so remove it.
MFC after: 3 days
(cherry picked from commit df5d2841d507589af0de7301f6cee3d2b98a35be)
* Adjust vt_mouse_paste() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/dev/vt/vt_core.c:2129:15: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
vt_mouse_paste()
^
void
This is because vt_mouse_paste() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.
MFC after: 3 days
(cherry picked from commit b77a5e5f5835620ce27114fad9a211d960ed60aa)
* Adjust pcmlog_{initialize,shutdown}() definitions to avoid clang 15 warning
With clang 15, the following -Werror warnings are produced:
sys/dev/hwpmc/hwpmc_logging.c:1228:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pmclog_initialize()
^
void
sys/dev/hwpmc/hwpmc_logging.c:1277:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pmclog_shutdown()
^
void
This is because pcmlog_{initialize,shutdown}() are declared with (void)
argument lists, but defined with empty argument lists. Make the
definitions match the declarations.
MFC after: 3 days
(cherry picked from commit ba95c556029357800d18a5bc5abd02a2b7d0c9de)
* Adjust tdsaContext_t::NvmdResponseSet declaration to avoid clang 15 warning
With clang 15, the following -Werror warnings are produced:
In file included from sys/dev/pms/freebsd/driver/ini/src/agtiapi.c:70:
sys/dev/pms/RefTisa/tisa/sassata/common/tdsatypes.h:346:13: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
volatile NvmdResponseSet;
~~~~~~~~ ^
int
The NvmdResponseSet member is effectively only used as a boolean in the
pms(4) driver, so it could be a single bit. But to avoid changing the
semantics at all in this unmaintained driver, simply declare it as a
volatile int.
MFC after: 3 days
(cherry picked from commit 95204d7a6368990e216db0ad51ef3e6018aed27c)
* Fix unused variable warnings in hwpmc_mod.c
With clang 15, the following -Werror warnings are produced:
sys/dev/hwpmc/hwpmc_mod.c:4805:6: error: variable 'nfree' set but not used [-Werror,-Wunused-but-set-variable]
int nfree;
^
sys/dev/hwpmc/hwpmc_mod.c:4804:6: error: variable 'ncallchains' set but not used [-Werror,-Wunused-but-set-variable]
int ncallchains;
^
The 'nfree' and 'ncallchains' variables were used in KASSERTs, but these
were removed due to refactoring in d9f1b8dbf29d. Remove the variables
since they no longer serve any purpose.
MFC after: 3 days
(cherry picked from commit 38a9b8a00ce933e99b4a643cdcc3220be82e7d62)
* Fix unused variable warning in ocs_cam.c
With clang 15, the following -Werror warning is produced:
sys/dev/ocs_fc/ocs_cam.c:2556:11: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]
uint32_t count;
^
The 'count' variable seems to be a left-over from some debugging code
that no longer exists, and can be removed without any functional change.
MFC after: 3 days
(cherry picked from commit 8d9e29284627f5e860b7fc194e9fedd6b21f7783)
* Adjust ipfw_{init,destroy}_sopt_handler() definitions to avoid clang 15 warning
With clang 15, the following -Werror warning are produced:
sys/netpfil/ipfw/ip_fw_sockopt.c:3477:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ipfw_init_sopt_handler()
^
void
sys/netpfil/ipfw/ip_fw_sockopt.c:3485:26: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ipfw_destroy_sopt_handler()
^
void
This is because ipfw_init_sopt_handler() and ipfw_destroy_sopt_handler()
are declared with (void) argument lists, but defined with empty argument
lists. Make the definitions match the declarations.
MFC after: 3 days
(cherry picked from commit d62830c5e493133b0212f39c7efdab4232f87abf)
* Adjust pcm_md_initialize() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/dev/hwpmc/hwpmc_x86.c:245:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pcm_md_initialize()
^
void
This is because pcm_md_initialize() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.
MFC after: 3 days
(cherry picked from commit dc0cde7a21a6aab0a5e876d8f890764e32718932)
* Adjust fbt_unload() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/cddl/dev/fbt/fbt.c:1273:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
fbt_unload()
^
void
This is because fbt_unload() is declared with a (void) argument list,
but defined with an empty argument list. Make the definition match the
declaration.
MFC after: 3 days
(cherry picked from commit 6339314c737f44477c1168819353087c2f4816eb)
* Adjust pmc_thread_descriptor_pool_drain() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/dev/hwpmc/hwpmc_mod.c:2462:33: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pmc_thread_descriptor_pool_drain()
^
void
This is because pmc_thread_descriptor_pool_drain() is declared with a
(void) argument list, but defined with an empty argument list. Make the
definition match the declaration.
MFC after: 3 days
(cherry picked from commit 555d2c9394fa673241fd26a95152adfb9d20952e)
* Adjust iface_khandler_deregister() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/netpfil/ipfw/ip_fw_iface.c:159:26: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
iface_khandler_deregister()
^
void
This is because iface_khandler_deregister() is declared with a (void)
argument list, but defined with an empty argument list. Make the
definition match the declaration.
MFC after: 3 days
(cherry picked from commit 4100dc46c78cef408369c0fc8dcfd1f87783a1ca)
* Adjust ipfw_{init,destroy}_*() definitions to avoid clang 15 warning
With clang 15, the following -Werror warnings are produced:
sys/netpfil/ipfw/ip_fw_sockopt.c:187:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ipfw_init_counters()
^
void
sys/netpfil/ipfw/ip_fw_sockopt.c:196:22: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ipfw_destroy_counters()
^
void
sys/netpfil/ipfw/ip_fw_sockopt.c:3241:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ipfw_init_obj_rewriter()
^
void
sys/netpfil/ipfw/ip_fw_sockopt.c:3249:26: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ipfw_destroy_obj_rewriter()
^
void
This is because ipfw_init_counters(), ipfw_destroy_counters(),
ipfw_init_obj_rewriter(), and ipfw_destroy_obj_rewriter() are declared
with (void) argument lists, but defined with empty argument lists. Make
the definitions match the declarations.
MFC after: 3 days
(cherry picked from commit 62030bb8538cb3775f6259c81c2c30a533f3ab10)
* Fix unused variable warning in if_lagg.c
With clang 15, the following -Werror warning is produced:
sys/net/if_lagg.c:2413:6: error: variable 'active_ports' set but not used [-Werror,-Wunused-but-set-variable]
int active_ports = 0;
^
The 'active_ports' variable appears to have been a debugging aid that
has never been used for anything (ref https://reviews.freebsd.org/D549),
so remove it.
MFC after: 3 days
(cherry picked from commit fa267a329ffa3d0e02c3c3a52dd5df5231d92cba)
* Fix unused variable warning in iflib.c
With clang 15, the following -Werror warning is produced:
sys/net/iflib.c:993:8: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable]
u_int n;
^
The 'n' variable appears to have been a debugging aid that has never
been used for anything, so remove it.
MFC after: 3 days
(cherry picked from commit 0294e95da4aa272906d4472137b1235d8d8a7180)
* Adjust ipfw_iface_{init,destroy}() definitions to avoid clang 15 warning
With clang 15, the following -Werror warnings are produced:
sys/netpfil/ipfw/ip_fw_iface.c:206:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ipfw_iface_init()
^
void
sys/netpfil/ipfw/ip_fw_iface.c:219:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ipfw_iface_destroy()
^
void
This is because ipfw_iface_init() and ipfw_iface_destroy() are declared
with (void) argument lists, but defined with empty argument lists. Make
the definitions match the declarations.
MFC after: 3 days
(cherry picked from commit 1eea6b9097834484f2238298f550bb418901c313)
* Fix unused variable warning in if_re_netmap.h
With clang 15, the following -Werror warning is produced:
sys/dev/netmap/if_re_netmap.h:179:8: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable]
u_int n;
^
The 'n' variable appears to have been a debugging aid that has never
been used for anything, so remove it.
MFC after: 3 days
(cherry picked from commit 8bfedf5852bcb846bfdd2a54989d65cdbb16f7ef)
* Fix unused variable warning in fwohci.c
With clang 15, the following -Werror warning is produced:
sys/dev/firewire/fwohci.c:2762:23: error: variable 'pcnt' set but not used [-Werror,-Wunused-but-set-variable]
int len, plen, hlen, pcnt, offset;
^
The 'pcnt' variable is eventually used only in an #if 0'd block,
obviously meant for debugging. Ensure that 'pcnt' is only declared and
used when COUNT_PACKETS is defined, so the debugging can be easily
turned on later, if desired.
MFC after: 3 days
(cherry picked from commit d7e0d962f39877b997454992a980f4122c6316e7)
* Adjust iface_khandler_register() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/netpfil/ipfw/ip_fw_iface.c:128:24: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
iface_khandler_register()
^
void
This is because iface_khandler_register() is declared with a (void)
argument list, but defined with an empty argument list. Make the
definition match the declaration.
MFC after: 3 days
(cherry picked from commit edf1e1f78da8c2a19bcee90fe0f72cac2eb18e30)
* blacklistd.conf.5: typo/grammar fixes
PR: 246467
Submitted by: Mike Lempriere
(cherry picked from commit 36b1f67ca1605b7a0caf204dfce42e7e4d057272)
* blacklistd.conf.5: pluralization correction
Submitted by: bcr in review D22259
MFC with: r354399
(cherry picked from commit 9999fa1cd0e8bf8e350c8e65cdb05458820b730e)
* blacklistd: Handle 0 sized messages
Patch obtained from https://github.com/zoulasc/blocklist commit
ada75856bc6fcabbdd25ffbe08fbad5cf2a2c08a
PR: 264599
MFC after: 1 week
(cherry picked from commit b1e81e6ddee42efb0f0d49cfc6cebb48d52e3f08)
* beinstall.8: Update example distsites for BSDINSTALL_DISTSITE
MFC after: 1 week
(cherry picked from commit aa35037ba565bf9f6d5946515ecdcc61a5b22ebb)
* tmpfs.5: Add fstab line example
MFC after: 3 days
(cherry picked from commit 7c2ec6cdf575de11d5ed33109d92e757dd3d072c)
* tmpfs.5: Fix typos and linter warnings
MFC after: 3 days
(cherry picked from commit 2b693e4829265e1e9f73b628c139701e1c259b24)
* vtfontcvt: improve hex font format validation
Previously an EOF would result in sscanf returning -1 leading to a
crash.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 119db52f4228fae161306ac29dc739638c132c26)
* ena: Add ena_ring_tx_doorbell() function
Add ena_ring_tx_doorbell function to remove code duplication.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 3501d4f17e8cc0350b8deff671f9991cc7ac280c)
* ena: Move reset completion logging to the reset function
While ena_restore_device is called from the reset task, it can also be
called from other locations in the driver, for example in netmap
specific code. Move the reset completion logging to reset task, so it
better represents when the reset actually happened.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit d209ffee155dd5e505f174a356c8f50c96ebf57e)
* ena: Extend debug prints for invalid req_id resets
Print information about qid if req_id is invalid. Add information about
qid and req_id if mbuf is invalid.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit a9c39b031fe89a6414174e3db82da6548d7fff0f)
* ena: Prevent LLQ initialization when membar isn't exposed
The ena_com_config_dev_mode() function performs many LLQ related
calculations and sends an admin command to configure LLQ in the device.
All the LLQ related operations are unnecessary if the driver fails to
find LLQ memory bar.
Move LLQ memory bar allocation to separate helper function
ena_map_llq_mem_bar and execute this function before LLQ configuration.
If the LLQ memory bar cannot be allocated, then LLQ configuration is
skipped.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 90232d18ca4f7a5a3073a8279a9b9d3228df5f87)
* ena: Store ticks of last Tx cleanup
Store timestamp of last cleanup in Tx ring structure. This does not
change anything during normal operation of the driver but could be
useful when the device fails for some reason.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit d8aba82b5ca75f1a5bff609af141844c4fc9de70)
* ena: Use atomic_load/store functions for first_interrupt variable
Surround cases of possible simultaneous access to the first_interrupt
variable with atomic_load/store functions.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 0ac122c388d9a5e189e60378f1950b82a22bbdd1)
* ena: Move ena_copy_eni_metrics into separate task
Copying ENI metrics was done in callout context, this caused the driver
to panic when sample_interval was set to a value other than 0, as the
admin queue call which was executed could sleep while waiting on
a condition variable. Taskqueue, unlike callout, allows for sleeping, so
moving the function to a separate taskqueue fixes the problem.
ena_timer_service is still responsible for scheduling the taskqueue.
Stop draining the callout during ena_up/ena_down. This was done to
prevent a race between ena_up/down and ena_copy_eni_metrics admin queue
calls. Since ena_metrics_task is protected by ENA_LOCK there is no
possibility of a race between ena_up/down and ena_metrics_task.
Remove a comment about locking in ena_timer_service. With ENI metrics
in a separate task this comment became obsolete.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit b899a02ad7330cae3c9bb08ad7975601dc3b9551)
* ena: Use device_set_desc in probe
During probe the driver created a temporary buffer to which the value of
DEVICE_DESC constant was printed. This buffer was then copied to the
device structure using device_set_desc_copy. Since the value of this
string is exactly the same for every device using the ENA driver, using
sprintf is unnecessary, and device_set_desc can be used instead.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 755e60ca046390bdcfc097b6a8f1a032d47a7b65)
* ena: Fix styling issues
Align code style with FreeBSD style(9) guidelines.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 82e558eacf222ac497bc11fa9f2c7778e97fbc7a)
* ena: Remove write-only datapath variable
The ena_qid variable value is never used. It can be safely removed.
That also silences the compilation warning.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit d5d5ea87236d8f839cad84296f23d285a696195c)
* ena: Align names of constants
Most of the constants in ena.h file were prefixed with ENA_*, while
others did not have this prefix. Align the constants by prefixing the
remaining constants with ENA.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 8f15f8a72b5474b81c5951d4039d203b2d80e2e3)
* ena: Fix invalid KASSERT test in netmap code
The KASSERT was originally added to ensure that the netmap Rx ring is
not NULL, however, it was checking for the opposite.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 79770fdad6c18d968cc122c4294820931cc542e0)
* ena: Update driver version to v2.6.0
Some of the changes in this release:
* Style fixes
* Fix ENI stats probing
* Add trace for the last Tx cleanup call
* Prevent LLQ initialization if member isn't exposed
* Improve logging
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 79e1500276a993c8be857a6e32f0c05ec8f3cdc8)
* ena: Make first_interrupt a uint8_t
We do not have atomic(9) routines for bools, and it is not guaranteed
that sizeof(bool) is 1.
This fixes the KASAN and KMSAN kernel builds, which fail because the
compiler refuses to silently cast a _Bool * to a uint8_t * when calling
the atomic(9) sanitizer interceptors.
Reviewed by: Dawid Górecki <dgr at semihalf.com>
MFC after: 2 weeks
Fixes: 0ac122c388d9 ("ena: Use atomic_load/store functions for first_interrupt variable")
Differential Revision: https://reviews.freebsd.org/D35683
(cherry picked from commit b72f1f4516896ad6da0ea74d146a56045de171f7)
* ena: Align req_id and qid print order
In most places, the req_id is printed first, and the qid is printed as a
second. To align the driver, one printout was reworked and the print
order of those variables was changed.
Suggested by: rpokala
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 38d036e91a8c29bf97b86d441a9d627c5cef2aea)
* ena: Fix LLQ descriptor reconfiguration
After the device reset, the LLQ configuration descriptor wasn't passed
to the hardware. On a 6-generation AWS instances (like C6gn), it is
required to pass the LLQ descriptor after the device reset, otherwise
the hardware will be missing the LLQ configuration resulting in
performance degradation.
This patch reconfigures the LLQ each time the ena_device_init() is
called. This means that the LLQ descriptor will be passed during the
initial configuration and after a reset.
The ena_map_llq_mem_bar() function call was moved before the
ena_device_init() call, to make sure that the mem bar is available.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 3324e304c14d121dc04338a38c7f3277cbfba58b)
* ena: Update driver version to v2.6.1
Minor version update which improves styling of a printouts, fixes
the KASAN and KMSAN kernel builds and LLQ reconfiguration after the
device reset.
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
(cherry picked from commit 25b64933a48c47baef698a302fa2dc5c6e3013ea)
* qat(4): Fix a typo in a source code comment
- s/bufer/buffer/
Obtained from: NetBSD
(cherry picked from commit 9fd95378f38390c76363e9884e25b37724b8a753)
* pfctl(8): Fix a typo in a source code comment
- s/bufer/buffer/
(cherry picked from commit a101b1b7f24aaabed03b73f2a4dd7acb41bb7a93)
* Adjust svc_vc_null() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/rpc/svc_vc.c:1078:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
svc_vc_null()
^
void
This is because svc_vc_null() is declared with a (void) argument list,
but defined with an empty argument list. Make the definition match the
declaration.
MFC after: 3 days
(cherry picked from commit 87d18efef7e3df5f4475cfe1a8f6d6782b7c1527)
* Fix unused variable warning in mlx5_fs_tree.c
With clang 15, the following -Werror warning is produced:
sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c:1408:15: error: variable 'candidate_group_num' set but not used [-Werror,-Wunused-but-set-variable]
unsigned int candidate_group_num = 0;
^
The 'candidate_group_num' variable appears to have been a debugging aid
that has never been used for anything, so remove it.
MFC after: 3 days
(cherry picked from commit 6332ad8673fb108dcb8af0aaa42d75ea845748d7)
* Fix unused variable warning in icl_soft.c
With clang 15, the following -Werror warning is produced:
sys/dev/iscsi//icl_soft.c:886:6: error: variable 'coalesced' set but not used [-Werror,-Wunused-but-set-variable]
int coalesced, error;
^
The 'coalesced' variable is eventually used only in an #if 0'd block,
obviously meant for debugging. Ensure that 'coalesced' is only declared
and used when DEBUG_COALESCED is defined, so the debugging can be easily
turned on later, if desired.
MFC after: 3 days
(cherry picked from commit f4f847018048ac7699b55bc1915a393eb65e4c53)
* Adjust authnone_create() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/rpc/auth_none.c:106:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
authnone_create()
^
void
This is because authnone_create() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.
MFC after: 3 days
(cherry picked from commit 90529847cf079d3b7250ae3d3ecd79e843df7973)
* Fix unused variable warning in mlx5_ib_devx.c
With clang 15, the following -Werror warning is produced:
sys/dev/mthca/mthca_cmd.c:662:23: error: variable 'tc' set but not used [-Werror,-Wunused-but-set-variable]
int ts __unused = 0, tc = 0;
^
The 'ts' and 'tc' variables are eventually used only in mthca_dbg()
macros, if CONFIG_INFINIBAND_MTHCA_DEBUG is defined. Ensure 'ts' and
'tc' are only declared and used when CONFIG_INFINIBAND_MTHCA_DEBUG is
defined.
MFC after: 3 days
(cherry picked from commit 5ae3710aeb2a984344fbe36de71612fc1a3d1a71)
* Adjust linux_get_char_devices() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/compat/linux/linux_util.c:243:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
linux_get_char_devices()
^
void
This is because linux_get_char_devices() is declared with a (void)
argument list, but defined with an empty argument list. Make the
definition match the declaration.
MFC after: 3 days
(cherry picked from commit e90d1b57487759e076b16cd3903a7b69565452b9)
* Adjust local_rpcb() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/rpc/rpcb_clnt.c:439:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
local_rpcb()
^
void
This is because local_rpcb() is declared with a (void) argument list,
but defined with an empty argument list. Make the definition match the
declaration.
MFC after: 3 days
(cherry picked from commit e87d90a9dce22003d79ae895bac5ce2d0ca029fe)
* find.1: explain why "find -s" may differ from "find | sort"
In short, that's because a directory name may end
with a character that goes before slash (/).
(cherry picked from commit 26a329f49fb4537d598e93f16054fd9e16f7e677)
* find.1: small language fix after previous change
collate -> collation
(cherry picked from commit d6054ee652a56466277f87bb4bcb757105393c8c)
* ifconfig.8: cleanup reminiscence about long gone ppp(4)
Replace ppp(4) removed since FreeBSD 8.0-RELEASE with vlan(4).
While here, remove commented out reference to non-existing "egress"
interface group hiding since initial import of interface groups
from OpenBSD in 2006.
(cherry picked from commit 3c9ad9398fcdf5f49114fde978b7c837b7ebbc8d)
* ftpd(8): do not refer to now unused libxo(3)
In 2018, the commit r328100 (0fdf7fa846b1a1b1679e86812a1b08b8cb623604)
removed libxo(3) support from ls(1), so ftpd has no reasons to link
with libxo since then.
(cherry picked from commit 796d48ec416863ab2826a1205365710635244023)
* Fix unused variable warning in sctp_timer.c
With clang 15, the following -Werror warning is produced:
sys/netinet/sctp_timer.c:510:6: error: variable 'recovery_cnt' set but not used [-Werror,-Wunused-but-set-variable]
int recovery_cnt = 0;
^
The 'recovery_cnt' variable is only used when INVARIANTS is undefined.
Ensure it is only declared and set in that case.
MFC after: 3 days
(cherry picked from commit 5bfd8cf3691381c19296d76d7944d6c1df5f4a75)
* Fix unused variable warning in if_pfsync.c
With clang 15, the following -Werror warning is produced:
sys/netpfil/pf/if_pfsync.c:2153:9: error: variable 'sent' set but not used [-Werror,-Wunused-but-set-variable]
int i, sent = 0;
^
The 'sent' variable was used in the for loop later in the
pfsync_bulk_update() function, but refactoring in 4fc65bcbe3fb7 got rid
of it. Remove the variable since it no longer serves any purpose.
MFC after: 3 days
(cherry picked from commit fb48e998501f8d1defecffb772121a4141cdc2b6)
* Adjust function definitions in pf.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/netpfil/pf/pf.c:985:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pf_mtag_initialize()
^
void
sys/netpfil/pf/pf.c:995:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pf_initialize()
^
void
sys/netpfil/pf/pf.c:1089:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pf_mtag_cleanup()
^
void
sys/netpfil/pf/pf.c:1096:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pf_cleanup()
^
void
sys/netpfil/pf/pf.c:1989:27: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pf_purge_expired_src_nodes()
^
void
sys/netpfil/pf/pf.c:2174:24: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pf_purge_unlinked_rules()
^
void
This is because pf_mtag_initialize(), pf_initialize(),
pf_mtag_cleanup(), pf_cleanup(), pf_purge_expired_src_nodes(), and
pf_purge_unlinked_rules() are declared with (void) argument lists, but
defined with empty argument lists. Make the definitions match the
declarations.
MFC after: 3 days
(cherry picked from commit 503b5870c018ec342be1396896560b720945d7e5)
* Fix unused variable warning in sctp_output.c
With clang 15, the following -Werror warning is produced:
sys/netinet/sctp_output.c:9367:33: error: variable 'cnt_thru' set but not used [-Werror,-Wunused-but-set-variable]
int no_fragmentflg, bundle_at, cnt_thru;
^
The 'cnt_thru' variable was in sctp_output.c when it was first added,
but appears to have been a debugging aid that has never been used, so
remove it.
MFC after: 3 days
(cherry picked from commit 9057feddc4b05d2b2b29e4db274c28af3d574d76)
* Fix unused variable warnings in sctp_indata.c
With clang 15, the following -Werror warnings are produced:
sys/netinet/sctp_indata.c:3309:6: error: variable 'tot_retrans' set but not used [-Werror,-Wunused-but-set-variable]
int tot_retrans = 0;
^
sys/netinet/sctp_indata.c:3842:20: error: variable 'resend' set but not used [-Werror,-Wunused-but-set-variable]
int inflight = 0, resend = 0, inbetween = 0, acked = 0, above = 0;
^
sys/netinet/sctp_indata.c:3842:47: error: variable 'acked' set but not used [-Werror,-Wunused-but-set-variable]
int inflight = 0, resend = 0, inbetween = 0, acked = 0, above = 0;
^
sys/netinet/sctp_indata.c:3842:58: error: variable 'above' set but not used [-Werror,-Wunused-but-set-variable]
int inflight = 0, resend = 0, inbetween = 0, acked = 0, above = 0;
^
The 'tot_retrans' variable was used in sctp_strike_gap_ack_chunks(), but
refactoring in 493d8e5a830e got rid of it. Remove the variable since it
no longer serves any purpose.
The 'resend', 'acked', and 'above' variables are only used when
INVARIANTS is undefined. Ensure they are only declared and set in that
case.
MFC after: 3 days
(cherry picked from commit 05b3a4282c408f495add570bbca12242dd006279)
* Adjust function definitions in if_pfsync.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/netpfil/pf/if_pfsync.c:2439:21: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pfsync_pointers_init()
^
void
sys/netpfil/pf/if_pfsync.c:2453:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pfsync_pointers_uninit()
^
void
sys/netpfil/pf/if_pfsync.c:2503:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pfsync_init()
^
void
sys/netpfil/pf/if_pfsync.c:2524:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pfsync_uninit()
^
void
This is because pfsync_pointers_init(), pfsync_pointers_uninit(),
pfsync_init(), and pfsync_uninit() are declared with (void) argument
lists, but defined with empty argument lists. Make the definitions match
the declarations.
MFC after: 3 days
(cherry picked from commit 766f3c8032a95f344823bea70bb7f794f9939d33)
* Adjust sctp_init_sysctls() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/netinet/sctp_sysctl.c:55:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
sctp_init_sysctls()
^
void
This is because sctp_init_sysctls() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.
MFC after: 3 days
(cherry picked from commit 205798564926589ed621b88d1853429d00de6de0)
* Adjust ng_{name,ID}_rehash() definitions to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/netgraph/ng_base.c:981:15: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ng_name_rehash()
^
void
sys/netgraph/ng_base.c:1012:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ng_ID_rehash()
^
void
This is because ng_name_rehash() and ng_ID_rehash() are declared with
(void) argument lists, but defined with empty argument lists. Make the
definitions match the declarations.
MFC after: 3 days
(cherry picked from commit dba7f4aa0909d8c31a0ca0ad0d1208fabfaa9352)
* Adjust function definitions in kern_dtrace.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/kern/kern_dtrace.c:64:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
kdtrace_proc_size()
^
void
sys/kern/kern_dtrace.c:87:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
kdtrace_thread_size()
^
void
This is because kdtrace_proc_size() and kdtrace_thread_size() are
declared with (void) argument lists, but defined with empty argument
lists. Make the definitions match the declarations.
MFC after: 3 days
(cherry picked from commit db8ea61ae261cc060f423dea050bf943bcad6793)
* Adjust function definitions in geom_event.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/geom/geom_event.c:261:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
g_run_events()
^
void
sys/geom/geom_event.c:405:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
g_do_wither()
^
void
sys/geom/geom_event.c:449:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
g_event_init()
^
void
This is because g_run_events(), g_do_wither(), and g_event_init() are
declared with (void) argument lists, but defined with empty argument
lists. Make the definitions match the declarations.
MFC after: 3 days
(cherry picked from commit ac3153434fcc3ddcbb47c7f397a1bc34fd0e0dcb)
* Adjust sctp_drain() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/netinet/sctp_pcb.c:6946:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
sctp_drain()
^
void
This is because sctp_drain() is declared with a (void) argument list,
but defined with an empty argument list. Make the definition match the
declaration.
MFC after: 3 days
(cherry picked from commit 24e13a49faabb22ece97dc8e4718caf8f6bad84c)
* Fix unused variable warning in xen's blkback.c
With clang 15, the following -Werror warning is produced:
sys/dev/xen/blkback/blkback.c:1561:12: error: variable 'req_seg_idx' set but not used [-Werror,-Wunused-but-set-variable]
u_int req_seg_idx;
^
The 'req_seg_idx' variable was used in the for loop later in the
xbb_dispatch_io() function, but refactoring in 112cacaee408 got rid of
it. Remove the variable since it no longer serves any purpose.
MFC after: 3 days
(cherry picked from commit 39e12a7591bf2ed4b2fae48e19f3af3a3cdcb196)
* Adjust function definition in acpi_timer.c to avoid clang 15 warnings
With clang 15, the following -Werror warning is produced:
sys/dev/acpica/acpi_timer.c:402:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
acpi_timer_test()
^
void
This is because acpi_timer_test() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.
MFC after: 3 days
(cherry picked from commit c45bc02560b0f632f8e085679512a588bfcb3384)
* Adjust function definitions in kern_resource.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/kern/kern_resource.c:1212:10: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
lim_alloc()
^
void
sys/kern/kern_resource.c:1365:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
uihashinit()
^
void
This is because lim_alloc() and uihashinit() are declared with (void)
argument lists, but defined with empty argument lists. Make the
definitions match the declarations.
MFC after: 3 days
(cherry picked from commit f2eb09b089bcdf546ed3fd4c2c59d9df02c585d8)
* Adjust function definition in nd6.c to avoid clang 15 warnings
With clang 15, the following -Werror warning is produced:
sys/netinet6/nd6.c:247:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
nd6_destroy()
^
void
This is nd6_destroy() is declared with a (void) argument list, but
defined with an empty argument list. Make the definition match the
declaration.
MFC after: 3 days
(cherry picked from commit 50207b2de9a53491c2b5ee9b96689333f5c46de5)
* Adjust function definition in vfs_bio.c to avoid clang 15 warnings
With clang 15, the following -Werror warning is produced:
sys/kern/vfs_bio.c:3430:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
buf_daemon()
^
void
This is because buf_daemon() is declared with a (void) argument list,
but defined with an empty argument list. Make the definition match the
declaration.
MFC after: 3 days
(cherry picked from commit a387bd1b6a0e18d7abafcbb5ae1870be0604ff15)
* Adjust function definitions in sysv_msg.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/kern/sysv_msg.c:213:8: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
msginit()
^
void
sys/kern/sysv_msg.c:316:10: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
msgunload()
^
void
This is because msginit() and msgunload() are declared with (void)
argument lists, but defined with empty argument lists. Make the
definitions match the declarations.
MFC after: 3 days
(cherry picked from commit 78cfed2de70d023acb452c06dbd1ffd8341f4608)
* Adjust function definition in subr_autoconf.c to avoid clang 15 warnings
With clang 15, the following -Werror warning is produced:
sys/kern/subr_autoconf.c:119:34: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
run_interrupt_driven_config_hooks()
^
void
This is because run_interrupt_driven_config_hooks() is declared with a
(void) argument list, but defined with an empty argument list. Make the
definition match the declaration.
MFC after: 3 days
(cherry picked from commit 3c8f0790dd038ce646f140b7aad23b4e698c0522)
* Fix unused variable warning in ieee80211_proto.c
With clang 15, the following -Werror warning is produced:
sys/net80211/ieee80211_proto.c:1070:34: error: variable 'num_mixed' set but not used [-Werror,-Wunused-but-set-variable]
int num_vaps = 0, num_pure = 0, num_mixed = 0;
^
The 'num_mixed' variable was in ieee80211_proto.c when the function
vap_update_ht_protmode() was added, but it was never used for anything,
so remove it.
MFC after: 3 days
(cherry picked from commit 9319211f96c6f11959c76f1d565a744ab37b0031)
* Adjust function definition in ufs_dirhash.c to avoid clang 15 warnings
With clang 15, the following -Werror warning is produced:
sys/ufs/ufs/ufs_dirhash.c:1252:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ufsdirhash_lowmem()
^
void
This is ufsdirhash_lowmem() is declared with a (void) argument list, but
defined with an empty argument list. Make the definition match the
declaration.
MFC after: 3 days
(cherry picked from commit 08c16dd4bf6ee5649a86fa472104f89b3fbfe71a)
* Suppress -Wstrict-prototypes for several zlib files
Clang 15 is more strict about function definitions not matching
declarations, and zlib has a lot of these, but since it is contributed
code (and in K&R style to boot), suppress those warnings instead.
MFC after: 3 days
(cherry picked from commit e83ffec3af2e71cc64348d58481c87db9efbac92)
* Fix unused variable warning in ffs_snapshot.c
With clang 15, the following -Werror warning is produced:
sys/ufs/ffs/ffs_snapshot.c:204:7: error: variable 'redo' set but not used [-Werror,-Wunused-but-set-variable]
long redo = 0, snaplistsize = 0;
^
The 'redo' variable is only used when DIAGNOSTIC is defined. Ensure it
is only declared and set in that case.
MFC after: 3 days
(cherry picked from commit c9dde6f0c713a027266c52cf94a33a086348c566)
* Adjust playinit() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/dev/speaker/spkr.c:182:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
playinit()
^
void
This is because playinit() is declared with a (void) argument list, but
defined with an empty argument list. Make the definition match the
declaration.
MFC after: 3 days
(cherry picked from commit 57c46916e145581807333bc06a08e9532721bd8f)
* Fix unused variable warning in amd64's pmap.c
With clang 15, the following -Werror warning is produced:
sys/amd64/amd64/pmap.c:8274:22: error: variable 'freed' set but not used [-Werror,-Wunused-but-set-variable]
int allfree, field, freed, i, idx;
^
The 'freed' variable is only used when PV_STATS is defined. Ensure it is
only declared and set in that case.
MFC after: 3 days
(cherry picked from commit 7a1f289bd2949e5867c7f0396c35f02f179dc8bd)
* Adjust function definitions in kern_cons.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/kern/kern_cons.c:201:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
cninit_finish()
^
void
sys/kern/kern_cons.c:376:7: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
cngrab()
^
void
sys/kern/kern_cons.c:389:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
cnungrab()
^
void
sys/kern/kern_cons.c:402:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
cnresume()
^
void
This is because cninit_finish(), cngrab(), cnungrab(), and cnresume()
are declared with (void) argument lists, but defined with empty argument
lists. Make the definitions match the declarations.
MFC after: 3 days
(cherry picked from commit 9806e82a23924f32dc5976bc8687fbbe293a140b)
* Fix unused variable warning in sfxge's ef10_tx.c
With clang 15, the following -Werror warning is produced:
sys/dev/sfxge/common/ef10_tx.c:345:15: error: variable 'eqp' set but not used [-Werror,-Wunused-but-set-variable]
efx_qword_t *eqp;
^
The 'eqp' variable is passed as an argument to the EFSYS_BAR_WC_WRITEQ()
macro, but currently this macro ignores the argument, similar to its
other _esbp argument. Silence the warning by casting the _eqp argument
to void in the macro.
MFC after: 3 days
(cherry picked from commit a79731b9453320af6fcf5ec16fa5de900dadbce8)
* Adjust function definitions in ufs_dirhash.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/ufs/ufs/ufs_dirhash.c:1303:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ufsdirhash_init()
^
void
sys/ufs/ufs/ufs_dirhash.c:1319:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ufsdirhash_uninit()
^
void
This is because ufsdirhash_init() and ufsdirhash_uninit() are declared
with (void) argument lists, but defined with empty argument lists. Make
the definitions match the declarations.
MFC after: 3 days
(cherry picked …
More information about the Midnightbsd-cvs
mailing list