From nobody Wed Jul 27 19:21:29 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LtNtd5NCtz4XSgg; Wed, 27 Jul 2022 19:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LtNtd4kMpz3KNG; Wed, 27 Jul 2022 19:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658949689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mMTXiq3DSHflfktCBgy4bpvvLeASAB9Y0FebLk9CocQ=; b=DdabIVcxh7HZYD0sGqkVeO0Wz5xS34Q6tahg+Y1XQfMztVzqAqAbKsxEOvadRp1HYvWKo3 +l8XSzp0PAS9tcx7je/pp1WAHu4rOGHJPjAnYxR1P0nCsfWcbt+dCi6+u3dJMphYHDRSGC 3lzb9YQG8DkljH6HUOZyaGnzC36N8pjDG1KiKh8gWyZlQCFRl/CCPxdyLbj6OvqK+uhQMx NxeuZTZTlCnIhcdu70BSZuGaF3K97HVbvGtaDH2h3xoToGO8HtlDs6tUlgZDRiTMKZkHN/ Bo2D9suxgL/4RJnyr0EI91sSdKGxh273Pa21WV/O2x7iIclUt4iR1lC5ws6MUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LtNtd3njpzSmD; Wed, 27 Jul 2022 19:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26RJLTOg071707; Wed, 27 Jul 2022 19:21:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26RJLT7O071706; Wed, 27 Jul 2022 19:21:29 GMT (envelope-from git) Date: Wed, 27 Jul 2022 19:21:29 GMT Message-Id: <202207271921.26RJLT7O071706@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: b4383d654753 - stable/12 - Fix unused variable warning in mlx5_ib_devx.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b4383d654753590c206cccfa34d4caf1feda696f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658949689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mMTXiq3DSHflfktCBgy4bpvvLeASAB9Y0FebLk9CocQ=; b=W5GnqZ5iR+YJw/0OvZ51nSRO/RFlP0NvjEgECmlogZdtBwtHCNTfU2/Ig3DVm1mkO7wdZo oiTIqfGANqn+8ivQ3WyQxJDCNy7SVbwcw8vNz/rh6ZBoteyiZ6FveL1kIFGJiUplJVRgUr kf9aZe6RoRknZdLA2AB/mfoN0+zJeEQOgoFCh3akGzmTs9+4mgbioQx6Xs9+wtfC/zfGbq xGXsgNDHFYsPc1g4uVI9mE00IsuK+sierRloauZ632vH0qtx7fvHG8+1NaBgUBj1s6NopO Lxvf2zh3yCeh1/YANMMoq62bU+PxseIo3hthTs6UaM/QKgUJfQv6KWQ9v0ggCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658949689; a=rsa-sha256; cv=none; b=KLe+GPnPifjtLo8lXbLWE4lKlWuByr74CP2wr10SqsOMZbortMOA/t++p2EM9HvM7auMOI 8O531qzyZCLMKhsk4K0rY9mhJ0dU/4YibUtG0AJ6O+FhPWJWNSWMbh8vQsh2WrcAcmHawO +GER9gzwPOMWPcRE8B1ie+/bSzowf9hOPR9sgVAwJJZvbMWBzUh+P98Hf2oIorPggDMrN5 DJsRniuEIiArb1JNtsIHnC1Mn68J3q5iylwW13Fte7FC1cwHwNk4ldKnOSi+eOGWTCwcEz FytVmd2IeyfvrBpgV4rypbdSZbXdT8h6AbQncv+lwFDrg7UkMWAgJS/sVKqLTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b4383d654753590c206cccfa34d4caf1feda696f commit b4383d654753590c206cccfa34d4caf1feda696f Author: Dimitry Andric AuthorDate: 2022-07-24 22:22:05 +0000 Commit: Dimitry Andric CommitDate: 2022-07-27 19:21:14 +0000 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) --- sys/dev/mthca/mthca_cmd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/mthca/mthca_cmd.c b/sys/dev/mthca/mthca_cmd.c index e75620aec09c..380108326a7b 100644 --- a/sys/dev/mthca/mthca_cmd.c +++ b/sys/dev/mthca/mthca_cmd.c @@ -661,7 +661,9 @@ static int mthca_map_cmd(struct mthca_dev *dev, u16 op, struct mthca_icm *icm, int nent = 0; int i; int err = 0; +#ifdef CONFIG_INFINIBAND_MTHCA_DEBUG int ts = 0, tc = 0; +#endif /* CONFIG_INFINIBAND_MTHCA_DEBUG */ mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); if (IS_ERR(mailbox)) @@ -695,8 +697,10 @@ static int mthca_map_cmd(struct mthca_dev *dev, u16 op, struct mthca_icm *icm, pages[nent * 2 + 1] = cpu_to_be64((mthca_icm_addr(&iter) + (i << lg)) | (lg - MTHCA_ICM_PAGE_SHIFT)); +#ifdef CONFIG_INFINIBAND_MTHCA_DEBUG ts += 1 << (lg - 10); ++tc; +#endif /* CONFIG_INFINIBAND_MTHCA_DEBUG */ if (++nent == MTHCA_MAILBOX_SIZE / 16) { err = mthca_cmd(dev, mailbox->dma, nent, 0, op,