From nobody Thu Feb 02 11:14:34 2023 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 4P6x566tlxz3cwbg; Thu, 2 Feb 2023 11:14:34 +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 4P6x563xFWz46bb; Thu, 2 Feb 2023 11:14:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675336474; 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=jsiZTIruH/3jJItxR9G2BGCZB3Y9kd0HEF8yg7iMuIc=; b=bE2d3KaH+kdhueuP3CQB8Ce0Irw+x6PMyNThv3YcJhVu+VJU6vcWI5ptk1o6+B7ItW4Yyi pjx2IfiQFKl38zBNf4V5rPVlktsof7TbdL3CxL62EunAp+p99yhnz2tCC+IsJEI/gEaa8p m87vna6SESvD3WwBtLyk/4E1Zap27RmbCpaXQBvgcy3UtM9WyWgXC6ggCdfcuEVodRxh2O +SikrnAKJ+GzNlcqiApjU7C+siIG8/RrZWk8LJWahTTaAEq0yHpl+N1iDB3xhw+BeSh1gk XOAq5YcEgwqijKs+2kNjKyap4Y+IePools5F00vEsApjiCVaScVCT+6EXJ0tkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675336474; 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=jsiZTIruH/3jJItxR9G2BGCZB3Y9kd0HEF8yg7iMuIc=; b=eY8KjKvL1OK7MsjTl8MLmL9WaW9V/rFgkRXTW2LTeDG50pKdDwC0d58I3cj0VCD3Hqwb/N tjEeD/3Wd+DS9U6dM1879tAX17j9I7M5D8bi7AwmnIXtk1X4i1j5wE+74aqKhQPLDcKDth lz6GfEOtR9fPszYi76nN3ibI008sg5pnU7kFwmSQ+j2VPdcSi8fxsAPinGvueUsSHGHDVv qjDihR6sTD27wOkpDRjebItnG9OQFy3jKZkw8x+WFSVuOqS2c27MVLw88RYKMIzIF6J5d1 QRbI8+axX1wSRsPiMVVOzb2YMNLNHlOUfPcFgZOnq2ZXqDrVwwH+b4RC462pSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675336474; a=rsa-sha256; cv=none; b=LB2kj98lso1L63ncvTonSm1zSyU7+UzcJDC2e7jEegdIoPYsIUplGvv9+GxjcnSM0Ef0mx qXuNKsvs7BCX37uPYh6rJs8tuxMrtMNkl0j7ALPEbbvlSA1l9NM8JaZWwSFKosPK5ZuTlB lXvP1AuicwBIcjRq0y3DqqXcKratdpSqb4nOJ2re6f9sSu5DqMtAhHKl/Uzvjh9DmzVWI2 r4pWPXjaE7QbadgbdmAvAZapoqFoDptG3ZgegQUyv4Xp/EYUzeUeu0Rr6OmBErfM1X/H53 sfjqN0U65lx6ClcFC1RTRYec5Bv1hwQhLbt3lsYR9xv70ElAFVPe83v16DwtjQ== 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 4P6x5629wFzsNf; Thu, 2 Feb 2023 11:14:34 +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 312BEYf7076658; Thu, 2 Feb 2023 11:14:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 312BEYFx076657; Thu, 2 Feb 2023 11:14:34 GMT (envelope-from git) Date: Thu, 2 Feb 2023 11:14:34 GMT Message-Id: <202302021114.312BEYFx076657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: f9a312f61ca2 - stable/13 - linuxkpi: Fix style for dma_map_sgtable 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f9a312f61ca2d3349d5d0e89e9306bb817d60548 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=f9a312f61ca2d3349d5d0e89e9306bb817d60548 commit f9a312f61ca2d3349d5d0e89e9306bb817d60548 Author: Emmanuel Vadot AuthorDate: 2022-12-06 15:52:16 +0000 Commit: Emmanuel Vadot CommitDate: 2023-02-02 11:10:36 +0000 linuxkpi: Fix style for dma_map_sgtable Reported by: bz Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 72621b543e984a2074e1945adc26b49ac04af7e8) --- sys/compat/linuxkpi/common/include/linux/dma-mapping.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h index 25e4acf9e45d..afcaa69998b8 100644 --- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h @@ -357,15 +357,13 @@ dma_map_sgtable(struct device *dev, struct sg_table *sgt, enum dma_data_direction dir, unsigned long attrs) { + int nents; - int nents = dma_map_sg_attrs(dev, sgt->sgl, sgt->nents, dir, attrs); - - if (nents < 0) { - return nents; - } else { - sgt->nents = nents; - return 0; - } + nents = dma_map_sg_attrs(dev, sgt->sgl, sgt->nents, dir, attrs); + if (nents < 0) + return (nents); + sgt->nents = nents; + return (0); } static inline void