lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250325051150.65c02e32@kernel.org>
Date: Tue, 25 Mar 2025 05:11:50 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: "Xin Tian" <tianx@...silicon.com>
Cc: <netdev@...r.kernel.org>, <leon@...nel.org>, <andrew+netdev@...n.ch>,
 <pabeni@...hat.com>, <edumazet@...gle.com>, <davem@...emloft.net>,
 <jeff.johnson@....qualcomm.com>, <przemyslaw.kitszel@...el.com>,
 <weihg@...silicon.com>, <wanry@...silicon.com>, <jacky@...silicon.com>,
 <horms@...nel.org>, <parthiban.veerasooran@...rochip.com>,
 <masahiroy@...nel.org>, <kalesh-anakkur.purayil@...adcom.com>,
 <geert+renesas@...der.be>, <geert@...ux-m68k.org>
Subject: Re: [PATCH net-next v9 05/14] xsc: Add eq and alloc

On Tue, 18 Mar 2025 23:15:00 +0800 Xin Tian wrote:
> +		for (i = 0; i < buf->nbufs; i++) {
> +			buf->page_list[i].buf =
> +				dma_alloc_coherent(&xdev->pdev->dev, PAGE_SIZE,
> +						   &t, GFP_KERNEL | __GFP_ZERO);

DMA allocations are always zeroed, no need for GFP_ZERO.

> diff --git a/drivers/net/ethernet/yunsilicon/xsc/pci/alloc.h b/drivers/net/ethernet/yunsilicon/xsc/pci/alloc.h
> new file mode 100644
> index 000000000..a1c4b92a5
> --- /dev/null
> +++ b/drivers/net/ethernet/yunsilicon/xsc/pci/alloc.h
> @@ -0,0 +1,17 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/* Copyright (C) 2021-2025, Shanghai Yunsilicon Technology Co., Ltd.
> + * All rights reserved.
> + */
> +
> +#ifndef __ALLOC_H
> +#define __ALLOC_H

Please use less generic names for header guards.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ