From nobody Tue Dec 06 15:52:59 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 4NRQ173vrYz4k04x; Tue, 6 Dec 2022 15:52:59 +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 4NRQ173Tprz41XH; Tue, 6 Dec 2022 15:52:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670341979; 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=MgFV1Ae9y8VDW7gqgjDkGzxgATCRJv6kNwfrNjoruGk=; b=cemCqQLCbrjOrG0SmyG3ElMBPOUJPm0sLpJ+DRWCAoVU2MqxektjC2rz7VRInkwZN7Ob0x o57KnmdoCUiMnKojs1pMLxBeo5sdRrjuRRuKuLK8qUmsdM0OSty/UmKuYOjWjiqygh2olN BtB8gxdQlPIklg8PGpGeDy2D7v+xko0qaWx120gxNSUlA0claDAnsStXZftpB4/G1mEFOK djee6Bn9nillyGvkhvNZ+aHy0mmE+zB7DDJLHlaAUECbuU+bSrSU0jSo2/w75MGtXe5GEa eKGbXi4jBDs4Cd8tN7u1TChbcBh1ucvnfjjvM5qaPpVZxH3fHihRBIydrOKbNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670341979; 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=MgFV1Ae9y8VDW7gqgjDkGzxgATCRJv6kNwfrNjoruGk=; b=DFCRAHue7Hp/+Lt3C+A7ivXozcShpl4HAK3Fykx+xWt4oHJWcfXb2nEd/d4CaJIKZRd7Xn Ww426zrQfkRlcvBianX2M1F2PYosErT+J4R3lJ3cLK/SHZNO0cRC8dHmUjLYKEozS9dJhy /S2OTFDUcv+XDEPqx09YD5S85AuJY0bX//1y2dO6XAvcxcW6HYiEQcNoIif0s7pDH9nEj2 DIRPAVgXKIG9FZL//Ehr3+/R89S4+oMTy0gicxGY5rAZIqyujy8dU9xP6EoZ3WR11q0git nTCFQdOPKTCNugZmG/jUtROigBQEb4urNEIAr3bJW9EfZjBRX1euo3g7FHcCtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670341979; a=rsa-sha256; cv=none; b=JlxHv3sxl3CFbeqv2JtJLyWbMp5AuHsW/RZhNT5X4fhhdBFeuiCd7z/xjhkEBXXSaysYuB BLi2/1B+X/U83WqgX2iHjNFCmKIGNYz5iCOLZpZty5fJoSIpg3qNLt8R9SvLnF0i6qrefN 7mXaYO9PIvAKvBrVqvdeFCdN8L5eIJPx1N1z0xin874nZIcAEnHI6m3cxBrtGWtmVpxm47 xZQiGPGOrLJAuct03wpjidf4WRIEZoDcjl+0sNQKwWmNe432dQhbwV0T3K0nWmTL6XBQ7X +jqdMKuO3RZ4jdQij8C7y9PWlwOwPjr4/xaxqB6heaXVU9bxMWRK817tV8jDEA== 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 4NRQ172bM7zjfY; Tue, 6 Dec 2022 15:52:59 +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 2B6Fqxgq033687; Tue, 6 Dec 2022 15:52:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2B6Fqxhb033686; Tue, 6 Dec 2022 15:52:59 GMT (envelope-from git) Date: Tue, 6 Dec 2022 15:52:59 GMT Message-Id: <202212061552.2B6Fqxhb033686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 72621b543e98 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 72621b543e984a2074e1945adc26b49ac04af7e8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=72621b543e984a2074e1945adc26b49ac04af7e8 commit 72621b543e984a2074e1945adc26b49ac04af7e8 Author: Emmanuel Vadot AuthorDate: 2022-12-06 15:52:16 +0000 Commit: Emmanuel Vadot CommitDate: 2022-12-06 15:52:16 +0000 linuxkpi: Fix style for dma_map_sgtable Reported by: bz Sponsored by: Beckhoff Automation GmbH & Co. KG --- 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 7f2579787b4b..01395cc7a0d5 100644 --- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h @@ -361,15 +361,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