Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp282546lqg; Thu, 11 Apr 2024 02:46:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVefYBSbq4cfLoWgkDFnoecQxRMJEsAT+nvxmjHusGWfFqD9b5kiyv7wowGpsJy7ifLWBmN7fy0ljWKWHxqg2T3QRLmHHXf+2t8sNQwMg== X-Google-Smtp-Source: AGHT+IHBWnhM/cG5NKAIoIef84URrwUWxjf8yaeNSyWsf0x4SYAvxk/RhfrjTSUOVso5C7/MY0nt X-Received: by 2002:a05:6102:c50:b0:47a:22cd:9717 with SMTP id y16-20020a0561020c5000b0047a22cd9717mr5415893vss.24.1712828760536; Thu, 11 Apr 2024 02:46:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712828760; cv=pass; d=google.com; s=arc-20160816; b=IXYUoi4plzscLvQZiBED8MJcJlyzX6pmH6EnXxEV79L/b5hBvkKAFRP9w89w8TrfPp mZ0nsLsqqJwkkRiOqWFFzmbJu3GzZp4+6L7+L6ImiTEsKwohG0LQXdgaS74jRLnKOT42 lbXfuoXGnfz0+1OwFp2YLtiGX8AJnfcZO54NKOchAsBBqh/PJdh9nknQXEq4xuGFJWxQ 2aSirL2HiWnPv6UFdx1mjpEEr3x3gKec3W2QHrYWUSRo0LtcXIioTKZ5s7n8zYZ/BnY4 dTtT+7RAesZXCbel7zf5gJin9vu1TtYlOhsbtWesNpA5gK0hQMXPb9AohbZaQ66fxNTe l6Hg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=qb6jt6PvVwoLULilcXMSDZp7vaCn/4G5M+/2GvRm7jc=; fh=hyz3ULSvQEaxSYQIHtOilqGhUusJZoFMidwTuEjqaaQ=; b=Fq2ReGnikJnu4FzOLjzb1+TXsBj4jf4B+gHgcKt33JTCwg07U/2iDHGx3u59fahGgJ rk/hGNsleqOeInu5lzzJeglQHKJpUy3BiJWaokoddqjIMnI/G9ff4O5fuTKxr5zyw14V hPHl5XXqUSC5jmDTm8jZJSXIBBD6+DhSpifMkpFcEK6UuOWCdX0j2a1eSPR71Q495lf1 1MXqWj0VJEKILSyJT9iX/05Apv/tpa7WYKtnBY/L2zFj1IUFWl0liWUo5J8b037T8TaJ HTnkXkX0hwT5N+bQinepa5/urbRpWpz8lh6gIMc5DLkBy332eKg/kIHncF5vVZ03PW+e ficA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t1z4+Ogl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-6155-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6155-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h11-20020ac85e0b000000b004346159624csi1056728qtx.795.2024.04.11.02.46.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 02:46:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6155-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t1z4+Ogl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-6155-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6155-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4391B1C20E0F for ; Thu, 11 Apr 2024 09:46:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2CF9145334; Thu, 11 Apr 2024 09:45:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="t1z4+Ogl" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEA7A145330 for ; Thu, 11 Apr 2024 09:45:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712828757; cv=none; b=s+U+UWSBp8womg9XfikItItEH/j1TjCI38kX0T011lKafpI9uSf/HLGKDlpcx0lN51Yr9nzYM8pKoHe0hVaic5/XPT7EfapX4bLdCC7pnDqHjiD3+rFf3x2jJ+3cKIcQywslLeOwhWrgmVVnyRe2+Ps6BKdL9j5RNb42hvRtn8k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712828757; c=relaxed/simple; bh=BYThVt2f6ZbPfcrZfcye+ZzXWaZShz25k/PsRATYf4Q=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=OOMUwGkgqsgBd7PsLO4lhYSryI+Zc8CacyJXUwcs169CgSo84omZCkd+L+tRoz5C3kIzZ7QMszBkQbJVH660ZTJN5ZLxUL3dSNCbLtfUkId4COuviDHJDAUIbNSzu7PNqA9gOsgaTfJLb+r2WeFAVnX7k8EOiX+VOld6YAiGLww= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=t1z4+Ogl; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CEC2C43390; Thu, 11 Apr 2024 09:45:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712828757; bh=BYThVt2f6ZbPfcrZfcye+ZzXWaZShz25k/PsRATYf4Q=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=t1z4+Ogl824G3HpZumwr43fb8pleL8qgj1kirCLEf81bAGfHFtywR0NGLNGg2Zv+6 ck1mvIFRUCGv3fxN9yTpMeNyNUILTiKIGfgpzHqPTir/t8I9iGu4r9GrAr/TASDtqu 07kkjpDPDYai2n3j3k3tpwaDA8qCkFm7xffkp8lBkf+QPbuNZTEIhMT4NgXHZ8j4Lo 3BkR2bA9WLKM6TioQtsxZ+W02jW47pZwfmYusowg76t5blc0hawOlVTWltS+arrY0O S1E5RNieGo1Pl+pKALcQ02d/28ZUJP2AI08WCJRzyIxubuMXNeetg8jOZl1pRJPwTP 5hMxp/jsxt5Pg== From: Kalle Valo To: Karthikeyan Periyasamy Cc: , , Jeff Johnson Subject: Re: [PATCH v2 4/4] wifi: ath12k: Refactor data path cmem init References: <20240409151415.1226109-1-quic_periyasa@quicinc.com> <20240409151415.1226109-5-quic_periyasa@quicinc.com> Date: Thu, 11 Apr 2024 12:45:54 +0300 In-Reply-To: <20240409151415.1226109-5-quic_periyasa@quicinc.com> (Karthikeyan Periyasamy's message of "Tue, 9 Apr 2024 20:44:15 +0530") Message-ID: <877ch4z0z1.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Karthikeyan Periyasamy writes: > Move the data path Tx and Rx descriptor primary page table CMEM > configuration into a helper function. This will make the code more > scalable for configuring partner device in support of multi-device MLO. > > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1 > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 > > Signed-off-by: Karthikeyan Periyasamy > Acked-by: Jeff Johnson [...] > +static void ath12k_dp_cmem_init(struct ath12k_base *ab, > + struct ath12k_dp *dp, > + enum ath12k_dp_desc_type type) > +{ > + u32 cmem_base; > + int i, start, end; > + > + cmem_base = ab->qmi.dev_mem[ATH12K_QMI_DEVMEM_CMEM_INDEX].start; > + > + switch (type) { > + case ATH12K_DP_TX_DESC: > + start = ATH12K_TX_SPT_PAGE_OFFSET; > + end = start + ATH12K_NUM_TX_SPT_PAGES; > + break; > + case ATH12K_DP_RX_DESC: > + start = ATH12K_RX_SPT_PAGE_OFFSET; > + end = start + ATH12K_NUM_RX_SPT_PAGES; > + break; > + default: > + ath12k_err(ab, "invalid descriptor type %d in cmem init\n", type); > + return; > + } > + > + /* Write to PPT in CMEM */ > + for (i = start; i < end; i++) > + ath12k_hif_write32(ab, cmem_base + ATH12K_PPT_ADDR_OFFSET(i), > + dp->spt_info[i].paddr >> ATH12K_SPT_4K_ALIGN_OFFSET); > +} Here's a good example why I don't like functions returning void. How do we handle the errors in this case? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches